From a94858e07cb33002a5e621aa362355a2a6a6ef27 Mon Sep 17 00:00:00 2001 From: Lucas Bertrand Date: Sat, 18 May 2024 08:10:50 +0200 Subject: [PATCH 1/2] refactor: remove deprecated variables pre-v17 (#2205) * update proto * remove block header flags * remove observer mapper * fix crosschain flags tests * changelog * fix test --- changelog.md | 1 + contrib/localnet/scripts/start-zetacored.sh | 4 +- .../zetacored_zetacore0/config/genesis.json | 10 - .../zetacored_zetacore1/config/genesis.json | 10 - docs/openapi/openapi.swagger.yaml | 11 - docs/spec/observer/messages.md | 1 - .../zetacore/observer/crosschain_flags.proto | 9 - .../zetachain/zetacore/observer/events.proto | 1 - .../zetacore/observer/observer.proto | 7 - .../zetachain/zetacore/observer/params.proto | 35 +- proto/zetachain/zetacore/observer/tx.proto | 2 +- testutil/network/genesis_state.go | 7 +- testutil/sample/observer.go | 20 - .../observer/crosschain_flags_pb.d.ts | 38 - .../zetacore/observer/events_pb.d.ts | 7 +- .../zetacore/observer/observer_pb.d.ts | 37 - .../zetacore/observer/params_pb.d.ts | 106 +-- .../zetachain/zetacore/observer/tx_pb.d.ts | 7 +- x/observer/genesis.go | 3 - .../msg_server_update_crosschain_flags.go | 15 +- ...msg_server_update_crosschain_flags_test.go | 20 - x/observer/keeper/observer_set_test.go | 8 +- x/observer/types/crosschain_flags.go | 10 - x/observer/types/crosschain_flags.pb.go | 326 +------- x/observer/types/crosschain_flags_test.go | 7 +- x/observer/types/events.pb.go | 146 +--- x/observer/types/keys.go | 3 +- .../types/message_update_crosschain_flags.go | 4 - .../message_update_crosschain_flags_test.go | 74 +- x/observer/types/observer.pb.go | 346 +------- x/observer/types/params.pb.go | 779 ++---------------- x/observer/types/tx.pb.go | 220 ++--- zetaclient/chains/bitcoin/observer/inbound.go | 17 +- zetaclient/chains/evm/observer/inbound.go | 2 + zetaclient/zetacore/query_test.go | 7 +- zetaclient/zetacore/tx_test.go | 7 +- 36 files changed, 270 insertions(+), 2037 deletions(-) diff --git a/changelog.md b/changelog.md index 7fad119b45..9bfd4496aa 100644 --- a/changelog.md +++ b/changelog.md @@ -26,6 +26,7 @@ * [2071](https://github.com/zeta-chain/node/pull/2071) - Modify chains struct to add all chain related information * [2124](https://github.com/zeta-chain/node/pull/2124) - removed unused variables and method * [2150](https://github.com/zeta-chain/node/pull/2150) - created `chains` `zetacore` `orchestrator` packages in zetaclient and reorganized source files accordingly. +* [2205](https://github.com/zeta-chain/node/pull/2205) - remove deprecated variables pre-v17 ### Tests diff --git a/contrib/localnet/scripts/start-zetacored.sh b/contrib/localnet/scripts/start-zetacored.sh index 6d95863787..81d4d80fc3 100755 --- a/contrib/localnet/scripts/start-zetacored.sh +++ b/contrib/localnet/scripts/start-zetacored.sh @@ -152,9 +152,7 @@ then cat $HOME/.zetacored/config/genesis.json | jq '.app_state["authority"]["policies"]["items"][0]["address"]="zeta1srsq755t654agc0grpxj4y3w0znktrpr9tcdgk"' > $HOME/.zetacored/config/tmp_genesis.json && mv $HOME/.zetacored/config/tmp_genesis.json $HOME/.zetacored/config/genesis.json cat $HOME/.zetacored/config/genesis.json | jq '.app_state["authority"]["policies"]["items"][1]["address"]="zeta1srsq755t654agc0grpxj4y3w0znktrpr9tcdgk"' > $HOME/.zetacored/config/tmp_genesis.json && mv $HOME/.zetacored/config/tmp_genesis.json $HOME/.zetacored/config/genesis.json cat $HOME/.zetacored/config/genesis.json | jq '.app_state["authority"]["policies"]["items"][2]["address"]="zeta1srsq755t654agc0grpxj4y3w0znktrpr9tcdgk"' > $HOME/.zetacored/config/tmp_genesis.json && mv $HOME/.zetacored/config/tmp_genesis.json $HOME/.zetacored/config/genesis.json - cat $HOME/.zetacored/config/genesis.json | jq '.app_state["observer"]["params"]["admin_policy"][0]["address"]="zeta1srsq755t654agc0grpxj4y3w0znktrpr9tcdgk"' > $HOME/.zetacored/config/tmp_genesis.json && mv $HOME/.zetacored/config/tmp_genesis.json $HOME/.zetacored/config/genesis.json - cat $HOME/.zetacored/config/genesis.json | jq '.app_state["observer"]["params"]["admin_policy"][1]["address"]="zeta1srsq755t654agc0grpxj4y3w0znktrpr9tcdgk"' > $HOME/.zetacored/config/tmp_genesis.json && mv $HOME/.zetacored/config/tmp_genesis.json $HOME/.zetacored/config/genesis.json - + # give balance to runner accounts to deploy contracts directly on zEVM # deployer zetacored add-genesis-account zeta1uhznv7uzyjq84s3q056suc8pkme85lkvhrz3dd 100000000000000000000000000azeta diff --git a/contrib/localnet/zetacored/zetacored_zetacore0/config/genesis.json b/contrib/localnet/zetacored/zetacored_zetacore0/config/genesis.json index ab30faef7a..35f92d2405 100644 --- a/contrib/localnet/zetacored/zetacored_zetacore0/config/genesis.json +++ b/contrib/localnet/zetacored/zetacored_zetacore0/config/genesis.json @@ -634,16 +634,6 @@ "min_observer_delegation": "10000000000.000000000000000000", "is_supported": true } - ], - "admin_policy": [ - { - "policy_type": "group1", - "address": "zeta1srsq755t654agc0grpxj4y3w0znktrpr9tcdgk" - }, - { - "policy_type": "group2", - "address": "zeta1srsq755t654agc0grpxj4y3w0znktrpr9tcdgk" - } ] } }, diff --git a/contrib/localnet/zetacored/zetacored_zetacore1/config/genesis.json b/contrib/localnet/zetacored/zetacored_zetacore1/config/genesis.json index ab30faef7a..35f92d2405 100644 --- a/contrib/localnet/zetacored/zetacored_zetacore1/config/genesis.json +++ b/contrib/localnet/zetacored/zetacored_zetacore1/config/genesis.json @@ -634,16 +634,6 @@ "min_observer_delegation": "10000000000.000000000000000000", "is_supported": true } - ], - "admin_policy": [ - { - "policy_type": "group1", - "address": "zeta1srsq755t654agc0grpxj4y3w0znktrpr9tcdgk" - }, - { - "policy_type": "group2", - "address": "zeta1srsq755t654agc0grpxj4y3w0znktrpr9tcdgk" - } ] } }, diff --git a/docs/openapi/openapi.swagger.yaml b/docs/openapi/openapi.swagger.yaml index 91fb179809..51f44cd581 100644 --- a/docs/openapi/openapi.swagger.yaml +++ b/docs/openapi/openapi.swagger.yaml @@ -57208,14 +57208,6 @@ definitions: items: type: object $ref: '#/definitions/observerNode' - observerBlockHeaderVerificationFlags: - type: object - properties: - isEthTypeChainEnabled: - type: boolean - isBtcTypeChainEnabled: - type: boolean - title: 'Deprecated(v16): Use VerificationFlags in the lightclient module instead' observerChainNonces: type: object properties: @@ -57292,9 +57284,6 @@ definitions: type: boolean gasPriceIncreaseFlags: $ref: '#/definitions/observerGasPriceIncreaseFlags' - blockHeaderVerificationFlags: - $ref: '#/definitions/observerBlockHeaderVerificationFlags' - title: 'Deprecated(v16): Use VerificationFlags in the lightclient module instead' observerGasPriceIncreaseFlags: type: object properties: diff --git a/docs/spec/observer/messages.md b/docs/spec/observer/messages.md index 8088468c11..2f7b25d91e 100644 --- a/docs/spec/observer/messages.md +++ b/docs/spec/observer/messages.md @@ -76,7 +76,6 @@ message MsgUpdateCrosschainFlags { bool isInboundEnabled = 3; bool isOutboundEnabled = 4; GasPriceIncreaseFlags gasPriceIncreaseFlags = 5; - BlockHeaderVerificationFlags blockHeaderVerificationFlags = 6; } ``` diff --git a/proto/zetachain/zetacore/observer/crosschain_flags.proto b/proto/zetachain/zetacore/observer/crosschain_flags.proto index 3e9b306881..32d1fbd318 100644 --- a/proto/zetachain/zetacore/observer/crosschain_flags.proto +++ b/proto/zetachain/zetacore/observer/crosschain_flags.proto @@ -21,19 +21,10 @@ message GasPriceIncreaseFlags { uint32 maxPendingCctxs = 5; } -// Deprecated(v16): Use VerificationFlags in the lightclient module instead -message BlockHeaderVerificationFlags { - bool isEthTypeChainEnabled = 1; - bool isBtcTypeChainEnabled = 2; -} - message CrosschainFlags { bool isInboundEnabled = 1; bool isOutboundEnabled = 2; GasPriceIncreaseFlags gasPriceIncreaseFlags = 3; - - // Deprecated(v16): Use VerificationFlags in the lightclient module instead - BlockHeaderVerificationFlags blockHeaderVerificationFlags = 4; } message LegacyCrosschainFlags { diff --git a/proto/zetachain/zetacore/observer/events.proto b/proto/zetachain/zetacore/observer/events.proto index 7f7513036e..4d752a4ce5 100644 --- a/proto/zetachain/zetacore/observer/events.proto +++ b/proto/zetachain/zetacore/observer/events.proto @@ -35,5 +35,4 @@ message EventCrosschainFlagsUpdated { bool isOutboundEnabled = 3; GasPriceIncreaseFlags gasPriceIncreaseFlags = 4; string signer = 5; - BlockHeaderVerificationFlags blockHeaderVerificationFlags = 6; } diff --git a/proto/zetachain/zetacore/observer/observer.proto b/proto/zetachain/zetacore/observer/observer.proto index ee83a94560..2d0fe2c7f4 100644 --- a/proto/zetachain/zetacore/observer/observer.proto +++ b/proto/zetachain/zetacore/observer/observer.proto @@ -22,13 +22,6 @@ enum ObserverUpdateReason { AdminUpdate = 2; } -// Deprecated: Use ObserverSet instead to get the list of observers -message ObserverMapper { - string index = 1; - pkg.chains.Chain observer_chain = 2; - repeated string observer_list = 4; -} - message ObserverSet { repeated string observer_list = 1; } message LastObserverCount { diff --git a/proto/zetachain/zetacore/observer/params.proto b/proto/zetachain/zetacore/observer/params.proto index 9fbb16123f..254ca3e7ea 100644 --- a/proto/zetachain/zetacore/observer/params.proto +++ b/proto/zetachain/zetacore/observer/params.proto @@ -32,41 +32,8 @@ message ChainParams { bool is_supported = 16; } -// Deprecated(v13): Use ChainParamsList -message ObserverParams { - pkg.chains.Chain chain = 1; - string ballot_threshold = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string min_observer_delegation = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - bool is_supported = 5; -} - -// Deprecated(v14):Moved into the authority module -enum Policy_Type { - option (gogoproto.goproto_enum_stringer) = true; - group1 = 0; - group2 = 1; -} - -// Deprecated(v14):Moved into the authority module -message Admin_Policy { - Policy_Type policy_type = 1; - string address = 2; -} - -// Deprecated +// Deprecated(v17) message Params { - // Deprecated(v13): Use ChainParamsList - repeated ObserverParams observer_params = 1; - - // Deprecated(v14):Moved into the authority module - repeated Admin_Policy admin_policy = 2; - // Deprecated(v17):Moved into the emissions module int64 ballot_maturity_blocks = 3; } \ No newline at end of file diff --git a/proto/zetachain/zetacore/observer/tx.proto b/proto/zetachain/zetacore/observer/tx.proto index 9e5e035f77..7316317fd4 100644 --- a/proto/zetachain/zetacore/observer/tx.proto +++ b/proto/zetachain/zetacore/observer/tx.proto @@ -88,8 +88,8 @@ message MsgUpdateCrosschainFlags { bool isInboundEnabled = 3; bool isOutboundEnabled = 4; GasPriceIncreaseFlags gasPriceIncreaseFlags = 5; - BlockHeaderVerificationFlags blockHeaderVerificationFlags = 6; } + message MsgUpdateCrosschainFlagsResponse {} message MsgUpdateKeygen { diff --git a/testutil/network/genesis_state.go b/testutil/network/genesis_state.go index 412f5e996e..d999e9b9f8 100644 --- a/testutil/network/genesis_state.go +++ b/testutil/network/genesis_state.go @@ -158,10 +158,9 @@ func AddObserverData(t *testing.T, n int, genesisState map[string]json.RawMessag // set crosschain flags crosschainFlags := &observertypes.CrosschainFlags{ - IsInboundEnabled: true, - IsOutboundEnabled: true, - GasPriceIncreaseFlags: &observertypes.DefaultGasPriceIncreaseFlags, - BlockHeaderVerificationFlags: &observertypes.DefaultBlockHeaderVerificationFlags, + IsInboundEnabled: true, + IsOutboundEnabled: true, + GasPriceIncreaseFlags: &observertypes.DefaultGasPriceIncreaseFlags, } nullify.Fill(&crosschainFlags) state.CrosschainFlags = crosschainFlags diff --git a/testutil/sample/observer.go b/testutil/sample/observer.go index ea906c6e57..7b8b80b5a2 100644 --- a/testutil/sample/observer.go +++ b/testutil/sample/observer.go @@ -217,26 +217,6 @@ func NonceToCctxList(t *testing.T, index string, count int) []types.NonceToCctx return list } -func LegacyObserverMapper(t *testing.T, index string, observerList []string) *types.ObserverMapper { - r := newRandFromStringSeed(t, index) - - return &types.ObserverMapper{ - Index: index, - ObserverChain: Chain(r.Int63()), - ObserverList: observerList, - } -} - -func LegacyObserverMapperList(t *testing.T, n int, index string) []*types.ObserverMapper { - r := newRandFromStringSeed(t, index) - observerList := []string{AccAddress(), AccAddress()} - observerMapperList := make([]*types.ObserverMapper, n) - for i := 0; i < n; i++ { - observerMapperList[i] = LegacyObserverMapper(t, fmt.Sprintf("%d-%s", r.Int63(), index), observerList) - } - return observerMapperList -} - func BallotList(n int, observerSet []string) []types.Ballot { r := newRandFromSeed(int64(n)) ballotList := make([]types.Ballot, n) diff --git a/typescript/zetachain/zetacore/observer/crosschain_flags_pb.d.ts b/typescript/zetachain/zetacore/observer/crosschain_flags_pb.d.ts index 2a503abfbe..6acf2efa62 100644 --- a/typescript/zetachain/zetacore/observer/crosschain_flags_pb.d.ts +++ b/typescript/zetachain/zetacore/observer/crosschain_flags_pb.d.ts @@ -56,37 +56,6 @@ export declare class GasPriceIncreaseFlags extends Message | undefined, b: GasPriceIncreaseFlags | PlainMessage | undefined): boolean; } -/** - * Deprecated(v16): Use VerificationFlags in the lightclient module instead - * - * @generated from message zetachain.zetacore.observer.BlockHeaderVerificationFlags - */ -export declare class BlockHeaderVerificationFlags extends Message { - /** - * @generated from field: bool isEthTypeChainEnabled = 1; - */ - isEthTypeChainEnabled: boolean; - - /** - * @generated from field: bool isBtcTypeChainEnabled = 2; - */ - isBtcTypeChainEnabled: boolean; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "zetachain.zetacore.observer.BlockHeaderVerificationFlags"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): BlockHeaderVerificationFlags; - - static fromJson(jsonValue: JsonValue, options?: Partial): BlockHeaderVerificationFlags; - - static fromJsonString(jsonString: string, options?: Partial): BlockHeaderVerificationFlags; - - static equals(a: BlockHeaderVerificationFlags | PlainMessage | undefined, b: BlockHeaderVerificationFlags | PlainMessage | undefined): boolean; -} - /** * @generated from message zetachain.zetacore.observer.CrosschainFlags */ @@ -106,13 +75,6 @@ export declare class CrosschainFlags extends Message { */ gasPriceIncreaseFlags?: GasPriceIncreaseFlags; - /** - * Deprecated(v16): Use VerificationFlags in the lightclient module instead - * - * @generated from field: zetachain.zetacore.observer.BlockHeaderVerificationFlags blockHeaderVerificationFlags = 4; - */ - blockHeaderVerificationFlags?: BlockHeaderVerificationFlags; - constructor(data?: PartialMessage); static readonly runtime: typeof proto3; diff --git a/typescript/zetachain/zetacore/observer/events_pb.d.ts b/typescript/zetachain/zetacore/observer/events_pb.d.ts index 5ef1608966..122ff3672e 100644 --- a/typescript/zetachain/zetacore/observer/events_pb.d.ts +++ b/typescript/zetachain/zetacore/observer/events_pb.d.ts @@ -5,7 +5,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import type { BlockHeaderVerificationFlags, GasPriceIncreaseFlags } from "./crosschain_flags_pb.js"; +import type { GasPriceIncreaseFlags } from "./crosschain_flags_pb.js"; /** * @generated from message zetachain.zetacore.observer.EventBallotCreated @@ -158,11 +158,6 @@ export declare class EventCrosschainFlagsUpdated extends Message); static readonly runtime: typeof proto3; diff --git a/typescript/zetachain/zetacore/observer/observer_pb.d.ts b/typescript/zetachain/zetacore/observer/observer_pb.d.ts index 3bf3e03ac8..04673d8f46 100644 --- a/typescript/zetachain/zetacore/observer/observer_pb.d.ts +++ b/typescript/zetachain/zetacore/observer/observer_pb.d.ts @@ -5,7 +5,6 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import type { Chain } from "../pkg/chains/chains_pb.js"; /** * @generated from enum zetachain.zetacore.observer.ObservationType @@ -57,42 +56,6 @@ export declare enum ObserverUpdateReason { AdminUpdate = 2, } -/** - * Deprecated: Use ObserverSet instead to get the list of observers - * - * @generated from message zetachain.zetacore.observer.ObserverMapper - */ -export declare class ObserverMapper extends Message { - /** - * @generated from field: string index = 1; - */ - index: string; - - /** - * @generated from field: zetachain.zetacore.pkg.chains.Chain observer_chain = 2; - */ - observerChain?: Chain; - - /** - * @generated from field: repeated string observer_list = 4; - */ - observerList: string[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "zetachain.zetacore.observer.ObserverMapper"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ObserverMapper; - - static fromJson(jsonValue: JsonValue, options?: Partial): ObserverMapper; - - static fromJsonString(jsonString: string, options?: Partial): ObserverMapper; - - static equals(a: ObserverMapper | PlainMessage | undefined, b: ObserverMapper | PlainMessage | undefined): boolean; -} - /** * @generated from message zetachain.zetacore.observer.ObserverSet */ diff --git a/typescript/zetachain/zetacore/observer/params_pb.d.ts b/typescript/zetachain/zetacore/observer/params_pb.d.ts index 80e236efbf..e958aa4b08 100644 --- a/typescript/zetachain/zetacore/observer/params_pb.d.ts +++ b/typescript/zetachain/zetacore/observer/params_pb.d.ts @@ -5,24 +5,6 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import type { Chain } from "../pkg/chains/chains_pb.js"; - -/** - * Deprecated(v14):Moved into the authority module - * - * @generated from enum zetachain.zetacore.observer.Policy_Type - */ -export declare enum Policy_Type { - /** - * @generated from enum value: group1 = 0; - */ - group1 = 0, - - /** - * @generated from enum value: group2 = 1; - */ - group2 = 1, -} /** * @generated from message zetachain.zetacore.observer.ChainParamsList @@ -138,97 +120,11 @@ export declare class ChainParams extends Message { } /** - * Deprecated(v13): Use ChainParamsList - * - * @generated from message zetachain.zetacore.observer.ObserverParams - */ -export declare class ObserverParams extends Message { - /** - * @generated from field: zetachain.zetacore.pkg.chains.Chain chain = 1; - */ - chain?: Chain; - - /** - * @generated from field: string ballot_threshold = 3; - */ - ballotThreshold: string; - - /** - * @generated from field: string min_observer_delegation = 4; - */ - minObserverDelegation: string; - - /** - * @generated from field: bool is_supported = 5; - */ - isSupported: boolean; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "zetachain.zetacore.observer.ObserverParams"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ObserverParams; - - static fromJson(jsonValue: JsonValue, options?: Partial): ObserverParams; - - static fromJsonString(jsonString: string, options?: Partial): ObserverParams; - - static equals(a: ObserverParams | PlainMessage | undefined, b: ObserverParams | PlainMessage | undefined): boolean; -} - -/** - * Deprecated(v14):Moved into the authority module - * - * @generated from message zetachain.zetacore.observer.Admin_Policy - */ -export declare class Admin_Policy extends Message { - /** - * @generated from field: zetachain.zetacore.observer.Policy_Type policy_type = 1; - */ - policyType: Policy_Type; - - /** - * @generated from field: string address = 2; - */ - address: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "zetachain.zetacore.observer.Admin_Policy"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): Admin_Policy; - - static fromJson(jsonValue: JsonValue, options?: Partial): Admin_Policy; - - static fromJsonString(jsonString: string, options?: Partial): Admin_Policy; - - static equals(a: Admin_Policy | PlainMessage | undefined, b: Admin_Policy | PlainMessage | undefined): boolean; -} - -/** - * Deprecated + * Deprecated(v17) * * @generated from message zetachain.zetacore.observer.Params */ export declare class Params extends Message { - /** - * Deprecated(v13): Use ChainParamsList - * - * @generated from field: repeated zetachain.zetacore.observer.ObserverParams observer_params = 1; - */ - observerParams: ObserverParams[]; - - /** - * Deprecated(v14):Moved into the authority module - * - * @generated from field: repeated zetachain.zetacore.observer.Admin_Policy admin_policy = 2; - */ - adminPolicy: Admin_Policy[]; - /** * Deprecated(v17):Moved into the emissions module * diff --git a/typescript/zetachain/zetacore/observer/tx_pb.d.ts b/typescript/zetachain/zetacore/observer/tx_pb.d.ts index 6aaa046c6a..1482e2fd44 100644 --- a/typescript/zetachain/zetacore/observer/tx_pb.d.ts +++ b/typescript/zetachain/zetacore/observer/tx_pb.d.ts @@ -9,7 +9,7 @@ import type { ObserverUpdateReason } from "./observer_pb.js"; import type { HeaderData } from "../pkg/proofs/proofs_pb.js"; import type { ChainParams } from "./params_pb.js"; import type { Blame } from "./blame_pb.js"; -import type { BlockHeaderVerificationFlags, GasPriceIncreaseFlags } from "./crosschain_flags_pb.js"; +import type { GasPriceIncreaseFlags } from "./crosschain_flags_pb.js"; import type { ReceiveStatus } from "../pkg/chains/chains_pb.js"; /** @@ -374,11 +374,6 @@ export declare class MsgUpdateCrosschainFlags extends Message); static readonly runtime: typeof proto3; diff --git a/x/observer/genesis.go b/x/observer/genesis.go index 0a40d9a147..ea63b10a24 100644 --- a/x/observer/genesis.go +++ b/x/observer/genesis.go @@ -48,9 +48,6 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) if genState.CrosschainFlags != nil { crosschainFlags.IsOutboundEnabled = genState.CrosschainFlags.IsOutboundEnabled crosschainFlags.IsInboundEnabled = genState.CrosschainFlags.IsInboundEnabled - if genState.CrosschainFlags.BlockHeaderVerificationFlags != nil { - crosschainFlags.BlockHeaderVerificationFlags = genState.CrosschainFlags.BlockHeaderVerificationFlags - } if genState.CrosschainFlags.GasPriceIncreaseFlags != nil { crosschainFlags.GasPriceIncreaseFlags = genState.CrosschainFlags.GasPriceIncreaseFlags } diff --git a/x/observer/keeper/msg_server_update_crosschain_flags.go b/x/observer/keeper/msg_server_update_crosschain_flags.go index bddacf99f9..cbdc2b29ac 100644 --- a/x/observer/keeper/msg_server_update_crosschain_flags.go +++ b/x/observer/keeper/msg_server_update_crosschain_flags.go @@ -35,19 +35,14 @@ func (k msgServer) UpdateCrosschainFlags(goCtx context.Context, msg *types.MsgUp flags.GasPriceIncreaseFlags = msg.GasPriceIncreaseFlags } - if msg.BlockHeaderVerificationFlags != nil { - flags.BlockHeaderVerificationFlags = msg.BlockHeaderVerificationFlags - } - k.SetCrosschainFlags(ctx, flags) err := ctx.EventManager().EmitTypedEvents(&types.EventCrosschainFlagsUpdated{ - MsgTypeUrl: sdk.MsgTypeURL(&types.MsgUpdateCrosschainFlags{}), - IsInboundEnabled: msg.IsInboundEnabled, - IsOutboundEnabled: msg.IsOutboundEnabled, - GasPriceIncreaseFlags: msg.GasPriceIncreaseFlags, - BlockHeaderVerificationFlags: msg.BlockHeaderVerificationFlags, - Signer: msg.Creator, + MsgTypeUrl: sdk.MsgTypeURL(&types.MsgUpdateCrosschainFlags{}), + IsInboundEnabled: msg.IsInboundEnabled, + IsOutboundEnabled: msg.IsOutboundEnabled, + GasPriceIncreaseFlags: msg.GasPriceIncreaseFlags, + Signer: msg.Creator, }) if err != nil { ctx.Logger().Error("Error emitting EventCrosschainFlagsUpdated :", err) diff --git a/x/observer/keeper/msg_server_update_crosschain_flags_test.go b/x/observer/keeper/msg_server_update_crosschain_flags_test.go index 981ccd53dd..4d399ba89b 100644 --- a/x/observer/keeper/msg_server_update_crosschain_flags_test.go +++ b/x/observer/keeper/msg_server_update_crosschain_flags_test.go @@ -34,10 +34,6 @@ func TestMsgServer_UpdateCrosschainFlags(t *testing.T) { RetryInterval: time.Minute * 42, GasPriceIncreasePercent: 42, }, - BlockHeaderVerificationFlags: &types.BlockHeaderVerificationFlags{ - IsEthTypeChainEnabled: true, - IsBtcTypeChainEnabled: false, - }, }) require.NoError(t, err) @@ -48,8 +44,6 @@ func TestMsgServer_UpdateCrosschainFlags(t *testing.T) { require.Equal(t, int64(42), flags.GasPriceIncreaseFlags.EpochLength) require.Equal(t, time.Minute*42, flags.GasPriceIncreaseFlags.RetryInterval) require.Equal(t, uint32(42), flags.GasPriceIncreaseFlags.GasPriceIncreasePercent) - require.True(t, flags.BlockHeaderVerificationFlags.IsEthTypeChainEnabled) - require.False(t, flags.BlockHeaderVerificationFlags.IsBtcTypeChainEnabled) keepertest.MockIsAuthorized(&authorityMock.Mock, admin, authoritytypes.PolicyType_groupOperational, true) @@ -63,10 +57,6 @@ func TestMsgServer_UpdateCrosschainFlags(t *testing.T) { RetryInterval: time.Minute * 43, GasPriceIncreasePercent: 43, }, - BlockHeaderVerificationFlags: &types.BlockHeaderVerificationFlags{ - IsEthTypeChainEnabled: false, - IsBtcTypeChainEnabled: true, - }, }) require.NoError(t, err) @@ -77,8 +67,6 @@ func TestMsgServer_UpdateCrosschainFlags(t *testing.T) { require.Equal(t, int64(43), flags.GasPriceIncreaseFlags.EpochLength) require.Equal(t, time.Minute*43, flags.GasPriceIncreaseFlags.RetryInterval) require.Equal(t, uint32(43), flags.GasPriceIncreaseFlags.GasPriceIncreasePercent) - require.False(t, flags.BlockHeaderVerificationFlags.IsEthTypeChainEnabled) - require.True(t, flags.BlockHeaderVerificationFlags.IsBtcTypeChainEnabled) // group 1 should be able to disable inbound and outbound keepertest.MockIsAuthorized(&authorityMock.Mock, admin, authoritytypes.PolicyType_groupEmergency, true) @@ -98,8 +86,6 @@ func TestMsgServer_UpdateCrosschainFlags(t *testing.T) { require.Equal(t, int64(43), flags.GasPriceIncreaseFlags.EpochLength) require.Equal(t, time.Minute*43, flags.GasPriceIncreaseFlags.RetryInterval) require.Equal(t, uint32(43), flags.GasPriceIncreaseFlags.GasPriceIncreasePercent) - require.False(t, flags.BlockHeaderVerificationFlags.IsEthTypeChainEnabled) - require.True(t, flags.BlockHeaderVerificationFlags.IsBtcTypeChainEnabled) // group 1 should be able to disable header verification keepertest.MockIsAuthorized(&authorityMock.Mock, admin, authoritytypes.PolicyType_groupEmergency, true) @@ -109,10 +95,6 @@ func TestMsgServer_UpdateCrosschainFlags(t *testing.T) { Creator: admin, IsInboundEnabled: false, IsOutboundEnabled: false, - BlockHeaderVerificationFlags: &types.BlockHeaderVerificationFlags{ - IsEthTypeChainEnabled: false, - IsBtcTypeChainEnabled: false, - }, }) require.NoError(t, err) @@ -123,8 +105,6 @@ func TestMsgServer_UpdateCrosschainFlags(t *testing.T) { require.Equal(t, int64(43), flags.GasPriceIncreaseFlags.EpochLength) require.Equal(t, time.Minute*43, flags.GasPriceIncreaseFlags.RetryInterval) require.Equal(t, uint32(43), flags.GasPriceIncreaseFlags.GasPriceIncreasePercent) - require.False(t, flags.BlockHeaderVerificationFlags.IsEthTypeChainEnabled) - require.False(t, flags.BlockHeaderVerificationFlags.IsBtcTypeChainEnabled) // if flags are not defined, default should be used k.RemoveCrosschainFlags(ctx) diff --git a/x/observer/keeper/observer_set_test.go b/x/observer/keeper/observer_set_test.go index d17e496fae..0feec7c1b2 100644 --- a/x/observer/keeper/observer_set_test.go +++ b/x/observer/keeper/observer_set_test.go @@ -113,9 +113,9 @@ func TestKeeper_UpdateObserverAddress(t *testing.T) { k.SetObserverSet(ctx, observerSet) err := k.UpdateObserverAddress(ctx, oldObserverAddress, newObserverAddress) require.NoError(t, err) - observerMappers, found := k.GetObserverSet(ctx) + observerSet, found := k.GetObserverSet(ctx) require.True(t, found) - require.Equal(t, newObserverAddress, observerMappers.ObserverList[len(observerMappers.ObserverList)-1]) + require.Equal(t, newObserverAddress, observerSet.ObserverList[len(observerSet.ObserverList)-1]) }) t.Run("update observer address short observerList", func(t *testing.T) { k, ctx, _, _ := keepertest.ObserverKeeper(t) @@ -126,8 +126,8 @@ func TestKeeper_UpdateObserverAddress(t *testing.T) { k.SetObserverSet(ctx, observerSet) err := k.UpdateObserverAddress(ctx, oldObserverAddress, newObserverAddress) require.NoError(t, err) - observerMappers, found := k.GetObserverSet(ctx) + observerSet, found := k.GetObserverSet(ctx) require.True(t, found) - require.Equal(t, newObserverAddress, observerMappers.ObserverList[len(observerMappers.ObserverList)-1]) + require.Equal(t, newObserverAddress, observerSet.ObserverList[len(observerSet.ObserverList)-1]) }) } diff --git a/x/observer/types/crosschain_flags.go b/x/observer/types/crosschain_flags.go index 697e830e92..5637debe0e 100644 --- a/x/observer/types/crosschain_flags.go +++ b/x/observer/types/crosschain_flags.go @@ -21,21 +21,11 @@ var DefaultGasPriceIncreaseFlags = GasPriceIncreaseFlags{ MaxPendingCctxs: 500, } -// DefaultBlockHeaderVerificationFlags returns the default block header verification flags used when not defined -// Deprecated(v16): VerificationFlags are now read in the `lightclient` module -var DefaultBlockHeaderVerificationFlags = BlockHeaderVerificationFlags{ - IsEthTypeChainEnabled: true, - IsBtcTypeChainEnabled: true, -} - // DefaultCrosschainFlags returns the default crosschain flags used when not defined func DefaultCrosschainFlags() *CrosschainFlags { return &CrosschainFlags{ IsInboundEnabled: true, IsOutboundEnabled: true, GasPriceIncreaseFlags: &DefaultGasPriceIncreaseFlags, - - // Deprecated(v16): VerificationFlags are now read in the `lightclient` module - BlockHeaderVerificationFlags: &DefaultBlockHeaderVerificationFlags, } } diff --git a/x/observer/types/crosschain_flags.pb.go b/x/observer/types/crosschain_flags.pb.go index 85227e2329..d6fe8eb849 100644 --- a/x/observer/types/crosschain_flags.pb.go +++ b/x/observer/types/crosschain_flags.pb.go @@ -107,72 +107,17 @@ func (m *GasPriceIncreaseFlags) GetMaxPendingCctxs() uint32 { return 0 } -// Deprecated(v16): Use VerificationFlags in the lightclient module instead -type BlockHeaderVerificationFlags struct { - IsEthTypeChainEnabled bool `protobuf:"varint,1,opt,name=isEthTypeChainEnabled,proto3" json:"isEthTypeChainEnabled,omitempty"` - IsBtcTypeChainEnabled bool `protobuf:"varint,2,opt,name=isBtcTypeChainEnabled,proto3" json:"isBtcTypeChainEnabled,omitempty"` -} - -func (m *BlockHeaderVerificationFlags) Reset() { *m = BlockHeaderVerificationFlags{} } -func (m *BlockHeaderVerificationFlags) String() string { return proto.CompactTextString(m) } -func (*BlockHeaderVerificationFlags) ProtoMessage() {} -func (*BlockHeaderVerificationFlags) Descriptor() ([]byte, []int) { - return fileDescriptor_f617dc4ef266f323, []int{1} -} -func (m *BlockHeaderVerificationFlags) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockHeaderVerificationFlags) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockHeaderVerificationFlags.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 *BlockHeaderVerificationFlags) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockHeaderVerificationFlags.Merge(m, src) -} -func (m *BlockHeaderVerificationFlags) XXX_Size() int { - return m.Size() -} -func (m *BlockHeaderVerificationFlags) XXX_DiscardUnknown() { - xxx_messageInfo_BlockHeaderVerificationFlags.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockHeaderVerificationFlags proto.InternalMessageInfo - -func (m *BlockHeaderVerificationFlags) GetIsEthTypeChainEnabled() bool { - if m != nil { - return m.IsEthTypeChainEnabled - } - return false -} - -func (m *BlockHeaderVerificationFlags) GetIsBtcTypeChainEnabled() bool { - if m != nil { - return m.IsBtcTypeChainEnabled - } - return false -} - type CrosschainFlags struct { IsInboundEnabled bool `protobuf:"varint,1,opt,name=isInboundEnabled,proto3" json:"isInboundEnabled,omitempty"` IsOutboundEnabled bool `protobuf:"varint,2,opt,name=isOutboundEnabled,proto3" json:"isOutboundEnabled,omitempty"` GasPriceIncreaseFlags *GasPriceIncreaseFlags `protobuf:"bytes,3,opt,name=gasPriceIncreaseFlags,proto3" json:"gasPriceIncreaseFlags,omitempty"` - // Deprecated(v16): Use VerificationFlags in the lightclient module instead - BlockHeaderVerificationFlags *BlockHeaderVerificationFlags `protobuf:"bytes,4,opt,name=blockHeaderVerificationFlags,proto3" json:"blockHeaderVerificationFlags,omitempty"` } func (m *CrosschainFlags) Reset() { *m = CrosschainFlags{} } func (m *CrosschainFlags) String() string { return proto.CompactTextString(m) } func (*CrosschainFlags) ProtoMessage() {} func (*CrosschainFlags) Descriptor() ([]byte, []int) { - return fileDescriptor_f617dc4ef266f323, []int{2} + return fileDescriptor_f617dc4ef266f323, []int{1} } func (m *CrosschainFlags) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -222,13 +167,6 @@ func (m *CrosschainFlags) GetGasPriceIncreaseFlags() *GasPriceIncreaseFlags { return nil } -func (m *CrosschainFlags) GetBlockHeaderVerificationFlags() *BlockHeaderVerificationFlags { - if m != nil { - return m.BlockHeaderVerificationFlags - } - return nil -} - type LegacyCrosschainFlags struct { IsInboundEnabled bool `protobuf:"varint,1,opt,name=isInboundEnabled,proto3" json:"isInboundEnabled,omitempty"` IsOutboundEnabled bool `protobuf:"varint,2,opt,name=isOutboundEnabled,proto3" json:"isOutboundEnabled,omitempty"` @@ -239,7 +177,7 @@ func (m *LegacyCrosschainFlags) Reset() { *m = LegacyCrosschainFlags{} } func (m *LegacyCrosschainFlags) String() string { return proto.CompactTextString(m) } func (*LegacyCrosschainFlags) ProtoMessage() {} func (*LegacyCrosschainFlags) Descriptor() ([]byte, []int) { - return fileDescriptor_f617dc4ef266f323, []int{3} + return fileDescriptor_f617dc4ef266f323, []int{2} } func (m *LegacyCrosschainFlags) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -291,7 +229,6 @@ func (m *LegacyCrosschainFlags) GetGasPriceIncreaseFlags() *GasPriceIncreaseFlag func init() { proto.RegisterType((*GasPriceIncreaseFlags)(nil), "zetachain.zetacore.observer.GasPriceIncreaseFlags") - proto.RegisterType((*BlockHeaderVerificationFlags)(nil), "zetachain.zetacore.observer.BlockHeaderVerificationFlags") proto.RegisterType((*CrosschainFlags)(nil), "zetachain.zetacore.observer.CrosschainFlags") proto.RegisterType((*LegacyCrosschainFlags)(nil), "zetachain.zetacore.observer.LegacyCrosschainFlags") } @@ -301,38 +238,33 @@ func init() { } var fileDescriptor_f617dc4ef266f323 = []byte{ - // 489 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x94, 0x41, 0x8b, 0xd3, 0x40, - 0x14, 0xc7, 0x3b, 0x5d, 0x95, 0x65, 0xca, 0xb2, 0x1a, 0x2d, 0xc6, 0x75, 0xc9, 0x96, 0x9e, 0x8a, - 0x68, 0x22, 0xd1, 0x83, 0x5e, 0x5b, 0x57, 0x0d, 0xac, 0x58, 0x82, 0x78, 0xf0, 0x22, 0x93, 0xc9, - 0xeb, 0x64, 0x30, 0x3b, 0x53, 0x66, 0x26, 0x4b, 0x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0x80, 0x11, 0x3a, 0xbd, 0x80, 0xc5, 0xed, 0x47, 0xa7, 0x33, 0x0f, 0x9d, 0xcd, - 0x3c, 0xf4, 0x6b, 0xe6, 0xa1, 0x4f, 0x73, 0xaf, 0x71, 0x36, 0xf7, 0x1a, 0xdf, 0xe6, 0x5e, 0xe3, - 0x4d, 0xc0, 0xb8, 0xc9, 0x8a, 0xc4, 0xa7, 0xf2, 0xd8, 0x2e, 0xa0, 0x7b, 0x6b, 0xbb, 0x68, 0xf2, - 0x77, 0x1b, 0x99, 0xe9, 0x18, 0x74, 0x72, 0xc5, 0xfe, 0xce, 0x0f, 0x7e, 0x07, 0x00, 0x00, 0xff, - 0xff, 0x0a, 0xf5, 0x31, 0xed, 0xb9, 0x04, 0x00, 0x00, + // 415 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x53, 0x5d, 0x6b, 0xd4, 0x40, + 0x14, 0xcd, 0x6c, 0x55, 0xca, 0x2c, 0xa5, 0x3a, 0xba, 0x18, 0x2b, 0xa4, 0x61, 0x9f, 0x82, 0xe8, + 0x44, 0xe2, 0x8b, 0xcf, 0xad, 0x1f, 0x04, 0x2a, 0x2e, 0x79, 0xf4, 0x45, 0x26, 0x93, 0xdb, 0x49, + 0x20, 0x9d, 0x59, 0x66, 0x26, 0x25, 0xeb, 0xaf, 0xf0, 0x51, 0xfc, 0x45, 0x7d, 0xec, 0x8b, 0x20, + 0x08, 0x2a, 0xbb, 0x7f, 0x44, 0x3a, 0x71, 0xab, 0xcd, 0x46, 0x7f, 0x40, 0xdf, 0x6e, 0xee, 0x39, + 0x27, 0x67, 0xe6, 0x9e, 0xb9, 0x38, 0xf9, 0x00, 0x96, 0xf1, 0x92, 0x55, 0x32, 0x76, 0x95, 0xd2, + 0x10, 0xab, 0xdc, 0x80, 0x3e, 0x05, 0x1d, 0x73, 0xad, 0x8c, 0x71, 0xe0, 0xfb, 0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7, 0x2b, 0x93, 0xca, 0x5c, 0x35, 0xb2, 0x78, 0x29, 0x59, 0x5e, 0x43, 0xe1, 0x66, + 0xb3, 0x9d, 0x6d, 0xf4, 0xc9, 0x63, 0x7c, 0xa7, 0x32, 0x6f, 0x1b, 0x7b, 0x85, 0x3c, 0x72, 0xe4, + 0x4d, 0x80, 0x94, 0x78, 0x22, 0x86, 0x92, 0x70, 0x13, 0x18, 0x27, 0x09, 0xfd, 0x4f, 0xfa, 0x74, + 0x30, 0xc3, 0x6c, 0xf8, 0x87, 0xd3, 0x6f, 0x08, 0x4f, 0x8e, 0x40, 0x30, 0xbe, 0xb8, 0x86, 0xb7, + 0x3b, 0x48, 0xcf, 0x96, 0x01, 0x3a, 0x5f, 0x06, 0xe8, 0xe7, 0x32, 0x40, 0x1f, 0x57, 0x81, 0x77, + 0xbe, 0x0a, 0xbc, 0xaf, 0xab, 0xc0, 0x7b, 0x17, 0x8b, 0xca, 0x96, 0x4d, 0x4e, 0xb9, 0x3a, 0x71, + 0x4b, 0xf7, 0xa4, 0xb7, 0x7f, 0xed, 0x9f, 0x0d, 0xb4, 0x8b, 0x39, 0x98, 0xfc, 0x96, 0x7b, 0xc2, + 0xcf, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0x66, 0xc2, 0x71, 0x2b, 0xad, 0x03, 0x00, 0x00, } func (m *GasPriceIncreaseFlags) Marshal() (dAtA []byte, err error) { @@ -386,49 +318,6 @@ func (m *GasPriceIncreaseFlags) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *BlockHeaderVerificationFlags) 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 *BlockHeaderVerificationFlags) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockHeaderVerificationFlags) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IsBtcTypeChainEnabled { - i-- - if m.IsBtcTypeChainEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.IsEthTypeChainEnabled { - i-- - if m.IsEthTypeChainEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func (m *CrosschainFlags) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -449,18 +338,6 @@ func (m *CrosschainFlags) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.BlockHeaderVerificationFlags != nil { - { - size, err := m.BlockHeaderVerificationFlags.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCrosschainFlags(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } if m.GasPriceIncreaseFlags != nil { { size, err := m.GasPriceIncreaseFlags.MarshalToSizedBuffer(dAtA[:i]) @@ -585,21 +462,6 @@ func (m *GasPriceIncreaseFlags) Size() (n int) { return n } -func (m *BlockHeaderVerificationFlags) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IsEthTypeChainEnabled { - n += 2 - } - if m.IsBtcTypeChainEnabled { - n += 2 - } - return n -} - func (m *CrosschainFlags) Size() (n int) { if m == nil { return 0 @@ -616,10 +478,6 @@ func (m *CrosschainFlags) Size() (n int) { l = m.GasPriceIncreaseFlags.Size() n += 1 + l + sovCrosschainFlags(uint64(l)) } - if m.BlockHeaderVerificationFlags != nil { - l = m.BlockHeaderVerificationFlags.Size() - n += 1 + l + sovCrosschainFlags(uint64(l)) - } return n } @@ -807,96 +665,6 @@ func (m *GasPriceIncreaseFlags) Unmarshal(dAtA []byte) error { } return nil } -func (m *BlockHeaderVerificationFlags) 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 ErrIntOverflowCrosschainFlags - } - 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: BlockHeaderVerificationFlags: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockHeaderVerificationFlags: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsEthTypeChainEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCrosschainFlags - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsEthTypeChainEnabled = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsBtcTypeChainEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCrosschainFlags - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsBtcTypeChainEnabled = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipCrosschainFlags(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCrosschainFlags - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *CrosschainFlags) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1002,42 +770,6 @@ func (m *CrosschainFlags) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeaderVerificationFlags", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCrosschainFlags - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCrosschainFlags - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCrosschainFlags - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BlockHeaderVerificationFlags == nil { - m.BlockHeaderVerificationFlags = &BlockHeaderVerificationFlags{} - } - if err := m.BlockHeaderVerificationFlags.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipCrosschainFlags(dAtA[iNdEx:]) diff --git a/x/observer/types/crosschain_flags_test.go b/x/observer/types/crosschain_flags_test.go index 9939f8b909..ed80bf652f 100644 --- a/x/observer/types/crosschain_flags_test.go +++ b/x/observer/types/crosschain_flags_test.go @@ -11,9 +11,8 @@ func TestDefaultDefaultCrosschainFlags(t *testing.T) { defaultCrosschainFlags := types.DefaultCrosschainFlags() require.Equal(t, &types.CrosschainFlags{ - IsInboundEnabled: true, - IsOutboundEnabled: true, - GasPriceIncreaseFlags: &types.DefaultGasPriceIncreaseFlags, - BlockHeaderVerificationFlags: &types.DefaultBlockHeaderVerificationFlags, + IsInboundEnabled: true, + IsOutboundEnabled: true, + GasPriceIncreaseFlags: &types.DefaultGasPriceIncreaseFlags, }, defaultCrosschainFlags) } diff --git a/x/observer/types/events.pb.go b/x/observer/types/events.pb.go index dd4c971101..ed991d3821 100644 --- a/x/observer/types/events.pb.go +++ b/x/observer/types/events.pb.go @@ -236,12 +236,11 @@ func (m *EventNewObserverAdded) GetObserverLastBlockCount() uint64 { } type EventCrosschainFlagsUpdated struct { - MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` - IsInboundEnabled bool `protobuf:"varint,2,opt,name=isInboundEnabled,proto3" json:"isInboundEnabled,omitempty"` - IsOutboundEnabled bool `protobuf:"varint,3,opt,name=isOutboundEnabled,proto3" json:"isOutboundEnabled,omitempty"` - GasPriceIncreaseFlags *GasPriceIncreaseFlags `protobuf:"bytes,4,opt,name=gasPriceIncreaseFlags,proto3" json:"gasPriceIncreaseFlags,omitempty"` - Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` - BlockHeaderVerificationFlags *BlockHeaderVerificationFlags `protobuf:"bytes,6,opt,name=blockHeaderVerificationFlags,proto3" json:"blockHeaderVerificationFlags,omitempty"` + MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` + IsInboundEnabled bool `protobuf:"varint,2,opt,name=isInboundEnabled,proto3" json:"isInboundEnabled,omitempty"` + IsOutboundEnabled bool `protobuf:"varint,3,opt,name=isOutboundEnabled,proto3" json:"isOutboundEnabled,omitempty"` + GasPriceIncreaseFlags *GasPriceIncreaseFlags `protobuf:"bytes,4,opt,name=gasPriceIncreaseFlags,proto3" json:"gasPriceIncreaseFlags,omitempty"` + Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *EventCrosschainFlagsUpdated) Reset() { *m = EventCrosschainFlagsUpdated{} } @@ -312,13 +311,6 @@ func (m *EventCrosschainFlagsUpdated) GetSigner() string { return "" } -func (m *EventCrosschainFlagsUpdated) GetBlockHeaderVerificationFlags() *BlockHeaderVerificationFlags { - if m != nil { - return m.BlockHeaderVerificationFlags - } - return nil -} - func init() { proto.RegisterType((*EventBallotCreated)(nil), "zetachain.zetacore.observer.EventBallotCreated") proto.RegisterType((*EventKeygenBlockUpdated)(nil), "zetachain.zetacore.observer.EventKeygenBlockUpdated") @@ -331,45 +323,43 @@ func init() { } var fileDescriptor_067e682d8234d605 = []byte{ - // 601 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x41, 0x6f, 0xd3, 0x30, - 0x14, 0x5e, 0xb6, 0x31, 0x81, 0x37, 0xd8, 0x66, 0xb1, 0x2d, 0xeb, 0x50, 0x18, 0x95, 0x90, 0xc6, - 0x80, 0x54, 0x1a, 0xa7, 0x21, 0x2e, 0xb4, 0x1a, 0x5b, 0x05, 0x62, 0x53, 0xc5, 0x38, 0x70, 0x89, - 0x9c, 0xe4, 0x35, 0xb1, 0x9a, 0xda, 0x95, 0xed, 0x0c, 0x8a, 0xc4, 0x91, 0x3b, 0x57, 0xf8, 0x45, - 0x1c, 0x77, 0xe4, 0xc0, 0x01, 0xb5, 0x7f, 0x04, 0xc5, 0x4e, 0xd3, 0x42, 0xab, 0xa8, 0x37, 0xe7, - 0xbd, 0xef, 0xfb, 0xf2, 0xbd, 0xf7, 0xec, 0x87, 0x0e, 0x3e, 0x83, 0x22, 0x41, 0x4c, 0x28, 0xab, - 0xe9, 0x13, 0x17, 0x50, 0xe3, 0xbe, 0x04, 0x71, 0x05, 0xa2, 0x06, 0x57, 0xc0, 0x94, 0x74, 0x7b, - 0x82, 0x2b, 0x8e, 0xf7, 0x0a, 0xa4, 0x3b, 0x42, 0xba, 0x23, 0x64, 0xe5, 0x6e, 0xc4, 0x23, 0xae, - 0x71, 0xb5, 0xec, 0x64, 0x28, 0x95, 0xa3, 0x32, 0xf1, 0x40, 0x70, 0x29, 0x75, 0xd2, 0x6b, 0x27, - 0x24, 0xca, 0x7f, 0x53, 0x39, 0x2c, 0xe3, 0x8c, 0x0e, 0x06, 0x5b, 0xfd, 0x6d, 0x21, 0x7c, 0x92, - 0x79, 0xac, 0x93, 0x24, 0xe1, 0xaa, 0x21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, 0x44, 0xa0, 0x55, 0x2a, 0x5f, 0x6f, 0xfe, 0x1c, 0x38, 0xd6, 0xf5, 0xc0, - 0xb1, 0xfe, 0x0c, 0x1c, 0xeb, 0xdb, 0xd0, 0x59, 0xb8, 0x1e, 0x3a, 0x0b, 0xbf, 0x86, 0xce, 0xc2, - 0x87, 0x5a, 0x44, 0x55, 0x9c, 0xfa, 0x6e, 0xc0, 0xbb, 0x7a, 0xcd, 0x3c, 0xfd, 0x6f, 0xe3, 0x7c, - 0x1a, 0xef, 0x9c, 0x6c, 0x74, 0xd2, 0x5f, 0xd1, 0x1b, 0xe7, 0xd9, 0xdf, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x69, 0x43, 0x49, 0xaf, 0x30, 0x05, 0x00, 0x00, + // 566 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0x8e, 0xd3, 0x52, 0xc1, 0xa5, 0xd0, 0xf4, 0x44, 0x5b, 0x37, 0x95, 0x4c, 0x89, 0x84, 0x54, + 0x0a, 0x38, 0x52, 0x98, 0x40, 0x2c, 0x24, 0x2a, 0x25, 0x02, 0xd1, 0x2a, 0xa2, 0x0b, 0x8b, 0x75, + 0xb6, 0x5f, 0x6d, 0x2b, 0xce, 0x5d, 0x74, 0x77, 0x2e, 0x84, 0x9d, 0x9d, 0x15, 0xf1, 0x0f, 0x31, + 0x76, 0x64, 0x60, 0x40, 0xc9, 0x3f, 0x82, 0xee, 0xce, 0x71, 0x42, 0x13, 0x45, 0xd9, 0xce, 0xdf, + 0xfb, 0xbe, 0xe7, 0xef, 0xfd, 0x42, 0x47, 0x5f, 0x41, 0x92, 0x20, 0x26, 0x09, 0x6d, 0xe8, 0x17, + 0xe3, 0xd0, 0x60, 0xbe, 0x00, 0x7e, 0x05, 0xbc, 0x01, 0x57, 0x40, 0xa5, 0x70, 0x07, 0x9c, 0x49, + 0x86, 0x0f, 0x0a, 0xa6, 0x3b, 0x61, 0xba, 0x13, 0x66, 0xed, 0x7e, 0xc4, 0x22, 0xa6, 0x79, 0x0d, + 0xf5, 0x32, 0x92, 0x5a, 0x73, 0x59, 0xf2, 0x80, 0x33, 0x21, 0x74, 0xd0, 0xbb, 0x4c, 0x49, 0x94, + 0xff, 0xa6, 0x76, 0xbc, 0x4c, 0x33, 0x79, 0x18, 0x6e, 0xfd, 0x8f, 0x85, 0xf0, 0x89, 0xf2, 0xd8, + 0x22, 0x69, 0xca, 0x64, 0x9b, 0x03, 0x91, 0x10, 0xe2, 0x43, 0xb4, 0xd9, 0x17, 0x91, 0x27, 0x87, + 0x03, 0xf0, 0x32, 0x9e, 0xda, 0xd6, 0xa1, 0x75, 0x74, 0xa7, 0x8b, 0xfa, 0x22, 0xfa, 0x38, 0x1c, + 0xc0, 0x05, 0x4f, 0xf1, 0x13, 0xb4, 0xed, 0x6b, 0x89, 0x97, 0x84, 0x40, 0x65, 0x72, 0x99, 0x00, + 0xb7, 0xcb, 0x9a, 0x56, 0x35, 0x81, 0x4e, 0x81, 0xe3, 0xc7, 0xa8, 0x6a, 0xfe, 0x4b, 0x64, 0xc2, + 0xa8, 0x17, 0x13, 0x11, 0xdb, 0x6b, 0x9a, 0xbb, 0x35, 0x83, 0xbf, 0x25, 0x22, 0x56, 0x79, 0x67, + 0xa9, 0xba, 0x0c, 0x7b, 0xdd, 0xe4, 0x9d, 0x09, 0xb4, 0x15, 0x8e, 0x1f, 0xa0, 0x4a, 0x6e, 0x42, + 0x39, 0xb5, 0x6f, 0x19, 0x97, 0x06, 0x52, 0x46, 0xeb, 0xdf, 0x2c, 0xb4, 0xa7, 0xcb, 0x7b, 0x07, + 0xc3, 0x08, 0x68, 0x2b, 0x65, 0x41, 0xef, 0x62, 0x10, 0xae, 0x58, 0xe3, 0x43, 0xb4, 0xd9, 0xd3, + 0x3a, 0xcf, 0x57, 0xc2, 0xbc, 0xbc,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xda, 0x9b, 0x6e, 0x47, 0xa5, + 0xd9, 0x74, 0x97, 0x5c, 0xb4, 0x7b, 0xba, 0x48, 0xd9, 0x5d, 0x9c, 0x10, 0xef, 0xa2, 0x0d, 0x91, + 0x44, 0x14, 0x78, 0xbe, 0xc5, 0xf9, 0x57, 0xab, 0xf3, 0x6b, 0xe4, 0x58, 0xd7, 0x23, 0xc7, 0xfa, + 0x3b, 0x72, 0xac, 0xef, 0x63, 0xa7, 0x74, 0x3d, 0x76, 0x4a, 0xbf, 0xc7, 0x4e, 0xe9, 0x53, 0x23, + 0x4a, 0x64, 0x9c, 0xf9, 0x6e, 0xc0, 0xfa, 0xfa, 0xce, 0x9f, 0xdd, 0x38, 0xf9, 0x2f, 0xd3, 0xa3, + 0x57, 0xbd, 0x13, 0xfe, 0x86, 0x3e, 0xf9, 0xe7, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x7f, 0xe4, + 0xf6, 0x72, 0xb1, 0x04, 0x00, 0x00, } func (m *EventBallotCreated) Marshal() (dAtA []byte, err error) { @@ -550,18 +540,6 @@ func (m *EventCrosschainFlagsUpdated) MarshalToSizedBuffer(dAtA []byte) (int, er _ = i var l int _ = l - if m.BlockHeaderVerificationFlags != nil { - { - size, err := m.BlockHeaderVerificationFlags.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } if len(m.Signer) > 0 { i -= len(m.Signer) copy(dAtA[i:], m.Signer) @@ -724,10 +702,6 @@ func (m *EventCrosschainFlagsUpdated) Size() (n int) { if l > 0 { n += 1 + l + sovEvents(uint64(l)) } - if m.BlockHeaderVerificationFlags != nil { - l = m.BlockHeaderVerificationFlags.Size() - n += 1 + l + sovEvents(uint64(l)) - } return n } @@ -1459,42 +1433,6 @@ func (m *EventCrosschainFlagsUpdated) Unmarshal(dAtA []byte) error { } m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeaderVerificationFlags", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BlockHeaderVerificationFlags == nil { - m.BlockHeaderVerificationFlags = &BlockHeaderVerificationFlags{} - } - if err := m.BlockHeaderVerificationFlags.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) diff --git a/x/observer/types/keys.go b/x/observer/types/keys.go index 2e1e7556c7..eb05d34142 100644 --- a/x/observer/types/keys.go +++ b/x/observer/types/keys.go @@ -54,8 +54,7 @@ const ( // NOTE: CoreParams is old name for AllChainParams we keep it as key value for backward compatibility AllChainParamsKey = "CoreParams" - ObserverMapperKey = "Observer-value-" - ObserverSetKey = "ObserverSet-value-" + ObserverSetKey = "ObserverSet-value-" // CrosschainFlagsKey is the key for the crosschain flags // NOTE: PermissionFlags is old name for CrosschainFlags we keep it as key value for backward compatibility diff --git a/x/observer/types/message_update_crosschain_flags.go b/x/observer/types/message_update_crosschain_flags.go index 112729a64a..27881e0994 100644 --- a/x/observer/types/message_update_crosschain_flags.go +++ b/x/observer/types/message_update_crosschain_flags.go @@ -83,9 +83,5 @@ func (msg *MsgUpdateCrosschainFlags) GetRequiredPolicyType() authoritytypes.Poli if msg.GasPriceIncreaseFlags != nil { return authoritytypes.PolicyType_groupOperational } - if msg.BlockHeaderVerificationFlags != nil && (msg.BlockHeaderVerificationFlags.IsEthTypeChainEnabled || msg.BlockHeaderVerificationFlags.IsBtcTypeChainEnabled) { - return authoritytypes.PolicyType_groupOperational - - } return authoritytypes.PolicyType_groupEmergency } diff --git a/x/observer/types/message_update_crosschain_flags_test.go b/x/observer/types/message_update_crosschain_flags_test.go index 85bb1925ec..bb1a40544b 100644 --- a/x/observer/types/message_update_crosschain_flags_test.go +++ b/x/observer/types/message_update_crosschain_flags_test.go @@ -128,38 +128,20 @@ func TestMsgUpdateCrosschainFlags_GetRequiredPolicyType(t *testing.T) { { name: "disabling outbound and inbound allows group 1", msg: types.MsgUpdateCrosschainFlags{ - Creator: sample.AccAddress(), - IsInboundEnabled: false, - IsOutboundEnabled: false, - BlockHeaderVerificationFlags: nil, - GasPriceIncreaseFlags: nil, - }, - want: authoritytypes.PolicyType_groupEmergency, - }, - { - name: "disabling outbound and inbound and block header verification allows group 1", - msg: types.MsgUpdateCrosschainFlags{ - Creator: sample.AccAddress(), - IsInboundEnabled: false, - IsOutboundEnabled: false, - BlockHeaderVerificationFlags: &types.BlockHeaderVerificationFlags{ - IsEthTypeChainEnabled: false, - IsBtcTypeChainEnabled: false, - }, + Creator: sample.AccAddress(), + IsInboundEnabled: false, + IsOutboundEnabled: false, GasPriceIncreaseFlags: nil, }, want: authoritytypes.PolicyType_groupEmergency, }, + { name: "updating gas price increase flags asserts group 2", msg: types.MsgUpdateCrosschainFlags{ Creator: sample.AccAddress(), IsInboundEnabled: false, IsOutboundEnabled: false, - BlockHeaderVerificationFlags: &types.BlockHeaderVerificationFlags{ - IsEthTypeChainEnabled: false, - IsBtcTypeChainEnabled: false, - }, GasPriceIncreaseFlags: &types.GasPriceIncreaseFlags{ EpochLength: 1, RetryInterval: 1, @@ -172,13 +154,9 @@ func TestMsgUpdateCrosschainFlags_GetRequiredPolicyType(t *testing.T) { { name: "enabling inbound asserts group 2", msg: types.MsgUpdateCrosschainFlags{ - Creator: sample.AccAddress(), - IsInboundEnabled: true, - IsOutboundEnabled: false, - BlockHeaderVerificationFlags: &types.BlockHeaderVerificationFlags{ - IsEthTypeChainEnabled: false, - IsBtcTypeChainEnabled: false, - }, + Creator: sample.AccAddress(), + IsInboundEnabled: true, + IsOutboundEnabled: false, GasPriceIncreaseFlags: nil, }, want: authoritytypes.PolicyType_groupOperational, @@ -186,41 +164,9 @@ func TestMsgUpdateCrosschainFlags_GetRequiredPolicyType(t *testing.T) { { name: "enabling outbound asserts group 2", msg: types.MsgUpdateCrosschainFlags{ - Creator: sample.AccAddress(), - IsInboundEnabled: false, - IsOutboundEnabled: true, - BlockHeaderVerificationFlags: &types.BlockHeaderVerificationFlags{ - IsEthTypeChainEnabled: false, - IsBtcTypeChainEnabled: false, - }, - GasPriceIncreaseFlags: nil, - }, - want: authoritytypes.PolicyType_groupOperational, - }, - { - name: "enabling eth header verification asserts group 2", - msg: types.MsgUpdateCrosschainFlags{ - Creator: sample.AccAddress(), - IsInboundEnabled: false, - IsOutboundEnabled: false, - BlockHeaderVerificationFlags: &types.BlockHeaderVerificationFlags{ - IsEthTypeChainEnabled: true, - IsBtcTypeChainEnabled: false, - }, - GasPriceIncreaseFlags: nil, - }, - want: authoritytypes.PolicyType_groupOperational, - }, - { - name: "enabling btc header verification asserts group 2", - msg: types.MsgUpdateCrosschainFlags{ - Creator: sample.AccAddress(), - IsInboundEnabled: false, - IsOutboundEnabled: false, - BlockHeaderVerificationFlags: &types.BlockHeaderVerificationFlags{ - IsEthTypeChainEnabled: false, - IsBtcTypeChainEnabled: true, - }, + Creator: sample.AccAddress(), + IsInboundEnabled: false, + IsOutboundEnabled: true, GasPriceIncreaseFlags: nil, }, want: authoritytypes.PolicyType_groupOperational, diff --git a/x/observer/types/observer.pb.go b/x/observer/types/observer.pb.go index 0839a9083b..bf3019518c 100644 --- a/x/observer/types/observer.pb.go +++ b/x/observer/types/observer.pb.go @@ -7,7 +7,7 @@ import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" - chains "github.com/zeta-chain/zetacore/pkg/chains" + _ "github.com/zeta-chain/zetacore/pkg/chains" io "io" math "math" math_bits "math/bits" @@ -86,67 +86,6 @@ func (ObserverUpdateReason) EnumDescriptor() ([]byte, []int) { return fileDescriptor_05af1bc65780862e, []int{1} } -// Deprecated: Use ObserverSet instead to get the list of observers -type ObserverMapper struct { - Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` - ObserverChain *chains.Chain `protobuf:"bytes,2,opt,name=observer_chain,json=observerChain,proto3" json:"observer_chain,omitempty"` - ObserverList []string `protobuf:"bytes,4,rep,name=observer_list,json=observerList,proto3" json:"observer_list,omitempty"` -} - -func (m *ObserverMapper) Reset() { *m = ObserverMapper{} } -func (m *ObserverMapper) String() string { return proto.CompactTextString(m) } -func (*ObserverMapper) ProtoMessage() {} -func (*ObserverMapper) Descriptor() ([]byte, []int) { - return fileDescriptor_05af1bc65780862e, []int{0} -} -func (m *ObserverMapper) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ObserverMapper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ObserverMapper.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 *ObserverMapper) XXX_Merge(src proto.Message) { - xxx_messageInfo_ObserverMapper.Merge(m, src) -} -func (m *ObserverMapper) XXX_Size() int { - return m.Size() -} -func (m *ObserverMapper) XXX_DiscardUnknown() { - xxx_messageInfo_ObserverMapper.DiscardUnknown(m) -} - -var xxx_messageInfo_ObserverMapper proto.InternalMessageInfo - -func (m *ObserverMapper) GetIndex() string { - if m != nil { - return m.Index - } - return "" -} - -func (m *ObserverMapper) GetObserverChain() *chains.Chain { - if m != nil { - return m.ObserverChain - } - return nil -} - -func (m *ObserverMapper) GetObserverList() []string { - if m != nil { - return m.ObserverList - } - return nil -} - type ObserverSet struct { ObserverList []string `protobuf:"bytes,1,rep,name=observer_list,json=observerList,proto3" json:"observer_list,omitempty"` } @@ -155,7 +94,7 @@ func (m *ObserverSet) Reset() { *m = ObserverSet{} } func (m *ObserverSet) String() string { return proto.CompactTextString(m) } func (*ObserverSet) ProtoMessage() {} func (*ObserverSet) Descriptor() ([]byte, []int) { - return fileDescriptor_05af1bc65780862e, []int{1} + return fileDescriptor_05af1bc65780862e, []int{0} } func (m *ObserverSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -200,7 +139,7 @@ func (m *LastObserverCount) Reset() { *m = LastObserverCount{} } func (m *LastObserverCount) String() string { return proto.CompactTextString(m) } func (*LastObserverCount) ProtoMessage() {} func (*LastObserverCount) Descriptor() ([]byte, []int) { - return fileDescriptor_05af1bc65780862e, []int{2} + return fileDescriptor_05af1bc65780862e, []int{1} } func (m *LastObserverCount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -246,7 +185,6 @@ func (m *LastObserverCount) GetLastChangeHeight() int64 { func init() { proto.RegisterEnum("zetachain.zetacore.observer.ObservationType", ObservationType_name, ObservationType_value) proto.RegisterEnum("zetachain.zetacore.observer.ObserverUpdateReason", ObserverUpdateReason_name, ObserverUpdateReason_value) - proto.RegisterType((*ObserverMapper)(nil), "zetachain.zetacore.observer.ObserverMapper") proto.RegisterType((*ObserverSet)(nil), "zetachain.zetacore.observer.ObserverSet") proto.RegisterType((*LastObserverCount)(nil), "zetachain.zetacore.observer.LastObserverCount") } @@ -256,86 +194,31 @@ func init() { } var fileDescriptor_05af1bc65780862e = []byte{ - // 437 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xc1, 0x8a, 0x13, 0x41, - 0x10, 0x9d, 0x4e, 0xa2, 0x90, 0x8e, 0x9b, 0x9d, 0x6d, 0x22, 0x84, 0x08, 0x43, 0x58, 0x3d, 0x84, - 0xa0, 0x33, 0xb0, 0x7e, 0x81, 0x1b, 0x44, 0x97, 0x8d, 0x2c, 0x4c, 0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0xda, 0x53, 0x79, 0xf5, 0xdf, 0xd5, 0xac, 0xff, 0x9d, 0x25, 0x6e, - 0x14, 0xe8, 0xe9, 0x63, 0x7b, 0x35, 0xaf, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x6f, 0x46, 0x39, - 0x45, 0xc2, 0x02, 0x00, 0x00, -} - -func (m *ObserverMapper) 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 *ObserverMapper) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ObserverMapper) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ObserverList) > 0 { - for iNdEx := len(m.ObserverList) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ObserverList[iNdEx]) - copy(dAtA[i:], m.ObserverList[iNdEx]) - i = encodeVarintObserver(dAtA, i, uint64(len(m.ObserverList[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if m.ObserverChain != nil { - { - size, err := m.ObserverChain.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintObserver(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Index) > 0 { - i -= len(m.Index) - copy(dAtA[i:], m.Index) - i = encodeVarintObserver(dAtA, i, uint64(len(m.Index))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + // 379 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x51, 0xdf, 0xaa, 0xd3, 0x30, + 0x18, 0x6f, 0xb6, 0x29, 0x9c, 0x1c, 0x8f, 0xa7, 0x0b, 0x13, 0xc6, 0x84, 0x32, 0xe6, 0xcd, 0x18, + 0x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0x29, 0x05, 0x2e, 0xc5, 0xa6, 0x29, 0x19, 0x79, 0x82, + 0xfb, 0x6f, 0x8a, 0x12, 0x1a, 0xfb, 0x99, 0x26, 0x5d, 0x87, 0xdc, 0xe1, 0x9b, 0xa5, 0x98, 0xcb, + 0x5a, 0xa4, 0x9b, 0x83, 0x8b, 0xc8, 0x63, 0x8c, 0xd7, 0x35, 0x58, 0xdc, 0xd1, 0xf2, 0x26, 0x8a, + 0xde, 0xb3, 0xe6, 0x2d, 0x13, 0x6e, 0x57, 0xcb, 0x2d, 0x8c, 0x78, 0x26, 0xdc, 0xde, 0xa8, 0xf7, + 0xe3, 0xbb, 0x87, 0x66, 0x2b, 0x3c, 0xb0, 0xad, 0xdb, 0x32, 0xa5, 0xc0, 0x42, 0x46, 0x95, 0x14, + 0x3a, 0xbc, 0x15, 0x29, 0xfb, 0xc4, 0x05, 0x4b, 0x5d, 0xc7, 0x84, 0x65, 0x11, 0x2b, 0x90, 0x1a, + 0x23, 0x72, 0x8f, 0x6f, 0x5f, 0xa7, 0x05, 0x17, 0x6d, 0xc6, 0xed, 0xb4, 0x6d, 0xf3, 0xe5, 0xcf, + 0x93, 0x87, 0x8e, 0x27, 0x0f, 0xfd, 0x3e, 0x79, 0xe8, 0xdb, 0xd9, 0x73, 0x8e, 0x67, 0xcf, 0xf9, + 0x75, 0xf6, 0x9c, 0x8f, 0x41, 0xc6, 0x21, 0xaf, 0x63, 0x3f, 0x91, 0x85, 0xd9, 0xe3, 0xc5, 0x3f, + 0xd3, 0x1c, 0xfe, 0x6e, 0x0f, 0x4d, 0xc9, 0x54, 0xfc, 0xd0, 0x4c, 0xf3, 0xea, 0x4f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x07, 0xfa, 0x07, 0x46, 0x27, 0x02, 0x00, 0x00, } func (m *ObserverSet) Marshal() (dAtA []byte, err error) { @@ -414,29 +297,6 @@ func encodeVarintObserver(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *ObserverMapper) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Index) - if l > 0 { - n += 1 + l + sovObserver(uint64(l)) - } - if m.ObserverChain != nil { - l = m.ObserverChain.Size() - n += 1 + l + sovObserver(uint64(l)) - } - if len(m.ObserverList) > 0 { - for _, s := range m.ObserverList { - l = len(s) - n += 1 + l + sovObserver(uint64(l)) - } - } - return n -} - func (m *ObserverSet) Size() (n int) { if m == nil { return 0 @@ -473,156 +333,6 @@ func sovObserver(x uint64) (n int) { func sozObserver(x uint64) (n int) { return sovObserver(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *ObserverMapper) 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 ErrIntOverflowObserver - } - 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: ObserverMapper: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ObserverMapper: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowObserver - } - 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 ErrInvalidLengthObserver - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthObserver - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Index = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObserverChain", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowObserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthObserver - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthObserver - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ObserverChain == nil { - m.ObserverChain = &chains.Chain{} - } - if err := m.ObserverChain.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObserverList", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowObserver - } - 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 ErrInvalidLengthObserver - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthObserver - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ObserverList = append(m.ObserverList, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipObserver(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthObserver - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *ObserverSet) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/observer/types/params.pb.go b/x/observer/types/params.pb.go index 87d5332833..5d2b02489a 100644 --- a/x/observer/types/params.pb.go +++ b/x/observer/types/params.pb.go @@ -8,7 +8,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" - chains "github.com/zeta-chain/zetacore/pkg/chains" + _ "github.com/zeta-chain/zetacore/pkg/chains" io "io" math "math" math_bits "math/bits" @@ -25,32 +25,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// Deprecated(v14):Moved into the authority module -type Policy_Type int32 - -const ( - Policy_Type_group1 Policy_Type = 0 - Policy_Type_group2 Policy_Type = 1 -) - -var Policy_Type_name = map[int32]string{ - 0: "group1", - 1: "group2", -} - -var Policy_Type_value = map[string]int32{ - "group1": 0, - "group2": 1, -} - -func (x Policy_Type) String() string { - return proto.EnumName(Policy_Type_name, int32(x)) -} - -func (Policy_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_e7fa4666eddf88e5, []int{0} -} - type ChainParamsList struct { ChainParams []*ChainParams `protobuf:"bytes,1,rep,name=chain_params,json=chainParams,proto3" json:"chain_params,omitempty"` } @@ -229,120 +203,8 @@ func (m *ChainParams) GetIsSupported() bool { return false } -// Deprecated(v13): Use ChainParamsList -type ObserverParams struct { - Chain *chains.Chain `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` - BallotThreshold github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=ballot_threshold,json=ballotThreshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"ballot_threshold"` - MinObserverDelegation github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=min_observer_delegation,json=minObserverDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_observer_delegation"` - IsSupported bool `protobuf:"varint,5,opt,name=is_supported,json=isSupported,proto3" json:"is_supported,omitempty"` -} - -func (m *ObserverParams) Reset() { *m = ObserverParams{} } -func (m *ObserverParams) String() string { return proto.CompactTextString(m) } -func (*ObserverParams) ProtoMessage() {} -func (*ObserverParams) Descriptor() ([]byte, []int) { - return fileDescriptor_e7fa4666eddf88e5, []int{2} -} -func (m *ObserverParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ObserverParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ObserverParams.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 *ObserverParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_ObserverParams.Merge(m, src) -} -func (m *ObserverParams) XXX_Size() int { - return m.Size() -} -func (m *ObserverParams) XXX_DiscardUnknown() { - xxx_messageInfo_ObserverParams.DiscardUnknown(m) -} - -var xxx_messageInfo_ObserverParams proto.InternalMessageInfo - -func (m *ObserverParams) GetChain() *chains.Chain { - if m != nil { - return m.Chain - } - return nil -} - -func (m *ObserverParams) GetIsSupported() bool { - if m != nil { - return m.IsSupported - } - return false -} - -// Deprecated(v14):Moved into the authority module -type Admin_Policy struct { - PolicyType Policy_Type `protobuf:"varint,1,opt,name=policy_type,json=policyType,proto3,enum=zetachain.zetacore.observer.Policy_Type" json:"policy_type,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *Admin_Policy) Reset() { *m = Admin_Policy{} } -func (m *Admin_Policy) String() string { return proto.CompactTextString(m) } -func (*Admin_Policy) ProtoMessage() {} -func (*Admin_Policy) Descriptor() ([]byte, []int) { - return fileDescriptor_e7fa4666eddf88e5, []int{3} -} -func (m *Admin_Policy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Admin_Policy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Admin_Policy.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 *Admin_Policy) XXX_Merge(src proto.Message) { - xxx_messageInfo_Admin_Policy.Merge(m, src) -} -func (m *Admin_Policy) XXX_Size() int { - return m.Size() -} -func (m *Admin_Policy) XXX_DiscardUnknown() { - xxx_messageInfo_Admin_Policy.DiscardUnknown(m) -} - -var xxx_messageInfo_Admin_Policy proto.InternalMessageInfo - -func (m *Admin_Policy) GetPolicyType() Policy_Type { - if m != nil { - return m.PolicyType - } - return Policy_Type_group1 -} - -func (m *Admin_Policy) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -// Deprecated +// Deprecated(v17) type Params struct { - // Deprecated(v13): Use ChainParamsList - ObserverParams []*ObserverParams `protobuf:"bytes,1,rep,name=observer_params,json=observerParams,proto3" json:"observer_params,omitempty"` - // Deprecated(v14):Moved into the authority module - AdminPolicy []*Admin_Policy `protobuf:"bytes,2,rep,name=admin_policy,json=adminPolicy,proto3" json:"admin_policy,omitempty"` // Deprecated(v17):Moved into the emissions module BallotMaturityBlocks int64 `protobuf:"varint,3,opt,name=ballot_maturity_blocks,json=ballotMaturityBlocks,proto3" json:"ballot_maturity_blocks,omitempty"` } @@ -351,7 +213,7 @@ func (m *Params) Reset() { *m = Params{} } func (m *Params) String() string { return proto.CompactTextString(m) } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_e7fa4666eddf88e5, []int{4} + return fileDescriptor_e7fa4666eddf88e5, []int{2} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -380,20 +242,6 @@ func (m *Params) XXX_DiscardUnknown() { var xxx_messageInfo_Params proto.InternalMessageInfo -func (m *Params) GetObserverParams() []*ObserverParams { - if m != nil { - return m.ObserverParams - } - return nil -} - -func (m *Params) GetAdminPolicy() []*Admin_Policy { - if m != nil { - return m.AdminPolicy - } - return nil -} - func (m *Params) GetBallotMaturityBlocks() int64 { if m != nil { return m.BallotMaturityBlocks @@ -402,11 +250,8 @@ func (m *Params) GetBallotMaturityBlocks() int64 { } func init() { - proto.RegisterEnum("zetachain.zetacore.observer.Policy_Type", Policy_Type_name, Policy_Type_value) proto.RegisterType((*ChainParamsList)(nil), "zetachain.zetacore.observer.ChainParamsList") proto.RegisterType((*ChainParams)(nil), "zetachain.zetacore.observer.ChainParams") - proto.RegisterType((*ObserverParams)(nil), "zetachain.zetacore.observer.ObserverParams") - proto.RegisterType((*Admin_Policy)(nil), "zetachain.zetacore.observer.Admin_Policy") proto.RegisterType((*Params)(nil), "zetachain.zetacore.observer.Params") } @@ -415,58 +260,47 @@ func init() { } var fileDescriptor_e7fa4666eddf88e5 = []byte{ - // 803 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x95, 0x41, 0x8f, 0xdb, 0x44, - 0x14, 0xc7, 0xe3, 0x24, 0x9b, 0x6e, 0x9f, 0xd3, 0x24, 0xb5, 0x0a, 0x98, 0xac, 0x70, 0x43, 0x84, - 0x90, 0xd9, 0x6a, 0x6d, 0x08, 0x9c, 0x10, 0x1c, 0x76, 0xd3, 0x4b, 0xc4, 0x22, 0x56, 0x6e, 0x38, - 0xc0, 0x81, 0xd1, 0x64, 0x3c, 0x75, 0x46, 0x71, 0x3c, 0xd6, 0xcc, 0xb8, 0x24, 0x7c, 0x0a, 0xbe, - 0x03, 0x1c, 0x38, 0xf3, 0x29, 0x7a, 0xec, 0x11, 0x71, 0xa8, 0x50, 0xf6, 0x8b, 0x20, 0x8f, 0xed, - 0x34, 0xbb, 0x59, 0x05, 0x09, 0xa9, 0x27, 0xbf, 0x99, 0xf7, 0x7b, 0x7f, 0x3f, 0xbf, 0x79, 0xcf, - 0x03, 0xee, 0x2f, 0x54, 0x61, 0x32, 0xc7, 0x2c, 0xf1, 0xb5, 0xc5, 0x05, 0xf5, 0xf9, 0x4c, 0x52, - 0xf1, 0x82, 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83, 0xef, 0xbc, 0x79, 0xce, 0x41, 0x87, 0xdf, 0x3c, 0xf7, 0x4b, 0x68, - 0x63, 0xfd, 0x55, 0x45, 0x3a, 0x76, 0x5d, 0x4b, 0x7e, 0x72, 0x50, 0x72, 0xb7, 0x0c, 0x81, 0xa9, - 0xc3, 0xcb, 0x9a, 0x7c, 0x01, 0xef, 0x96, 0x9d, 0xb0, 0xc4, 0x2a, 0x13, 0x4c, 0xad, 0xd1, 0x2c, - 0xe6, 0x64, 0x21, 0x75, 0x3f, 0x34, 0x82, 0x47, 0x85, 0xf7, 0xdb, 0xd2, 0x79, 0xa1, 0x7d, 0xa7, - 0x4f, 0xc0, 0xdc, 0xa9, 0x8c, 0x05, 0xd0, 0x8a, 0x04, 0xcf, 0xd2, 0xcf, 0x7a, 0xb5, 0xad, 0x3d, - 0xea, 0x19, 0xfd, 0xe6, 0x1f, 0xbf, 0x3b, 0xc6, 0xc5, 0xe4, 0xe5, 0xc6, 0x31, 0x5e, 0x6d, 0x1c, - 0xe3, 0x9f, 0x8d, 0x63, 0xfc, 0x7a, 0xed, 0xd4, 0x5e, 0x5d, 0x3b, 0xb5, 0xbf, 0xae, 0x9d, 0xda, - 0x8f, 0xfe, 0x4e, 0x0b, 0xe4, 0x49, 0x9f, 0xdd, 0xba, 0x93, 0x56, 0x6f, 0x6e, 0x30, 0xdd, 0x0f, - 0xb3, 0x96, 0xbe, 0x93, 0x3e, 0xff, 0x37, 0x00, 0x00, 0xff, 0xff, 0xc1, 0xb1, 0xf6, 0xf3, 0x4a, - 0x07, 0x00, 0x00, + // 636 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xc1, 0x4e, 0xdb, 0x4c, + 0x10, 0xc7, 0xe3, 0x2f, 0x7c, 0x14, 0x36, 0x81, 0x80, 0x45, 0x5b, 0x37, 0xa8, 0x26, 0xcd, 0xa1, + 0xb2, 0x90, 0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c5, 0x21, 0xc5, 0x14, 0xf2, 0x54, 0x59, + 0x46, 0xcf, 0x70, 0x16, 0xfc, 0xf5, 0x59, 0x65, 0x50, 0x08, 0xa6, 0x83, 0xd6, 0x42, 0x22, 0x71, + 0x26, 0x38, 0x65, 0x58, 0x71, 0x3a, 0x66, 0xc2, 0xfa, 0x4f, 0xc3, 0xab, 0x21, 0x91, 0xc7, 0x45, + 0x78, 0xa8, 0xa3, 0x66, 0x0f, 0xb5, 0x79, 0x8a, 0xd5, 0xa4, 0xa6, 0x9a, 0x9a, 0x42, 0x3c, 0x1d, + 0x4e, 0x2a, 0xa2, 0x8f, 0x56, 0x20, 0x57, 0x33, 0xc8, 0x82, 0x46, 0x5a, 0x90, 0xab, 0x29, 0xb3, + 0x8d, 0xd6, 0xbf, 0x12, 0x45, 0x23, 0x9c, 0xab, 0x09, 0xd4, 0xdc, 0xff, 0x9a, 0xeb, 0x68, 0xe1, + 0xa3, 0x9a, 0x40, 0xc5, 0xbe, 0x41, 0xfa, 0x89, 0xb1, 0x82, 0x31, 0x2b, 0x2e, 0x92, 0x2a, 0x41, + 0xa8, 0xc2, 0x24, 0x08, 0x04, 0x93, 0xd2, 0x5a, 0xea, 0x19, 0xce, 0xb2, 0x6f, 0x15, 0xc8, 0xb0, + 0x20, 0x06, 0x15, 0xb0, 0x57, 0xea, 0xe6, 0x6b, 0xd4, 0xa5, 0x90, 0xa6, 0x8c, 0x2a, 0x10, 0xf7, + 0xb3, 0x97, 0xcb, 0xec, 0x29, 0x71, 0x37, 0x7b, 0x80, 0x6c, 0x26, 0xe8, 0xee, 0x0b, 0x4c, 0x73, + 0xa9, 0x20, 0x38, 0xbf, 0xef, 0x80, 0xb4, 0xc3, 0xa6, 0xa6, 0x06, 0x25, 0x74, 0xd7, 0x64, 0x0f, + 0x3d, 0x85, 0x5c, 0x8d, 0x20, 0x4f, 0x83, 0xe2, 0x6f, 0x91, 0x34, 0x62, 0x41, 0x1e, 0x33, 0xcc, + 0x53, 0xc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0xdb, 0xb8, 0xbc, 0xb6, 0x8d, 0xdf, 0xd7, 0xb6, 0xf1, 0xfd, + 0xc6, 0x6e, 0x5c, 0xde, 0xd8, 0x8d, 0x9f, 0x37, 0x76, 0xe3, 0xb3, 0x37, 0x53, 0x7b, 0xd1, 0x6f, + 0x3b, 0x77, 0xe6, 0xc2, 0xe4, 0x76, 0x8a, 0xe8, 0x8b, 0x8c, 0x16, 0xf5, 0x5c, 0x78, 0xf9, 0x27, + 0x00, 0x00, 0xff, 0xff, 0xc3, 0x14, 0xe1, 0x27, 0xce, 0x04, 0x00, 0x00, } func (m *ChainParamsList) Marshal() (dAtA []byte, err error) { @@ -622,106 +456,6 @@ func (m *ChainParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ObserverParams) 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 *ObserverParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ObserverParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IsSupported { - i-- - if m.IsSupported { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - { - size := m.MinObserverDelegation.Size() - i -= size - if _, err := m.MinObserverDelegation.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size := m.BallotThreshold.Size() - i -= size - if _, err := m.BallotThreshold.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if m.Chain != nil { - { - size, err := m.Chain.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Admin_Policy) 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 *Admin_Policy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Admin_Policy) 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 = encodeVarintParams(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x12 - } - if m.PolicyType != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.PolicyType)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func (m *Params) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -747,34 +481,6 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x18 } - if len(m.AdminPolicy) > 0 { - for iNdEx := len(m.AdminPolicy) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AdminPolicy[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.ObserverParams) > 0 { - for iNdEx := len(m.ObserverParams) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ObserverParams[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } return len(dAtA) - i, nil } @@ -856,60 +562,12 @@ func (m *ChainParams) Size() (n int) { return n } -func (m *ObserverParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Chain != nil { - l = m.Chain.Size() - n += 1 + l + sovParams(uint64(l)) - } - l = m.BallotThreshold.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.MinObserverDelegation.Size() - n += 1 + l + sovParams(uint64(l)) - if m.IsSupported { - n += 2 - } - return n -} - -func (m *Admin_Policy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PolicyType != 0 { - n += 1 + sovParams(uint64(m.PolicyType)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovParams(uint64(l)) - } - return n -} - func (m *Params) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.ObserverParams) > 0 { - for _, e := range m.ObserverParams { - l = e.Size() - n += 1 + l + sovParams(uint64(l)) - } - } - if len(m.AdminPolicy) > 0 { - for _, e := range m.AdminPolicy { - l = e.Size() - n += 1 + l + sovParams(uint64(l)) - } - } if m.BallotMaturityBlocks != 0 { n += 1 + sovParams(uint64(m.BallotMaturityBlocks)) } @@ -1392,7 +1050,7 @@ func (m *ChainParams) Unmarshal(dAtA []byte) error { } return nil } -func (m *ObserverParams) Unmarshal(dAtA []byte) error { +func (m *Params) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1415,355 +1073,12 @@ func (m *ObserverParams) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ObserverParams: wiretype end group for non-group") + return fmt.Errorf("proto: Params: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ObserverParams: 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 Chain", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Chain == nil { - m.Chain = &chains.Chain{} - } - if err := m.Chain.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BallotThreshold", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - 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 ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.BallotThreshold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinObserverDelegation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - 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 ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MinObserverDelegation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsSupported", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsSupported = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Admin_Policy) 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 ErrIntOverflowParams - } - 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: Admin_Policy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Admin_Policy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PolicyType", wireType) - } - m.PolicyType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PolicyType |= Policy_Type(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 ErrIntOverflowParams - } - 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 ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -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 ErrIntOverflowParams - } - 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 ObserverParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ObserverParams = append(m.ObserverParams, &ObserverParams{}) - if err := m.ObserverParams[len(m.ObserverParams)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AdminPolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AdminPolicy = append(m.AdminPolicy, &Admin_Policy{}) - if err := m.AdminPolicy[len(m.AdminPolicy)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field BallotMaturityBlocks", wireType) diff --git a/x/observer/types/tx.pb.go b/x/observer/types/tx.pb.go index 74321f37c3..cb1d69eac1 100644 --- a/x/observer/types/tx.pb.go +++ b/x/observer/types/tx.pb.go @@ -639,11 +639,10 @@ func (m *MsgAddBlameVoteResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgAddBlameVoteResponse proto.InternalMessageInfo type MsgUpdateCrosschainFlags struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - IsInboundEnabled bool `protobuf:"varint,3,opt,name=isInboundEnabled,proto3" json:"isInboundEnabled,omitempty"` - IsOutboundEnabled bool `protobuf:"varint,4,opt,name=isOutboundEnabled,proto3" json:"isOutboundEnabled,omitempty"` - GasPriceIncreaseFlags *GasPriceIncreaseFlags `protobuf:"bytes,5,opt,name=gasPriceIncreaseFlags,proto3" json:"gasPriceIncreaseFlags,omitempty"` - BlockHeaderVerificationFlags *BlockHeaderVerificationFlags `protobuf:"bytes,6,opt,name=blockHeaderVerificationFlags,proto3" json:"blockHeaderVerificationFlags,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + IsInboundEnabled bool `protobuf:"varint,3,opt,name=isInboundEnabled,proto3" json:"isInboundEnabled,omitempty"` + IsOutboundEnabled bool `protobuf:"varint,4,opt,name=isOutboundEnabled,proto3" json:"isOutboundEnabled,omitempty"` + GasPriceIncreaseFlags *GasPriceIncreaseFlags `protobuf:"bytes,5,opt,name=gasPriceIncreaseFlags,proto3" json:"gasPriceIncreaseFlags,omitempty"` } func (m *MsgUpdateCrosschainFlags) Reset() { *m = MsgUpdateCrosschainFlags{} } @@ -707,13 +706,6 @@ func (m *MsgUpdateCrosschainFlags) GetGasPriceIncreaseFlags() *GasPriceIncreaseF return nil } -func (m *MsgUpdateCrosschainFlags) GetBlockHeaderVerificationFlags() *BlockHeaderVerificationFlags { - if m != nil { - return m.BlockHeaderVerificationFlags - } - return nil -} - type MsgUpdateCrosschainFlagsResponse struct { } @@ -1098,83 +1090,81 @@ func init() { } var fileDescriptor_eda6e3b1d16a4021 = []byte{ - // 1209 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x49, 0x6f, 0xdb, 0xc6, - 0x17, 0x37, 0xe3, 0xc4, 0x96, 0x9f, 0x77, 0xfe, 0xed, 0x44, 0x96, 0x63, 0xfd, 0x0d, 0xa2, 0x69, - 0x94, 0xd4, 0x95, 0x6c, 0xa5, 0x5b, 0x0a, 0xf4, 0x60, 0x27, 0x8d, 0xed, 0xa6, 0x8e, 0x0d, 0xca, - 0xf5, 0x21, 0x17, 0x62, 0x44, 0x8e, 0x28, 0xd6, 0xf4, 0x8c, 0xc0, 0x19, 0x79, 0x49, 0x17, 0xa0, - 0xc7, 0x1e, 0x8a, 0xf6, 0x03, 0xf4, 0x8b, 0xf4, 0xde, 0x43, 0x7a, 0x0b, 0x7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0x90, 0xe3, 0x04, 0x98, 0xb1, 0xf4, 0x0d, 0x01, 0xd3, 0xa9, 0xef, 0x44, 0x4a, - 0x36, 0xe5, 0x49, 0xc8, 0x20, 0xf8, 0xac, 0x93, 0x31, 0x2a, 0x19, 0x04, 0x9f, 0xb5, 0x33, 0x8e, - 0x60, 0xba, 0x2e, 0xfc, 0xb1, 0x02, 0x8c, 0x18, 0x25, 0xe9, 0x9b, 0xab, 0x5a, 0x6e, 0xa6, 0xb8, - 0x91, 0x4f, 0x28, 0xa1, 0x7c, 0xa4, 0x44, 0x46, 0x62, 0x0a, 0xa2, 0x39, 0x55, 0x6f, 0x7a, 0x32, - 0x96, 0x61, 0xa9, 0x23, 0x54, 0x13, 0xb3, 0x1a, 0x25, 0x0c, 0x1b, 0xbf, 0x69, 0xa0, 0xef, 0x31, - 0xf7, 0x88, 0x72, 0xbc, 0xe5, 0x53, 0xfb, 0x78, 0x07, 0x23, 0x27, 0x31, 0x13, 0x4b, 0x90, 0x92, - 0x55, 0xe5, 0x39, 0x22, 0xfa, 0x51, 0x73, 0x5c, 0x3c, 0xef, 0x3a, 0xfa, 0x0a, 0x40, 0x39, 0xd4, - 0x61, 0x55, 0x11, 0xab, 0x8a, 0x40, 0xa7, 0xcc, 0x09, 0x21, 0xd9, 0x41, 0xac, 0xaa, 0xdf, 0x86, - 0xb1, 0x2a, 0xf6, 0xdc, 0x2a, 0x17, 0x81, 0x8d, 0x9a, 0xea, 0x49, 0xdf, 0x0e, 0xe5, 0xa1, 0xd5, - 0xf4, 0xad, 0x55, 0x2d, 0x37, 0x59, 0x7c, 0xd0, 0x2d, 0xe0, 0xda, 0xb1, 0x9b, 0x57, 0x37, 0x28, - 0x5d, 0x7c, 0x8a, 0x38, 0xda, 0xba, 0xf9, 0xfa, 0xcf, 0xff, 0x8f, 0x98, 0x8a, 0x6e, 0x7c, 0x09, - 0x99, 0xce, 0x50, 0xa2, 0x48, 0xf5, 0x7b, 0x30, 0x53, 0x46, 0xbe, 0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0x00, 0x7f, 0xd4, 0x60, 0x56, 0x1e, 0x6d, 0x85, 0xd3, 0x37, 0x2c, 0xb0, 0xeb, 0x35, 0xc8, - 0x76, 0xd8, 0x20, 0xe8, 0x04, 0x5b, 0x1e, 0xa9, 0x50, 0x11, 0xc2, 0x64, 0xd1, 0x48, 0xac, 0x00, - 0x61, 0x50, 0x95, 0xf9, 0x84, 0xe0, 0xee, 0x92, 0x0a, 0x35, 0x96, 0xe0, 0x4e, 0x9b, 0x43, 0xb1, - 0xb3, 0xff, 0xdc, 0x80, 0x74, 0xa3, 0x36, 0xe2, 0x25, 0xf0, 0x2c, 0xdc, 0x01, 0x09, 0x5e, 0x3f, - 0x84, 0x39, 0x8f, 0xed, 0x92, 0x32, 0xad, 0x13, 0xe7, 0x53, 0x82, 0xca, 0x3e, 0x76, 0x84, 0x83, - 0x29, 0xb3, 0x43, 0xae, 0xaf, 0xc1, 0xbc, 0xc7, 0xf6, 0xeb, 0xbc, 0x05, 0x2c, 0x13, 0xdb, 0x79, - 0xa0, 0x57, 0x61, 0xd1, 0x45, 0xec, 0x20, 0xf0, 0x6c, 0xbc, 0x4b, 0x42, 0x73, 0x0c, 0x0b, 0x67, - 0x54, 0xb7, 0x17, 0x13, 0xe3, 0xdf, 0xee, 0xc6, 0x34, 0xbb, 0x2b, 0xd4, 0xbf, 0x81, 0xbb, 0xe5, - 0x46, 0xe3, 0x1f, 0xe1, 0xc0, 0xab, 0x78, 0x36, 0xe2, 0x1e, 0x95, 0xd1, 0xa7, 0xc7, 0x84, 0xc1, - 0xc7, 0x7d, 0x12, 0xde, 0x5b, 0x81, 0x99, 0xa8, 0xde, 0x30, 0x60, 0xb5, 0x57, 0xe2, 0xe3, 0xdb, - 0xd9, 0x14, 0x95, 0x24, 0x31, 0xcf, 0xf1, 0x85, 0x8b, 0x49, 0xc2, 0x9d, 0x2c, 0xc0, 0x2d, 0x61, - 0x50, 0x95, 0x91, 0x7c, 0x50, 0x77, 0xdf, 0xac, 0x22, 0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, 0x79, 0x9b, 0x9e, 0x88, 0xef, 0xbe, 0x77, 0xdb, 0x3e, 0x01, 0xcf, 0x9b, - 0xbe, 0x2b, 0x2f, 0x6a, 0x98, 0x95, 0xc7, 0xc4, 0x27, 0xe0, 0xa3, 0x7f, 0x03, 0x00, 0x00, 0xff, - 0xff, 0x81, 0x6a, 0x61, 0x4c, 0xc1, 0x0f, 0x00, 0x00, + // 1176 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcb, 0x73, 0xdb, 0x44, + 0x18, 0x8f, 0x48, 0x9b, 0x38, 0x5f, 0xde, 0x22, 0x69, 0x1d, 0x85, 0x98, 0x8c, 0x86, 0x52, 0xb7, + 0x04, 0x3b, 0x71, 0x79, 0xcf, 0x70, 0x48, 0x5a, 0x9a, 0x84, 0x92, 0x26, 0x23, 0x87, 0x1e, 0x7a, + 0xd1, 0xac, 0xa5, 0x8d, 0x24, 0xa2, 0xec, 0x7a, 0xb4, 0xeb, 0x3c, 0x0a, 0xc3, 0x0c, 0x47, 0x0e, + 0x0c, 0xfc, 0x01, 0xfc, 0x23, 0xdc, 0x39, 0x94, 0x5b, 0x87, 0x13, 0x27, 0x86, 0x49, 0x4e, 0xfc, + 0x07, 0x1c, 0x19, 0xed, 0xae, 0x14, 0xbf, 0x22, 0xdb, 0x99, 0xe9, 0xc9, 0xd2, 0xb7, 0xbf, 0xdf, + 0xf7, 0xda, 0xef, 0x61, 0xc1, 0x3b, 0x2f, 0x30, 0x47, 0x8e, 0x8f, 0x02, 0x52, 0x16, 0x4f, 0x34, + 0xc2, 0x65, 0x5a, 0x63, 0x38, 0x3a, 0xc6, 0x51, 0x99, 0x9f, 0x96, 0xea, 0x11, 0xe5, 0x54, 0x5f, + 0x4c, 0x51, 0xa5, 0x04, 0x55, 0x4a, 0x50, 0xc6, 0x9c, 0x47, 0x3d, 0x2a, 0x70, 0xe5, 0xf8,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0xa9, 0x93, 0xe8, 0xde, 0x39, 0xe8, 0x36, 0x78, + 0xf5, 0x6f, 0x61, 0xba, 0xfd, 0x2f, 0x6c, 0xb9, 0x97, 0xa2, 0x36, 0x82, 0xf1, 0xf1, 0x80, 0x84, + 0xd4, 0xf8, 0xf7, 0x30, 0xd3, 0x31, 0xf1, 0x57, 0x7b, 0xd7, 0x50, 0x2b, 0xc3, 0xf8, 0x64, 0x50, + 0x46, 0x6a, 0xdf, 0x81, 0xd1, 0x64, 0x66, 0xdf, 0xed, 0x27, 0x86, 0xfd, 0x6a, 0xd5, 0x28, 0xf7, + 0x09, 0x4c, 0x8c, 0x6c, 0x6c, 0xbf, 0x3c, 0x2f, 0x68, 0xaf, 0xce, 0x0b, 0xda, 0x3f, 0xe7, 0x05, + 0xed, 0x97, 0x8b, 0xc2, 0xd0, 0xab, 0x8b, 0xc2, 0xd0, 0x5f, 0x17, 0x85, 0xa1, 0xe7, 0x65, 0x2f, + 0xe0, 0x7e, 0xa3, 0x56, 0x72, 0xe8, 0x91, 0xf8, 0xf0, 0x7a, 0xbf, 0xed, 0x1b, 0xec, 0xb4, 0xe9, + 0xc3, 0xee, 0xac, 0x8e, 0x59, 0x6d, 0x44, 0x7c, 0x83, 0x3d, 0xf8, 0x3f, 0x00, 0x00, 0xff, 0xff, + 0x57, 0xa3, 0x79, 0xf2, 0x42, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2041,18 +2031,6 @@ func (m *MsgUpdateCrosschainFlags) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l - if m.BlockHeaderVerificationFlags != nil { - { - size, err := m.BlockHeaderVerificationFlags.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } if m.GasPriceIncreaseFlags != nil { { size, err := m.GasPriceIncreaseFlags.MarshalToSizedBuffer(dAtA[:i]) @@ -2559,10 +2537,6 @@ func (m *MsgUpdateCrosschainFlags) Size() (n int) { l = m.GasPriceIncreaseFlags.Size() n += 1 + l + sovTx(uint64(l)) } - if m.BlockHeaderVerificationFlags != nil { - l = m.BlockHeaderVerificationFlags.Size() - n += 1 + l + sovTx(uint64(l)) - } return n } @@ -4026,42 +4000,6 @@ func (m *MsgUpdateCrosschainFlags) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeaderVerificationFlags", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BlockHeaderVerificationFlags == nil { - m.BlockHeaderVerificationFlags = &BlockHeaderVerificationFlags{} - } - if err := m.BlockHeaderVerificationFlags.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/zetaclient/chains/bitcoin/observer/inbound.go b/zetaclient/chains/bitcoin/observer/inbound.go index a8468a3eb7..d4ac1d727c 100644 --- a/zetaclient/chains/bitcoin/observer/inbound.go +++ b/zetaclient/chains/bitcoin/observer/inbound.go @@ -95,8 +95,10 @@ func (ob *Observer) ObserveInTx() error { // add block header to zetacore // TODO: consider having a separate ticker(from TSS scaning) for posting block headers // https://github.com/zeta-chain/node/issues/1847 - flags := ob.coreContext.GetCrossChainFlags() - if flags.BlockHeaderVerificationFlags != nil && flags.BlockHeaderVerificationFlags.IsBtcTypeChainEnabled { + // TODO: move this logic in its own routine + // https://github.com/zeta-chain/node/issues/2204 + blockHeaderVerification, found := ob.coreContext.GetBlockHeaderEnabledChains(ob.chain.ChainId) + if found && blockHeaderVerification.Enabled { err = ob.postBlockHeader(blockNumber) if err != nil { ob.logger.InTx.Warn().Err(err).Msgf("observeInTxBTC: error posting block header %d", blockNumber) @@ -110,17 +112,6 @@ func (ob *Observer) ObserveInTx() error { // filter incoming txs to TSS address tssAddress := ob.Tss.BTCAddress() - // add block header to zetacore - // TODO: consider having a separate ticker(from TSS scaning) for posting block headers - // https://github.com/zeta-chain/node/issues/1847 - blockHeaderVerification, found := ob.coreContext.GetBlockHeaderEnabledChains(ob.chain.ChainId) - if found && blockHeaderVerification.Enabled { - err = ob.postBlockHeader(blockNumber) - if err != nil { - ob.logger.InTx.Warn().Err(err).Msgf("observeInTxBTC: error posting block header %d", blockNumber) - } - } - if len(res.Block.Tx) > 1 { // get depositor fee depositorFee := bitcoin.CalcDepositorFee(res.Block, ob.chain.ChainId, ob.netParams, ob.logger.InTx) diff --git a/zetaclient/chains/evm/observer/inbound.go b/zetaclient/chains/evm/observer/inbound.go index df10164e51..9008be9102 100644 --- a/zetaclient/chains/evm/observer/inbound.go +++ b/zetaclient/chains/evm/observer/inbound.go @@ -357,6 +357,8 @@ func (ob *Observer) ObserverTSSReceive(startBlock, toBlock uint64) uint64 { blockHeaderVerification, found := ob.coreContext.GetBlockHeaderEnabledChains(ob.chain.ChainId) if found && blockHeaderVerification.Enabled { // post block header for supported chains + // TODO: move this logic in its own routine + // https://github.com/zeta-chain/node/issues/2204 err := ob.postBlockHeader(toBlock) if err != nil { ob.logger.InTx.Error().Err(err).Msg("error posting block header") diff --git a/zetaclient/zetacore/query_test.go b/zetaclient/zetacore/query_test.go index d8c263e178..8bf1174341 100644 --- a/zetaclient/zetacore/query_test.go +++ b/zetaclient/zetacore/query_test.go @@ -84,10 +84,9 @@ func TestZetacore_GetBallot(t *testing.T) { func TestZetacore_GetCrosschainFlags(t *testing.T) { expectedOutput := observertypes.QueryGetCrosschainFlagsResponse{CrosschainFlags: observertypes.CrosschainFlags{ - IsInboundEnabled: true, - IsOutboundEnabled: false, - GasPriceIncreaseFlags: nil, - BlockHeaderVerificationFlags: nil, + IsInboundEnabled: true, + IsOutboundEnabled: false, + GasPriceIncreaseFlags: nil, }} input := observertypes.QueryGetCrosschainFlagsRequest{} method := "/zetachain.zetacore.observer.Query/CrosschainFlags" diff --git a/zetaclient/zetacore/tx_test.go b/zetaclient/zetacore/tx_test.go index 258a6f28d0..f415e07202 100644 --- a/zetaclient/zetacore/tx_test.go +++ b/zetaclient/zetacore/tx_test.go @@ -297,10 +297,9 @@ func TestZetacore_UpdateZetacoreContext(t *testing.T) { UnlimitedTimes(). WithPayload(observertypes.QueryGetCrosschainFlagsRequest{}). Return(observertypes.QueryGetCrosschainFlagsResponse{CrosschainFlags: observertypes.CrosschainFlags{ - IsInboundEnabled: true, - IsOutboundEnabled: false, - GasPriceIncreaseFlags: nil, - BlockHeaderVerificationFlags: nil, + IsInboundEnabled: true, + IsOutboundEnabled: false, + GasPriceIncreaseFlags: nil, }}) method = "/zetachain.zetacore.lightclient.Query/HeaderEnabledChains" From d72fdadbebcdcd2f090abe15ed069d4fec0fb72e Mon Sep 17 00:00:00 2001 From: Lucas Bertrand Date: Sat, 18 May 2024 08:39:30 +0200 Subject: [PATCH 2/2] chore: use fixed version for Mockery and add mocks generation to `make generate` (#2207) * use fix version for mock * add mocks to make generate * update mock generation --- Makefile | 2 +- scripts/mocks-generate.sh | 2 +- testutil/keeper/mocks/crosschain/account.go | 2 +- testutil/keeper/mocks/crosschain/authority.go | 2 +- testutil/keeper/mocks/crosschain/bank.go | 2 +- testutil/keeper/mocks/crosschain/fungible.go | 2 +- testutil/keeper/mocks/crosschain/ibccrosschain.go | 2 +- testutil/keeper/mocks/crosschain/lightclient.go | 2 +- testutil/keeper/mocks/crosschain/observer.go | 2 +- testutil/keeper/mocks/crosschain/staking.go | 2 +- testutil/keeper/mocks/emissions/account.go | 2 +- testutil/keeper/mocks/emissions/bank.go | 2 +- testutil/keeper/mocks/emissions/observer.go | 2 +- testutil/keeper/mocks/emissions/staking.go | 2 +- testutil/keeper/mocks/fungible/account.go | 2 +- testutil/keeper/mocks/fungible/authority.go | 2 +- testutil/keeper/mocks/fungible/bank.go | 2 +- testutil/keeper/mocks/fungible/evm.go | 2 +- testutil/keeper/mocks/fungible/observer.go | 2 +- testutil/keeper/mocks/ibccrosschain/crosschain.go | 2 +- testutil/keeper/mocks/ibccrosschain/transfer.go | 2 +- testutil/keeper/mocks/lightclient/authority.go | 2 +- testutil/keeper/mocks/observer/authority.go | 2 +- testutil/keeper/mocks/observer/lightclient.go | 2 +- testutil/keeper/mocks/observer/slashing.go | 2 +- testutil/keeper/mocks/observer/staking.go | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Makefile b/Makefile index 635e718857..d5446322db 100644 --- a/Makefile +++ b/Makefile @@ -185,7 +185,7 @@ mocks: @bash ./scripts/mocks-generate.sh .PHONY: mocks -generate: proto-gen openapi specs typescript docs-zetacored +generate: proto-gen openapi specs typescript docs-zetacored mocks .PHONY: generate ############################################################################### diff --git a/scripts/mocks-generate.sh b/scripts/mocks-generate.sh index 8e7dc5222b..15c3482857 100644 --- a/scripts/mocks-generate.sh +++ b/scripts/mocks-generate.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Install mockery -go install github.com/vektra/mockery/v2@latest +go install github.com/vektra/mockery/v2@v2.38.0 # Run generate command for mocks cd ./testutil/keeper/mocks diff --git a/testutil/keeper/mocks/crosschain/account.go b/testutil/keeper/mocks/crosschain/account.go index 99b7f1cf5b..fbd7c0377b 100644 --- a/testutil/keeper/mocks/crosschain/account.go +++ b/testutil/keeper/mocks/crosschain/account.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/crosschain/authority.go b/testutil/keeper/mocks/crosschain/authority.go index fd6ceefa47..9f08c9d673 100644 --- a/testutil/keeper/mocks/crosschain/authority.go +++ b/testutil/keeper/mocks/crosschain/authority.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/crosschain/bank.go b/testutil/keeper/mocks/crosschain/bank.go index 267f2b45b4..90f4e17e29 100644 --- a/testutil/keeper/mocks/crosschain/bank.go +++ b/testutil/keeper/mocks/crosschain/bank.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/crosschain/fungible.go b/testutil/keeper/mocks/crosschain/fungible.go index cbcd6d2b32..9eab868481 100644 --- a/testutil/keeper/mocks/crosschain/fungible.go +++ b/testutil/keeper/mocks/crosschain/fungible.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/crosschain/ibccrosschain.go b/testutil/keeper/mocks/crosschain/ibccrosschain.go index bad4f5b85b..177c8ec395 100644 --- a/testutil/keeper/mocks/crosschain/ibccrosschain.go +++ b/testutil/keeper/mocks/crosschain/ibccrosschain.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/crosschain/lightclient.go b/testutil/keeper/mocks/crosschain/lightclient.go index 53eaf7c398..d5ee740bc3 100644 --- a/testutil/keeper/mocks/crosschain/lightclient.go +++ b/testutil/keeper/mocks/crosschain/lightclient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/crosschain/observer.go b/testutil/keeper/mocks/crosschain/observer.go index 37b8ea2720..79c00e4f9c 100644 --- a/testutil/keeper/mocks/crosschain/observer.go +++ b/testutil/keeper/mocks/crosschain/observer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/crosschain/staking.go b/testutil/keeper/mocks/crosschain/staking.go index 64bbe0fed6..5b7d3c501f 100644 --- a/testutil/keeper/mocks/crosschain/staking.go +++ b/testutil/keeper/mocks/crosschain/staking.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/emissions/account.go b/testutil/keeper/mocks/emissions/account.go index 265c291e1b..a660d40e72 100644 --- a/testutil/keeper/mocks/emissions/account.go +++ b/testutil/keeper/mocks/emissions/account.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/emissions/bank.go b/testutil/keeper/mocks/emissions/bank.go index 10bc77649b..8149b5e6af 100644 --- a/testutil/keeper/mocks/emissions/bank.go +++ b/testutil/keeper/mocks/emissions/bank.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/emissions/observer.go b/testutil/keeper/mocks/emissions/observer.go index 15a2e21b1d..594f090907 100644 --- a/testutil/keeper/mocks/emissions/observer.go +++ b/testutil/keeper/mocks/emissions/observer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/emissions/staking.go b/testutil/keeper/mocks/emissions/staking.go index aaa9ce5e80..69f1b60081 100644 --- a/testutil/keeper/mocks/emissions/staking.go +++ b/testutil/keeper/mocks/emissions/staking.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/fungible/account.go b/testutil/keeper/mocks/fungible/account.go index 94b7a84d75..0522e833b4 100644 --- a/testutil/keeper/mocks/fungible/account.go +++ b/testutil/keeper/mocks/fungible/account.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/fungible/authority.go b/testutil/keeper/mocks/fungible/authority.go index b87791c784..929a99021c 100644 --- a/testutil/keeper/mocks/fungible/authority.go +++ b/testutil/keeper/mocks/fungible/authority.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/fungible/bank.go b/testutil/keeper/mocks/fungible/bank.go index 20a2590911..db14226310 100644 --- a/testutil/keeper/mocks/fungible/bank.go +++ b/testutil/keeper/mocks/fungible/bank.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/fungible/evm.go b/testutil/keeper/mocks/fungible/evm.go index f0dcd01094..28fd46e25c 100644 --- a/testutil/keeper/mocks/fungible/evm.go +++ b/testutil/keeper/mocks/fungible/evm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/fungible/observer.go b/testutil/keeper/mocks/fungible/observer.go index 5e0aca6a0f..bbe76b1afa 100644 --- a/testutil/keeper/mocks/fungible/observer.go +++ b/testutil/keeper/mocks/fungible/observer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/ibccrosschain/crosschain.go b/testutil/keeper/mocks/ibccrosschain/crosschain.go index f7ddd32b15..e7e665d659 100644 --- a/testutil/keeper/mocks/ibccrosschain/crosschain.go +++ b/testutil/keeper/mocks/ibccrosschain/crosschain.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/ibccrosschain/transfer.go b/testutil/keeper/mocks/ibccrosschain/transfer.go index 8db49ec5be..7cbab3b6a0 100644 --- a/testutil/keeper/mocks/ibccrosschain/transfer.go +++ b/testutil/keeper/mocks/ibccrosschain/transfer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/lightclient/authority.go b/testutil/keeper/mocks/lightclient/authority.go index f86b893f9c..03dd6972de 100644 --- a/testutil/keeper/mocks/lightclient/authority.go +++ b/testutil/keeper/mocks/lightclient/authority.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/observer/authority.go b/testutil/keeper/mocks/observer/authority.go index 4787b99b8a..76e5e0566c 100644 --- a/testutil/keeper/mocks/observer/authority.go +++ b/testutil/keeper/mocks/observer/authority.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/observer/lightclient.go b/testutil/keeper/mocks/observer/lightclient.go index b25f440330..442d006a5f 100644 --- a/testutil/keeper/mocks/observer/lightclient.go +++ b/testutil/keeper/mocks/observer/lightclient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/observer/slashing.go b/testutil/keeper/mocks/observer/slashing.go index d3f64ff726..a7793ef8dc 100644 --- a/testutil/keeper/mocks/observer/slashing.go +++ b/testutil/keeper/mocks/observer/slashing.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks diff --git a/testutil/keeper/mocks/observer/staking.go b/testutil/keeper/mocks/observer/staking.go index 72fe2be116..90007b6c35 100644 --- a/testutil/keeper/mocks/observer/staking.go +++ b/testutil/keeper/mocks/observer/staking.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks