add vaa-gated wasmd to wormchain (#1674)

* wormchain: add wasmd module

* wormchain: update proto

* wormchain: gate wasmd contract uploading around vaa

* wormchain: add tests around wasmd operations and guardian set upgrades

* wormchain: split wasm handlers into multiple files and permit bank methods

* wormchain: address review comments

* wormchain: use legacy keccak instead of sha3

* wormchain: add way to compute vaa hash manually

* wormchain: update proto package paths and dependencies

* wormchain: remove wasmd keeper guard

* wormchain: add CLI helpers for starting the chain

* wormchain: increase max validators and add genesis time

* wormchain: remove .pb.go from lint check

* wormchain: cleanup and address review comments

* wormchain: stop tracking .pb.go files

* wormchain: address comment to create buffer safely

Co-authored-by: Chirantan Ekbote <cekbote@jumptrading.com>

* wormchain: generate proto in ci

* wormchain: fix wrong description

* wormchain: always rebuild proto in ci

* wormchain: fix unit test compile error

* wormchain: build proto in tilt

Change-Id: Ibc4f4ff0c34108f4ecbe1af3c47373816739c669

Co-authored-by: Chirantan Ekbote <cekbote@jumptrading.com>
Co-authored-by: Hendrik Hofstadt <hendrik@nexantic.com>
This commit is contained in:
Conor Patrick 2022-10-14 17:12:57 -05:00 committed by GitHub
parent 856ab8bbc8
commit 127cd32e03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
79 changed files with 3864 additions and 18987 deletions

View File

@ -235,7 +235,7 @@ jobs:
with:
go-version: '1.19.0'
- run: curl https://get.ignite.com/cli@v0.23.0 | bash && mv ignite /usr/local/bin/
- run: cd wormhole_chain && make test
- run: cd wormhole_chain && make proto -B && make test
# Run Go linters, Go tests and other outside-of-Tilt things.
lint-and-tests:

View File

@ -24,6 +24,7 @@ EXPOSE 4500
RUN unset GOPATH
RUN make proto -B
RUN make client
RUN chmod +x /app/build/wormhole-chaind
RUN make validators

View File

@ -43,7 +43,7 @@ format(){
fi
# Use -exec because of pitfall #1 in http://mywiki.wooledge.org/BashPitfalls
GOFMT_OUTPUT="$(find "./sdk" "./node" "./event_database" "./wormhole_chain" -type f -name '*.go' -not -path './node/pkg/proto/*' -print0 | xargs -r -0 goimports $GOIMPORTS_ARGS 2>&1)"
GOFMT_OUTPUT="$(find "./sdk" "./node" "./event_database" "./wormhole_chain" -type f -name '*.go' -not -path '*.pb.go' -print0 | xargs -r -0 goimports $GOIMPORTS_ARGS 2>&1)"
if [ -n "$GOFMT_OUTPUT" ]; then
if [ "$GITHUB_ACTION" == "true" ]; then

View File

@ -11,6 +11,7 @@ validators/first_validator/keyring-test
validators/second_validator/keyring-test
ts-sdk/node_modules
ts-sdk/lib
*.pb.go
.idea
*.iml

View File

@ -69,14 +69,15 @@ import (
upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
"github.com/cosmos/ibc-go/modules/apps/transfer"
ibctransferkeeper "github.com/cosmos/ibc-go/modules/apps/transfer/keeper"
ibctransfertypes "github.com/cosmos/ibc-go/modules/apps/transfer/types"
ibc "github.com/cosmos/ibc-go/modules/core"
ibcclient "github.com/cosmos/ibc-go/modules/core/02-client"
ibcporttypes "github.com/cosmos/ibc-go/modules/core/05-port/types"
ibchost "github.com/cosmos/ibc-go/modules/core/24-host"
ibckeeper "github.com/cosmos/ibc-go/modules/core/keeper"
"github.com/cosmos/ibc-go/v3/modules/apps/transfer"
ibctransferkeeper "github.com/cosmos/ibc-go/v3/modules/apps/transfer/keeper"
ibctransfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
ibc "github.com/cosmos/ibc-go/v3/modules/core"
ibcclient "github.com/cosmos/ibc-go/v3/modules/core/02-client"
ibcporttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types"
ibchost "github.com/cosmos/ibc-go/v3/modules/core/24-host"
ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/keeper"
"github.com/prometheus/client_golang/prometheus"
"github.com/spf13/cast"
abci "github.com/tendermint/tendermint/abci/types"
tmjson "github.com/tendermint/tendermint/libs/json"
@ -84,6 +85,9 @@ import (
tmos "github.com/tendermint/tendermint/libs/os"
dbm "github.com/tendermint/tm-db"
"github.com/CosmWasm/wasmd/x/wasm"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
"github.com/tendermint/spm/cosmoscmd"
"github.com/tendermint/spm/openapiconsole"
@ -122,6 +126,16 @@ func getGovProposalHandlers() []govclient.ProposalHandler {
return govProposalHandlers
}
// GetWasmOpts build wasm options
func GetWasmOpts(appOpts servertypes.AppOptions) []wasm.Option {
var wasmOpts []wasm.Option
if cast.ToBool(appOpts.Get("telemetry.enabled")) {
wasmOpts = append(wasmOpts, wasmkeeper.WithVMCacheMetrics(prometheus.DefaultRegisterer))
}
return wasmOpts
}
var (
// DefaultNodeHome default home directories for the application daemon
DefaultNodeHome string
@ -150,6 +164,7 @@ var (
wormholemodule.AppModuleBasic{},
tokenbridgemodule.AppModuleBasic{},
// this line is used by starport scaffolding # stargate/app/moduleBasic
wasm.AppModuleBasic{},
)
// module account permissions
@ -164,6 +179,7 @@ var (
wormholemoduletypes.ModuleName: nil,
tokenbridgemoduletypes.ModuleName: {authtypes.Minter, authtypes.Burner, authtypes.Staking},
// this line is used by starport scaffolding # stargate/app/maccPerms
wasm.ModuleName: {authtypes.Burner},
}
)
@ -223,6 +239,8 @@ type App struct {
TokenbridgeKeeper tokenbridgemodulekeeper.Keeper
// this line is used by starport scaffolding # stargate/app/keeperDeclaration
wasmKeeper wasm.Keeper
scopedWasmKeeper capabilitykeeper.ScopedKeeper
// the module manager
mm *module.Manager
@ -261,6 +279,7 @@ func New(
wormholemoduletypes.StoreKey,
tokenbridgemoduletypes.StoreKey,
// this line is used by starport scaffolding # stargate/app/storeKey
wasm.StoreKey,
)
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey)
memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey)
@ -288,6 +307,7 @@ func New(
scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName)
scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName)
// this line is used by starport scaffolding # stargate/app/scopedKeeper
scopedWasmKeeper := app.CapabilityKeeper.ScopeToModule(wasm.ModuleName)
// add keepers
app.AccountKeeper = authkeeper.NewAccountKeeper(
@ -353,10 +373,11 @@ func New(
// Create Transfer Keepers
app.TransferKeeper = ibctransferkeeper.NewKeeper(
appCodec, keys[ibctransfertypes.StoreKey], app.GetSubspace(ibctransfertypes.ModuleName),
app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper,
app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper,
app.AccountKeeper, app.BankKeeper, scopedTransferKeeper,
)
transferModule := transfer.NewAppModule(app.TransferKeeper)
transferIBCModule := transfer.NewIBCModule(app.TransferKeeper)
// Create evidence Keeper for to register the IBC light client misbehaviour evidence route
evidenceKeeper := evidencekeeper.NewKeeper(
@ -383,11 +404,40 @@ func New(
&stakingKeeper, govRouter,
)
// The last arguments can contain custom message handlers, and custom query handlers,
// if we want to allow any custom callbacks
supportedFeatures := "iterator,staking,stargate"
wasmDir := filepath.Join(homePath, "data")
// Instantiate wasm keeper with stubs for other modules as we do not need
// wasm to be able to write to other modules.
app.wasmKeeper = wasm.NewKeeper(
appCodec,
keys[wasm.StoreKey],
app.GetSubspace(wasm.ModuleName),
app.AccountKeeper,
app.BankKeeper,
app.StakingKeeper,
app.DistrKeeper,
app.IBCKeeper.ChannelKeeper,
&app.IBCKeeper.PortKeeper,
scopedWasmKeeper,
app.TransferKeeper,
app.MsgServiceRouter(),
app.GRPCQueryRouter(),
wasmDir,
wasm.DefaultWasmConfig(),
// wasmConfig.ToWasmConfig(),
supportedFeatures,
GetWasmOpts(appOpts)...,
)
permissionedWasmKeeper := wasmkeeper.NewDefaultPermissionKeeper(app.wasmKeeper)
app.WormholeKeeper.SetWasmdKeeper(permissionedWasmKeeper)
// this line is used by starport scaffolding # stargate/app/keeperDefinition
// Create static IBC router, add transfer route, then set and seal it
ibcRouter := ibcporttypes.NewRouter()
ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferModule)
ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferIBCModule)
// this line is used by starport scaffolding # ibc/app/router
app.IBCKeeper.SetRouter(ibcRouter)
@ -424,6 +474,7 @@ func New(
wormholeModule,
tokenbridgeModule,
// this line is used by starport scaffolding # stargate/app/appModule
wasm.NewAppModule(appCodec, &app.wasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper),
)
// During begin block slashing happens after distr.BeginBlocker so that
@ -451,6 +502,7 @@ func New(
wormholemoduletypes.ModuleName,
tokenbridgemoduletypes.ModuleName,
// this line is used by starport scaffolding # stargate/app/beginBlockers
wasm.ModuleName,
)
app.mm.SetOrderEndBlockers(
@ -474,6 +526,7 @@ func New(
wormholemoduletypes.ModuleName,
tokenbridgemoduletypes.ModuleName,
// this line is used by starport scaffolding # stargate/app/endBlockers
wasm.ModuleName,
)
// NOTE: The genutils module must occur after staking so that pools are
@ -505,6 +558,7 @@ func New(
feegrant.ModuleName,
tokenbridgemoduletypes.ModuleName,
// this line is used by starport scaffolding # stargate/app/initGenesis
wasm.ModuleName,
)
app.mm.RegisterInvariants(&app.CrisisKeeper)
@ -545,6 +599,7 @@ func New(
app.ScopedIBCKeeper = scopedIBCKeeper
app.ScopedTransferKeeper = scopedTransferKeeper
// this line is used by starport scaffolding # stargate/app/beforeInitReturn
app.scopedWasmKeeper = scopedWasmKeeper
return app
}
@ -694,6 +749,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(wormholemoduletypes.ModuleName)
paramsKeeper.Subspace(tokenbridgemoduletypes.ModuleName)
// this line is used by starport scaffolding # stargate/app/paramSubspace
paramsKeeper.Subspace(wasm.ModuleName)
return paramsKeeper
}

View File

@ -0,0 +1,30 @@
package wasm_handlers
import (
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
sdk "github.com/cosmos/cosmos-sdk/types"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
)
type AccountKeeperHandler struct {
AccountKeeper authkeeper.AccountKeeper
}
var _ wasmtypes.AccountKeeper = &AccountKeeperHandler{}
func (b *AccountKeeperHandler) NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI {
// New accounts are needed for new contracts
return b.AccountKeeper.NewAccountWithAddress(ctx, addr)
}
// Retrieve an account from the store.
func (b *AccountKeeperHandler) GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI {
return b.AccountKeeper.GetAccount(ctx, addr)
}
// Set an account in the store.
func (b *AccountKeeperHandler) SetAccount(ctx sdk.Context, acc authtypes.AccountI) {
// New accounts are needed for new contracts
b.AccountKeeper.SetAccount(ctx, acc)
}

View File

@ -0,0 +1,48 @@
package wasm_handlers
import (
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
sdk "github.com/cosmos/cosmos-sdk/types"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
)
type BankViewKeeperHandler struct {
Keeper bankkeeper.Keeper
}
type BurnerHandler struct {
Keeper bankkeeper.Keeper
}
type BankKeeperHandler struct {
BankViewKeeperHandler
BurnerHandler
}
var _ wasmtypes.BankViewKeeper = &BankViewKeeperHandler{}
var _ wasmtypes.Burner = &BurnerHandler{}
var _ wasmtypes.BankKeeper = &BankKeeperHandler{}
func (b *BankViewKeeperHandler) GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins {
return b.Keeper.GetAllBalances(ctx, addr)
}
func (b *BankViewKeeperHandler) GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin {
return b.Keeper.GetBalance(ctx, addr, denom)
}
func (b *BurnerHandler) BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error {
return b.Keeper.BurnCoins(ctx, moduleName, amt)
}
func (b *BurnerHandler) SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error {
return b.Keeper.SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt)
}
func (b *BankKeeperHandler) IsSendEnabledCoins(ctx sdk.Context, coins ...sdk.Coin) error {
return b.BankViewKeeperHandler.Keeper.IsSendEnabledCoins(ctx, coins...)
}
func (b *BankKeeperHandler) BlockedAddr(addr sdk.AccAddress) bool {
return b.BankViewKeeperHandler.Keeper.BlockedAddr(addr)
}
func (b *BankKeeperHandler) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error {
return b.BankViewKeeperHandler.Keeper.SendCoins(ctx, fromAddr, toAddr, amt)
}

View File

@ -0,0 +1,24 @@
package wasm_handlers
import (
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
sdk "github.com/cosmos/cosmos-sdk/types"
capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper"
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
)
type CapabilityKeeperHandler struct {
ScopedKeeper capabilitykeeper.ScopedKeeper
}
var _ wasmtypes.CapabilityKeeper = &CapabilityKeeperHandler{}
func (b *CapabilityKeeperHandler) GetCapability(ctx sdk.Context, name string) (*capabilitytypes.Capability, bool) {
return b.ScopedKeeper.GetCapability(ctx, name)
}
func (b *CapabilityKeeperHandler) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error {
return b.ScopedKeeper.ClaimCapability(ctx, cap, name)
}
func (b *CapabilityKeeperHandler) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool {
return b.ScopedKeeper.AuthenticateCapability(ctx, cap, name)
}

View File

@ -0,0 +1,82 @@
package wasm_handlers
import (
"errors"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
sdk "github.com/cosmos/cosmos-sdk/types"
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
ibcappkeeper "github.com/cosmos/ibc-go/v3/modules/apps/transfer/keeper"
connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types"
ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/04-channel/keeper"
channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types"
ibcportkeeper "github.com/cosmos/ibc-go/v3/modules/core/05-port/keeper"
ibcexported "github.com/cosmos/ibc-go/v3/modules/core/exported"
)
// This defines which modules we actually want to expose cosmwasm contracts.
// Right now we only permit methods that are read-only.
// See https://github.com/CosmWasm/wasmd/blob/d63bea442bedf5b3055f3821472c7e6cafc3d813/x/wasm/types/expected_keepers.go
type ChannelKeeperHandler struct {
Keeper ibckeeper.Keeper
}
type ClientKeeperHandler struct {
Keeper ibckeeper.Keeper
}
type ConnectionKeeperHandler struct {
Keeper ibckeeper.Keeper
}
type PortKeeperHandler struct {
Keeper ibcportkeeper.Keeper
}
type ICS20TransferPortSourceHandler struct {
Keeper ibcappkeeper.Keeper
}
var _ wasmtypes.ChannelKeeper = &ChannelKeeperHandler{}
var _ wasmtypes.ClientKeeper = &ClientKeeperHandler{}
var _ wasmtypes.ConnectionKeeper = &ConnectionKeeperHandler{}
var _ wasmtypes.PortKeeper = &PortKeeperHandler{}
var _ wasmtypes.ICS20TransferPortSource = &ICS20TransferPortSourceHandler{}
func (b *ChannelKeeperHandler) GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool) {
return b.Keeper.GetChannel(ctx, srcPort, srcChan)
}
func (b *ChannelKeeperHandler) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) {
// not permitted
return 0, false
}
func (b *ChannelKeeperHandler) SendPacket(ctx sdk.Context, channelCap *capabilitytypes.Capability, packet ibcexported.PacketI) error {
return errors.New("not permitted")
}
func (b *ChannelKeeperHandler) ChanCloseInit(ctx sdk.Context, portID, channelID string, chanCap *capabilitytypes.Capability) error {
return errors.New("not permitted")
}
func (b *ChannelKeeperHandler) GetAllChannels(ctx sdk.Context) (channels []channeltypes.IdentifiedChannel) {
// not permitted
return []channeltypes.IdentifiedChannel{}
}
func (b *ChannelKeeperHandler) IterateChannels(ctx sdk.Context, cb func(channeltypes.IdentifiedChannel) bool) {
// not permitted
}
func (b *ChannelKeeperHandler) SetChannel(ctx sdk.Context, portID, channelID string, channel channeltypes.Channel) {
// not permitted
}
func (b *ClientKeeperHandler) GetClientConsensusState(ctx sdk.Context, clientID string) (ibcexported.ConsensusState, bool) {
return nil, false
}
func (b *ConnectionKeeperHandler) GetConnection(ctx sdk.Context, connectionID string) (connection connectiontypes.ConnectionEnd, found bool) {
return connectiontypes.ConnectionEnd{}, false
}
func (b *PortKeeperHandler) BindPort(ctx sdk.Context, portID string) *capabilitytypes.Capability {
return nil
}
func (b *ICS20TransferPortSourceHandler) GetPort(ctx sdk.Context) string {
// not permitted
return ""
}

View File

@ -0,0 +1,52 @@
package wasm_handlers
import (
"context"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
sdk "github.com/cosmos/cosmos-sdk/types"
distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
)
type DistributionKeeperHandler struct {
Keeper distrkeeper.Keeper
}
type StakingKeeperHandler struct {
Keeper stakingkeeper.Keeper
}
var _ wasmtypes.DistributionKeeper = &DistributionKeeperHandler{}
var _ wasmtypes.StakingKeeper = &StakingKeeperHandler{}
func (b *DistributionKeeperHandler) DelegationRewards(c context.Context, req *distrtypes.QueryDelegationRewardsRequest) (*distrtypes.QueryDelegationRewardsResponse, error) {
return b.Keeper.DelegationRewards(c, req)
}
func (b *StakingKeeperHandler) BondDenom(ctx sdk.Context) (res string) {
return b.Keeper.BondDenom(ctx)
}
func (b *StakingKeeperHandler) GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, found bool) {
return b.Keeper.GetValidator(ctx, addr)
}
func (b *StakingKeeperHandler) GetBondedValidatorsByPower(ctx sdk.Context) []stakingtypes.Validator {
return b.Keeper.GetBondedValidatorsByPower(ctx)
}
func (b *StakingKeeperHandler) GetAllDelegatorDelegations(ctx sdk.Context, delegator sdk.AccAddress) []stakingtypes.Delegation {
return b.Keeper.GetAllDelegatorDelegations(ctx, delegator)
}
func (b *StakingKeeperHandler) GetDelegation(ctx sdk.Context,
delAddr sdk.AccAddress, valAddr sdk.ValAddress) (delegation stakingtypes.Delegation, found bool) {
return b.Keeper.GetDelegation(ctx, delAddr, valAddr)
}
func (b *StakingKeeperHandler) HasReceivingRedelegation(ctx sdk.Context,
delAddr sdk.AccAddress, valDstAddr sdk.ValAddress) bool {
return b.Keeper.HasReceivingRedelegation(ctx, delAddr, valDstAddr)
}

View File

@ -1,4 +1,5 @@
{
"genesis_time": "2022-09-27T22:08:43.044644477Z",
"chain_id": "wormholechain",
"gentxs_dir": "build/config/gentx",
"moniker": "mynode",
@ -287,7 +288,7 @@
"bond_denom": "uworm",
"historical_entries": 10000,
"max_entries": 7,
"max_validators": 1,
"max_validators": 1000,
"unbonding_time": "1814400s"
},
"redelegations": [],
@ -337,6 +338,19 @@
],
"replayProtectionList": [],
"sequenceCounterList": []
},
"wasm": {
"params": {
"code_upload_access": {
"permission": "Everybody",
"address": ""
},
"instantiate_default_permission": "Everybody"
},
"codes": [],
"contracts": [],
"sequences": [],
"gen_msgs": []
}
}
}

View File

@ -6,6 +6,7 @@ import (
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
"github.com/tendermint/spm/cosmoscmd"
"github.com/wormhole-foundation/wormhole-chain/app"
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/client/cli"
)
func main() {
@ -18,6 +19,7 @@ func main() {
app.New,
// this line is used by starport scaffolding # root/arguments
)
rootCmd.AddCommand(cli.GetGenesisCmd())
if err := svrcmd.Execute(rootCmd, app.DefaultNodeHome); err != nil {
os.Exit(1)
}

View File

@ -3,31 +3,35 @@ module github.com/wormhole-foundation/wormhole-chain
go 1.16
require (
github.com/cosmos/cosmos-sdk v0.45.7
github.com/cosmos/ibc-go v1.2.2
github.com/CosmWasm/wasmd v0.28.0
github.com/cosmos/cosmos-sdk v0.45.8
github.com/cosmos/ibc-go/v3 v3.3.0
github.com/dgraph-io/ristretto v0.1.0 // indirect
github.com/ethereum/go-ethereum v1.10.21
github.com/gogo/protobuf v1.3.3
github.com/golang/glog v1.0.0 // indirect
github.com/golang/protobuf v1.5.2
github.com/google/btree v1.0.1 // indirect
github.com/gorilla/mux v1.8.0
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/prometheus/client_golang v1.12.2
github.com/spf13/cast v1.5.0
github.com/spf13/cobra v1.5.0
github.com/stretchr/testify v1.8.0
github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15
github.com/tendermint/spm v0.1.9
github.com/tendermint/tendermint v0.34.20
github.com/tendermint/tendermint v0.34.21
github.com/tendermint/tm-db v0.6.7
github.com/wormhole-foundation/wormhole/sdk v0.0.0-20220921004715-3103e59217da
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd
github.com/wormhole-foundation/wormhole/sdk v0.0.0-20220926172624-4b38dc650bb0
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e
google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc
google.golang.org/grpc v1.48.0
nhooyr.io/websocket v1.8.7 // indirect
)
replace (
github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76
github.com/cosmos/cosmos-sdk v0.45.7 => github.com/wormhole-foundation/cosmos-sdk v0.45.7-wormhole
github.com/CosmWasm/wasmd v0.28.0 => github.com/wormhole-foundation/wasmd v0.28.0-wormhole-2
github.com/cosmos/cosmos-sdk => github.com/wormhole-foundation/cosmos-sdk v0.45.7-wormhole
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
github.com/wormhole-foundation/wormhole/sdk => ../sdk
google.golang.org/grpc => google.golang.org/grpc v1.33.2

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
syntax = "proto3";
package certusone.wormholechain.tokenbridge;
package wormhole_foundation.wormholechain.tokenbridge;
option go_package = "github.com/wormhole-foundation/wormhole-chain/x/tokenbridge/types";

View File

@ -1,5 +1,5 @@
syntax = "proto3";
package certusone.wormholechain.tokenbridge;
package wormhole_foundation.wormholechain.tokenbridge;
option go_package = "github.com/wormhole-foundation/wormhole-chain/x/tokenbridge/types";

View File

@ -1,5 +1,5 @@
syntax = "proto3";
package certusone.wormholechain.tokenbridge;
package wormhole_foundation.wormholechain.tokenbridge;
option go_package = "github.com/wormhole-foundation/wormhole-chain/x/tokenbridge/types";

View File

@ -1,5 +1,5 @@
syntax = "proto3";
package certusone.wormholechain.tokenbridge;
package wormhole_foundation.wormholechain.tokenbridge;
option go_package = "github.com/wormhole-foundation/wormhole-chain/x/tokenbridge/types";

View File

@ -1,5 +1,5 @@
syntax = "proto3";
package certusone.wormholechain.tokenbridge;
package wormhole_foundation.wormholechain.tokenbridge;
import "tokenbridge/config.proto";
import "tokenbridge/replay_protection.proto";

View File

@ -1,5 +1,5 @@
syntax = "proto3";
package certusone.wormholechain.tokenbridge;
package wormhole_foundation.wormholechain.tokenbridge;
import "google/api/annotations.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
@ -16,36 +16,36 @@ option go_package = "github.com/wormhole-foundation/wormhole-chain/x/tokenbridge
service Query {
// Queries a config by index.
rpc Config(QueryGetConfigRequest) returns (QueryGetConfigResponse) {
option (google.api.http).get = "/certusone/wormholechain/tokenbridge/config";
option (google.api.http).get = "/wormhole_foundation/wormholechain/tokenbridge/config";
}
// Queries a replayProtection by index.
rpc ReplayProtection(QueryGetReplayProtectionRequest) returns (QueryGetReplayProtectionResponse) {
option (google.api.http).get = "/certusone/wormholechain/tokenbridge/replayProtection/{index}";
option (google.api.http).get = "/wormhole_foundation/wormholechain/tokenbridge/replayProtection/{index}";
}
// Queries a list of replayProtection items.
rpc ReplayProtectionAll(QueryAllReplayProtectionRequest) returns (QueryAllReplayProtectionResponse) {
option (google.api.http).get = "/certusone/wormholechain/tokenbridge/replayProtection";
option (google.api.http).get = "/wormhole_foundation/wormholechain/tokenbridge/replayProtection";
}
// Queries a chainRegistration by index.
rpc ChainRegistration(QueryGetChainRegistrationRequest) returns (QueryGetChainRegistrationResponse) {
option (google.api.http).get = "/certusone/wormholechain/tokenbridge/chainRegistration/{chainID}";
option (google.api.http).get = "/wormhole_foundation/wormholechain/tokenbridge/chainRegistration/{chainID}";
}
// Queries a list of chainRegistration items.
rpc ChainRegistrationAll(QueryAllChainRegistrationRequest) returns (QueryAllChainRegistrationResponse) {
option (google.api.http).get = "/certusone/wormholechain/tokenbridge/chainRegistration";
option (google.api.http).get = "/wormhole_foundation/wormholechain/tokenbridge/chainRegistration";
}
// Queries a coinMetaRollbackProtection by index.
rpc CoinMetaRollbackProtection(QueryGetCoinMetaRollbackProtectionRequest) returns (QueryGetCoinMetaRollbackProtectionResponse) {
option (google.api.http).get = "/certusone/wormholechain/tokenbridge/coinMetaRollbackProtection/{index}";
option (google.api.http).get = "/wormhole_foundation/wormholechain/tokenbridge/coinMetaRollbackProtection/{index}";
}
// Queries a list of coinMetaRollbackProtection items.
rpc CoinMetaRollbackProtectionAll(QueryAllCoinMetaRollbackProtectionRequest) returns (QueryAllCoinMetaRollbackProtectionResponse) {
option (google.api.http).get = "/certusone/wormholechain/tokenbridge/coinMetaRollbackProtection";
option (google.api.http).get = "/wormhole_foundation/wormholechain/tokenbridge/coinMetaRollbackProtection";
}
// this line is used by starport scaffolding # 2

View File

@ -1,5 +1,5 @@
syntax = "proto3";
package certusone.wormholechain.tokenbridge;
package wormhole_foundation.wormholechain.tokenbridge;
option go_package = "github.com/wormhole-foundation/wormhole-chain/x/tokenbridge/types";

View File

@ -1,5 +1,5 @@
syntax = "proto3";
package certusone.wormholechain.tokenbridge;
package wormhole_foundation.wormholechain.tokenbridge;
import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";

View File

@ -1,5 +1,5 @@
syntax = "proto3";
package certusone.wormholechain.wormhole;
package wormhole_foundation.wormholechain.wormhole;
option go_package = "github.com/wormhole-foundation/wormhole-chain/x/wormhole/types";

View File

@ -1,5 +1,5 @@
syntax = "proto3";
package certusone.wormholechain.wormhole;
package wormhole_foundation.wormholechain.wormhole;
option go_package = "github.com/wormhole-foundation/wormhole-chain/x/wormhole/types";

View File

@ -1,5 +1,5 @@
syntax = "proto3";
package certusone.wormholechain.wormhole;
package wormhole_foundation.wormholechain.wormhole;
option go_package = "github.com/wormhole-foundation/wormhole-chain/x/wormhole/types";

View File

@ -1,5 +1,5 @@
syntax = "proto3";
package certusone.wormholechain.wormhole;
package wormhole_foundation.wormholechain.wormhole;
import "wormhole/guardian_set.proto";
import "wormhole/config.proto";

View File

@ -1,5 +1,5 @@
syntax = "proto3";
package certusone.wormholechain.wormhole;
package wormhole_foundation.wormholechain.wormhole;
import "wormhole/guardian_set.proto";
import "gogoproto/gogo.proto";

View File

@ -1,5 +1,5 @@
syntax = "proto3";
package certusone.wormholechain.wormhole;
package wormhole_foundation.wormholechain.wormhole;
option go_package = "github.com/wormhole-foundation/wormhole-chain/x/wormhole/types";

View File

@ -1,5 +1,5 @@
syntax = "proto3";
package certusone.wormholechain.wormhole;
package wormhole_foundation.wormholechain.wormhole;
option go_package = "github.com/wormhole-foundation/wormhole-chain/x/wormhole/types";

View File

@ -1,5 +1,5 @@
syntax = "proto3";
package certusone.wormholechain.wormhole;
package wormhole_foundation.wormholechain.wormhole;
option go_package = "github.com/wormhole-foundation/wormhole-chain/x/wormhole/types";

View File

@ -1,5 +1,5 @@
syntax = "proto3";
package certusone.wormholechain.wormhole;
package wormhole_foundation.wormholechain.wormhole;
import "google/api/annotations.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
@ -18,55 +18,55 @@ option go_package = "github.com/wormhole-foundation/wormhole-chain/x/wormhole/ty
service Query {
// Queries a guardianSet by index.
rpc GuardianSet(QueryGetGuardianSetRequest) returns (QueryGetGuardianSetResponse) {
option (google.api.http).get = "/certusone/wormholechain/wormhole/guardianSet/{index}";
option (google.api.http).get = "/wormhole_foundation/wormholechain/wormhole/guardianSet/{index}";
}
// Queries a list of guardianSet items.
rpc GuardianSetAll(QueryAllGuardianSetRequest) returns (QueryAllGuardianSetResponse) {
option (google.api.http).get = "/certusone/wormholechain/wormhole/guardianSet";
option (google.api.http).get = "/wormhole_foundation/wormholechain/wormhole/guardianSet";
}
// Queries a config by index.
rpc Config(QueryGetConfigRequest) returns (QueryGetConfigResponse) {
option (google.api.http).get = "/certusone/wormholechain/wormhole/config";
option (google.api.http).get = "/wormhole_foundation/wormholechain/wormhole/config";
}
// Queries a replayProtection by index.
rpc ReplayProtection(QueryGetReplayProtectionRequest) returns (QueryGetReplayProtectionResponse) {
option (google.api.http).get = "/certusone/wormholechain/wormhole/replayProtection/{index}";
option (google.api.http).get = "/wormhole_foundation/wormholechain/wormhole/replayProtection/{index}";
}
// Queries a list of replayProtection items.
rpc ReplayProtectionAll(QueryAllReplayProtectionRequest) returns (QueryAllReplayProtectionResponse) {
option (google.api.http).get = "/certusone/wormholechain/wormhole/replayProtection";
option (google.api.http).get = "/wormhole_foundation/wormholechain/wormhole/replayProtection";
}
// Queries a sequenceCounter by index.
rpc SequenceCounter(QueryGetSequenceCounterRequest) returns (QueryGetSequenceCounterResponse) {
option (google.api.http).get = "/certusone/wormholechain/wormhole/sequenceCounter/{index}";
option (google.api.http).get = "/wormhole_foundation/wormholechain/wormhole/sequenceCounter/{index}";
}
// Queries a list of sequenceCounter items.
rpc SequenceCounterAll(QueryAllSequenceCounterRequest) returns (QueryAllSequenceCounterResponse) {
option (google.api.http).get = "/certusone/wormholechain/wormhole/sequenceCounter";
option (google.api.http).get = "/wormhole_foundation/wormholechain/wormhole/sequenceCounter";
}
// Queries a ConsensusGuardianSetIndex by index.
rpc ConsensusGuardianSetIndex(QueryGetConsensusGuardianSetIndexRequest) returns (QueryGetConsensusGuardianSetIndexResponse) {
option (google.api.http).get = "/certusone/wormholechain/wormhole/consensus_guardian_set_index";
option (google.api.http).get = "/wormhole_foundation/wormholechain/wormhole/consensus_guardian_set_index";
}
// Queries a GuardianValidator by index.
rpc GuardianValidator(QueryGetGuardianValidatorRequest) returns (QueryGetGuardianValidatorResponse) {
option (google.api.http).get = "/certusone/wormholechain/wormhole/guardian_validator/{guardianKey}";
option (google.api.http).get = "/wormhole_foundation/wormholechain/wormhole/guardian_validator/{guardianKey}";
}
// Queries a list of GuardianValidator items.
rpc GuardianValidatorAll(QueryAllGuardianValidatorRequest) returns (QueryAllGuardianValidatorResponse) {
option (google.api.http).get = "/certusone/wormholechain/wormhole/guardian_validator";
option (google.api.http).get = "/wormhole_foundation/wormholechain/wormhole/guardian_validator";
}
// Queries a list of LatestGuardianSetIndex items.
rpc LatestGuardianSetIndex(QueryLatestGuardianSetIndexRequest) returns (QueryLatestGuardianSetIndexResponse) {
option (google.api.http).get = "/certusone/wormholechain/wormhole/latest_guardian_set_index";
option (google.api.http).get = "/wormhole_foundation/wormholechain/wormhole/latest_guardian_set_index";
}
// this line is used by starport scaffolding # 2

View File

@ -1,5 +1,5 @@
syntax = "proto3";
package certusone.wormholechain.wormhole;
package wormhole_foundation.wormholechain.wormhole;
option go_package = "github.com/wormhole-foundation/wormhole-chain/x/wormhole/types";

View File

@ -1,5 +1,5 @@
syntax = "proto3";
package certusone.wormholechain.wormhole;
package wormhole_foundation.wormholechain.wormhole;
option go_package = "github.com/wormhole-foundation/wormhole-chain/x/wormhole/types";

View File

@ -1,6 +1,7 @@
syntax = "proto3";
package certusone.wormholechain.wormhole;
package wormhole_foundation.wormholechain.wormhole;
import "gogoproto/gogo.proto";
// this line is used by starport scaffolding # proto/tx/import
import "wormhole/guardian_key.proto";
@ -10,6 +11,12 @@ option go_package = "github.com/wormhole-foundation/wormhole-chain/x/wormhole/ty
service Msg {
rpc ExecuteGovernanceVAA(MsgExecuteGovernanceVAA) returns (MsgExecuteGovernanceVAAResponse);
rpc RegisterAccountAsGuardian(MsgRegisterAccountAsGuardian) returns (MsgRegisterAccountAsGuardianResponse);
// StoreCode to submit Wasm code to the system
rpc StoreCode(MsgStoreCode) returns (MsgStoreCodeResponse);
// Instantiate creates a new smart contract instance for the given code id.
rpc InstantiateContract(MsgInstantiateContract)
returns (MsgInstantiateContractResponse);
// this line is used by starport scaffolding # proto/tx/rpc
}
@ -30,4 +37,40 @@ message MsgRegisterAccountAsGuardian {
message MsgRegisterAccountAsGuardianResponse {
}
// Same as from x/wasmd but with vaa auth
message MsgStoreCode {
// Signer is the that actor that signed the messages
string signer = 1;
// WASMByteCode can be raw or gzip compressed
bytes wasm_byte_code = 2 [ (gogoproto.customname) = "WASMByteCode" ];
// vaa must be governance msg with payload containing sha3 256 hash of `wasm_byte_code`
bytes vaa = 3;
}
message MsgStoreCodeResponse {
// CodeID is the reference to the stored WASM code
uint64 code_id = 1 [ (gogoproto.customname) = "CodeID" ];
}
// Same as from x/wasmd but with vaa auth
message MsgInstantiateContract {
// Signer is the that actor that signed the messages
string signer = 1;
// CodeID is the reference to the stored WASM code
uint64 code_id = 3 [ (gogoproto.customname) = "CodeID" ];
// Label is optional metadata to be stored with a contract instance.
string label = 4;
// Msg json encoded message to be passed to the contract on instantiation
bytes msg = 5;
// vaa must be governance msg with payload containing sha3 256 hash of `bigEndian(code_id) || label || msg`
bytes vaa = 6;
}
message MsgInstantiateContractResponse {
// Address is the bech32 address of the new contract instance.
string address = 1;
// Data contains base64-encoded bytes to returned from the contract
bytes data = 2;
}
// this line is used by starport scaffolding # proto/tx/message

View File

@ -0,0 +1,867 @@
package keeper
import (
"encoding/base64"
)
func init() {
wasm, err := base64.StdEncoding.DecodeString(_EXAMPLE_WASM_CONTRACT_B64_GZIP)
if err != nil {
panic(err)
}
EXAMPLE_WASM_CONTRACT_GZIP = wasm
}
var EXAMPLE_WASM_CONTRACT_GZIP =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mos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
"github.com/CosmWasm/wasmd/x/wasm"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/store"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/version"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper"
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
"github.com/wormhole-foundation/wormhole-chain/app"
"github.com/wormhole-foundation/wormhole-chain/app/wasm_handlers"
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/keeper"
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/types"
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
"github.com/stretchr/testify/require"
"github.com/tendermint/spm/cosmoscmd"
"github.com/tendermint/tendermint/libs/log"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
tmdb "github.com/tendermint/tm-db"
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/keeper"
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/types"
)
func WormholeKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) {
storeKey := sdk.NewKVStoreKey(types.StoreKey)
memStoreKey := storetypes.NewMemoryStoreKey(types.MemStoreKey)
keys := sdk.NewKVStoreKeys(
authtypes.StoreKey,
paramstypes.StoreKey,
capabilitytypes.StoreKey,
types.StoreKey,
wasmtypes.StoreKey,
)
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey)
memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey, types.MemStoreKey)
maccPerms := map[string][]string{}
db := tmdb.NewMemDB()
stateStore := store.NewCommitMultiStore(db)
stateStore.MountStoreWithDB(storeKey, sdk.StoreTypeIAVL, db)
stateStore.MountStoreWithDB(memStoreKey, sdk.StoreTypeMemory, nil)
stateStore.MountStoreWithDB(keys[authtypes.StoreKey], sdk.StoreTypeIAVL, db)
stateStore.MountStoreWithDB(keys[paramstypes.StoreKey], sdk.StoreTypeIAVL, db)
stateStore.MountStoreWithDB(keys[capabilitytypes.StoreKey], sdk.StoreTypeIAVL, db)
stateStore.MountStoreWithDB(keys[types.StoreKey], sdk.StoreTypeIAVL, db)
stateStore.MountStoreWithDB(keys[wasmtypes.StoreKey], sdk.StoreTypeIAVL, db)
stateStore.MountStoreWithDB(memKeys[types.MemStoreKey], sdk.StoreTypeMemory, nil)
stateStore.MountStoreWithDB(tkeys[paramstypes.TStoreKey], sdk.StoreTypeTransient, nil)
require.NoError(t, stateStore.LoadLatestVersion())
registry := codectypes.NewInterfaceRegistry()
encodingConfig := cosmoscmd.MakeEncodingConfig(app.ModuleBasics)
appCodec := encodingConfig.Marshaler
amino := encodingConfig.Amino
paramsKeeper := paramskeeper.NewKeeper(appCodec, amino, keys[paramstypes.StoreKey], tkeys[paramstypes.TStoreKey])
paramsKeeper.Subspace(types.ModuleName)
paramsKeeper.Subspace(wasm.ModuleName)
paramsKeeper.Subspace(authtypes.ModuleName)
subspace_auth, _ := paramsKeeper.GetSubspace(authtypes.ModuleName)
accountKeeper := authkeeper.NewAccountKeeper(
appCodec, keys[authtypes.StoreKey], subspace_auth, authtypes.ProtoBaseAccount, maccPerms,
)
// this line is used by starport scaffolding # stargate/app/paramSubspace
subspaceWasmd, _ := paramsKeeper.GetSubspace(wasmtypes.ModuleName)
bApp := baseapp.NewBaseApp("wormchain", log.NewNopLogger(), db, encodingConfig.TxConfig.TxDecoder())
bApp.SetVersion(version.Version)
bApp.SetInterfaceRegistry(encodingConfig.InterfaceRegistry)
appapp := &app.App{
BaseApp: bApp,
}
k := keeper.NewKeeper(
codec.NewProtoCodec(registry),
storeKey,
memStoreKey,
nil,
appCodec,
keys[types.StoreKey],
memKeys[types.MemStoreKey],
accountKeeper,
nil,
)
ctx := sdk.NewContext(stateStore, tmproto.Header{}, false, log.NewNopLogger())
supportedFeatures := "iterator,staking,stargate"
appapp.WormholeKeeper = *k
appapp.CapabilityKeeper = capabilitykeeper.NewKeeper(appCodec, keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey])
scopedWasmKeeper := appapp.CapabilityKeeper.ScopeToModule(wasm.ModuleName)
wasmDir, err := ioutil.TempDir("", "")
if err != nil {
panic(err)
}
wasmKeeper := wasm.NewKeeper(
appCodec,
keys[wasmtypes.StoreKey],
subspaceWasmd,
accountKeeper,
&wasm_handlers.BankKeeperHandler{},
&wasm_handlers.StakingKeeperHandler{},
&wasm_handlers.DistributionKeeperHandler{},
&wasm_handlers.ChannelKeeperHandler{},
&wasm_handlers.PortKeeperHandler{},
scopedWasmKeeper,
&wasm_handlers.ICS20TransferPortSourceHandler{},
appapp.MsgServiceRouter(),
appapp.GRPCQueryRouter(),
wasmDir,
wasm.DefaultWasmConfig(),
supportedFeatures,
)
ctx := sdk.NewContext(stateStore, tmproto.Header{
Time: time.Now(),
}, false, log.NewNopLogger())
appapp.MountKVStores(keys)
appapp.MountTransientStores(tkeys)
appapp.MountMemoryStores(memKeys)
wasmGenState := wasmtypes.GenesisState{}
wasmGenState.Params.CodeUploadAccess = wasmtypes.DefaultUploadAccess
wasmGenState.Params.InstantiateDefaultPermission = wasmtypes.AccessTypeEverybody
wasmKeeper.SetParams(ctx, wasmGenState.Params)
permissionedWasmKeeper := wasmkeeper.NewDefaultPermissionKeeper(wasmKeeper)
appapp.WormholeKeeper.SetWasmdKeeper(permissionedWasmKeeper)
k.SetWasmdKeeper(permissionedWasmKeeper)
return k, ctx
}

View File

@ -1,12 +1,10 @@
package keeper
import (
"bytes"
"context"
"encoding/binary"
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/keeper"
"github.com/wormhole-foundation/wormhole/sdk/vaa"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/wormhole-foundation/wormhole-chain/x/tokenbridge/types"
@ -17,7 +15,7 @@ type GovernanceAction uint8
// TokenBridgeModule is the identifier of the TokenBridge module (which is used for governance messages)
// TODO(csongor): where's the best place to put this? CoreModule is in the node code, why is TokenBridgeModule not?
var TokenBridgeModule = []byte{00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65}
var TokenBridgeModule = [32]byte{00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65}
var (
ActionRegisterChain GovernanceAction = 1
@ -33,7 +31,7 @@ func (k msgServer) ExecuteGovernanceVAA(goCtx context.Context, msg *types.MsgExe
}
// Verify VAA
err = k.wormholeKeeper.VerifyVAA(ctx, v)
action, payload, err := k.wormholeKeeper.VerifyGovernanceVAA(ctx, v, TokenBridgeModule)
if err != nil {
return nil, err
}
@ -43,39 +41,8 @@ func (k msgServer) ExecuteGovernanceVAA(goCtx context.Context, msg *types.MsgExe
return nil, whtypes.ErrNoConfig
}
_, known := k.GetReplayProtection(ctx, v.HexDigest())
if known {
return nil, types.ErrVAAAlreadyExecuted
}
// Check governance emitter
if !bytes.Equal(v.EmitterAddress[:], wormholeConfig.GovernanceEmitter) {
return nil, types.ErrInvalidGovernanceEmitter
}
if v.EmitterChain != vaa.ChainID(wormholeConfig.GovernanceChain) {
return nil, types.ErrInvalidGovernanceEmitter
}
if len(v.Payload) < 35 {
return nil, types.ErrGovernanceHeaderTooShort
}
// Check governance header
if !bytes.Equal(v.Payload[:32], TokenBridgeModule) {
return nil, types.ErrUnknownGovernanceModule
}
// Decode header
action := GovernanceAction(v.Payload[32])
chain := binary.BigEndian.Uint16(v.Payload[33:35])
payload := v.Payload[35:]
if chain != 0 && chain != uint16(wormholeConfig.ChainId) {
return nil, types.ErrInvalidGovernanceTargetChain
}
// Execute action
switch action {
switch GovernanceAction(action) {
case ActionRegisterChain:
if len(payload) != 34 {
return nil, types.ErrInvalidGovernancePayloadLength
@ -111,8 +78,5 @@ func (k msgServer) ExecuteGovernanceVAA(goCtx context.Context, msg *types.MsgExe
}
// Prevent replay
k.SetReplayProtection(ctx, types.ReplayProtection{Index: v.HexDigest()})
return &types.MsgExecuteGovernanceVAAResponse{}, nil
}

View File

@ -1,357 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: tokenbridge/chain_registration.proto
package types
import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
proto "github.com/gogo/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type ChainRegistration struct {
ChainID uint32 `protobuf:"varint,1,opt,name=chainID,proto3" json:"chainID,omitempty"`
EmitterAddress []byte `protobuf:"bytes,2,opt,name=emitterAddress,proto3" json:"emitterAddress,omitempty"`
}
func (m *ChainRegistration) Reset() { *m = ChainRegistration{} }
func (m *ChainRegistration) String() string { return proto.CompactTextString(m) }
func (*ChainRegistration) ProtoMessage() {}
func (*ChainRegistration) Descriptor() ([]byte, []int) {
return fileDescriptor_8f6eeeb0759bdcc8, []int{0}
}
func (m *ChainRegistration) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ChainRegistration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ChainRegistration.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 *ChainRegistration) XXX_Merge(src proto.Message) {
xxx_messageInfo_ChainRegistration.Merge(m, src)
}
func (m *ChainRegistration) XXX_Size() int {
return m.Size()
}
func (m *ChainRegistration) XXX_DiscardUnknown() {
xxx_messageInfo_ChainRegistration.DiscardUnknown(m)
}
var xxx_messageInfo_ChainRegistration proto.InternalMessageInfo
func (m *ChainRegistration) GetChainID() uint32 {
if m != nil {
return m.ChainID
}
return 0
}
func (m *ChainRegistration) GetEmitterAddress() []byte {
if m != nil {
return m.EmitterAddress
}
return nil
}
func init() {
proto.RegisterType((*ChainRegistration)(nil), "certusone.wormholechain.tokenbridge.ChainRegistration")
}
func init() {
proto.RegisterFile("tokenbridge/chain_registration.proto", fileDescriptor_8f6eeeb0759bdcc8)
}
var fileDescriptor_8f6eeeb0759bdcc8 = []byte{
// 206 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x29, 0xc9, 0xcf, 0x4e,
0xcd, 0x4b, 0x2a, 0xca, 0x4c, 0x49, 0x4f, 0xd5, 0x4f, 0xce, 0x48, 0xcc, 0xcc, 0x8b, 0x2f, 0x4a,
0x4d, 0xcf, 0x2c, 0x2e, 0x29, 0x4a, 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9,
0x17, 0x52, 0x4e, 0x4e, 0x2d, 0x2a, 0x29, 0x2d, 0xce, 0xcf, 0x4b, 0xd5, 0x2b, 0xcf, 0x2f, 0xca,
0xcd, 0xc8, 0xcf, 0x49, 0x05, 0xab, 0xd5, 0x43, 0xd2, 0xad, 0x14, 0xca, 0x25, 0xe8, 0x0c, 0x12,
0x0c, 0x42, 0xd2, 0x2f, 0x24, 0xc1, 0xc5, 0x0e, 0x56, 0xe9, 0xe9, 0x22, 0xc1, 0xa8, 0xc0, 0xa8,
0xc1, 0x1b, 0x04, 0xe3, 0x0a, 0xa9, 0x71, 0xf1, 0xa5, 0xe6, 0x66, 0x96, 0x94, 0xa4, 0x16, 0x39,
0xa6, 0xa4, 0x14, 0xa5, 0x16, 0x17, 0x4b, 0x30, 0x29, 0x30, 0x6a, 0xf0, 0x04, 0xa1, 0x89, 0x3a,
0x05, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e,
0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x79, 0x7a, 0x66, 0x49,
0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xdc, 0x81, 0xfa, 0x30, 0x07, 0xea, 0x82, 0x2d,
0xd2, 0xaf, 0xd0, 0x47, 0xf6, 0x61, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0xd8, 0x57, 0xc6,
0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x95, 0x39, 0x2f, 0x69, 0xfd, 0x00, 0x00, 0x00,
}
func (m *ChainRegistration) 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 *ChainRegistration) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ChainRegistration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.EmitterAddress) > 0 {
i -= len(m.EmitterAddress)
copy(dAtA[i:], m.EmitterAddress)
i = encodeVarintChainRegistration(dAtA, i, uint64(len(m.EmitterAddress)))
i--
dAtA[i] = 0x12
}
if m.ChainID != 0 {
i = encodeVarintChainRegistration(dAtA, i, uint64(m.ChainID))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func encodeVarintChainRegistration(dAtA []byte, offset int, v uint64) int {
offset -= sovChainRegistration(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *ChainRegistration) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.ChainID != 0 {
n += 1 + sovChainRegistration(uint64(m.ChainID))
}
l = len(m.EmitterAddress)
if l > 0 {
n += 1 + l + sovChainRegistration(uint64(l))
}
return n
}
func sovChainRegistration(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozChainRegistration(x uint64) (n int) {
return sovChainRegistration(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *ChainRegistration) 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 ErrIntOverflowChainRegistration
}
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: ChainRegistration: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ChainRegistration: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType)
}
m.ChainID = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowChainRegistration
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ChainID |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EmitterAddress", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowChainRegistration
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthChainRegistration
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthChainRegistration
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.EmitterAddress = append(m.EmitterAddress[:0], dAtA[iNdEx:postIndex]...)
if m.EmitterAddress == nil {
m.EmitterAddress = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipChainRegistration(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthChainRegistration
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipChainRegistration(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowChainRegistration
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowChainRegistration
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowChainRegistration
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthChainRegistration
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupChainRegistration
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthChainRegistration
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthChainRegistration = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowChainRegistration = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupChainRegistration = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,357 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: tokenbridge/coin_meta_rollback_protection.proto
package types
import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
proto "github.com/gogo/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type CoinMetaRollbackProtection struct {
Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"`
LastUpdateSequence uint64 `protobuf:"varint,2,opt,name=lastUpdateSequence,proto3" json:"lastUpdateSequence,omitempty"`
}
func (m *CoinMetaRollbackProtection) Reset() { *m = CoinMetaRollbackProtection{} }
func (m *CoinMetaRollbackProtection) String() string { return proto.CompactTextString(m) }
func (*CoinMetaRollbackProtection) ProtoMessage() {}
func (*CoinMetaRollbackProtection) Descriptor() ([]byte, []int) {
return fileDescriptor_23ec5ccab8f2b4ca, []int{0}
}
func (m *CoinMetaRollbackProtection) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *CoinMetaRollbackProtection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_CoinMetaRollbackProtection.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 *CoinMetaRollbackProtection) XXX_Merge(src proto.Message) {
xxx_messageInfo_CoinMetaRollbackProtection.Merge(m, src)
}
func (m *CoinMetaRollbackProtection) XXX_Size() int {
return m.Size()
}
func (m *CoinMetaRollbackProtection) XXX_DiscardUnknown() {
xxx_messageInfo_CoinMetaRollbackProtection.DiscardUnknown(m)
}
var xxx_messageInfo_CoinMetaRollbackProtection proto.InternalMessageInfo
func (m *CoinMetaRollbackProtection) GetIndex() string {
if m != nil {
return m.Index
}
return ""
}
func (m *CoinMetaRollbackProtection) GetLastUpdateSequence() uint64 {
if m != nil {
return m.LastUpdateSequence
}
return 0
}
func init() {
proto.RegisterType((*CoinMetaRollbackProtection)(nil), "certusone.wormholechain.tokenbridge.CoinMetaRollbackProtection")
}
func init() {
proto.RegisterFile("tokenbridge/coin_meta_rollback_protection.proto", fileDescriptor_23ec5ccab8f2b4ca)
}
var fileDescriptor_23ec5ccab8f2b4ca = []byte{
// 229 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x8f, 0xb1, 0x4a, 0xc4, 0x40,
0x10, 0x86, 0xb3, 0xa2, 0x82, 0x29, 0x17, 0x8b, 0xc3, 0x62, 0x39, 0xb4, 0xb9, 0xc6, 0xdd, 0xc2,
0xc2, 0x5e, 0x6b, 0x41, 0x23, 0x36, 0x36, 0x61, 0x77, 0x33, 0x5c, 0x96, 0xdb, 0xcc, 0xc4, 0xcd,
0x04, 0xcf, 0xb7, 0xf0, 0xb1, 0x2c, 0xaf, 0xb4, 0x94, 0xe4, 0x45, 0xc4, 0x53, 0x83, 0xc2, 0x75,
0x33, 0xfc, 0xf0, 0xf1, 0x7d, 0xb9, 0x61, 0x5a, 0x01, 0xba, 0x14, 0xaa, 0x25, 0x18, 0x4f, 0x01,
0xcb, 0x06, 0xd8, 0x96, 0x89, 0x62, 0x74, 0xd6, 0xaf, 0xca, 0x36, 0x11, 0x83, 0xe7, 0x40, 0xa8,
0xbf, 0x4e, 0x92, 0x67, 0x1e, 0x12, 0xf7, 0x1d, 0x21, 0xe8, 0x67, 0x4a, 0x4d, 0x4d, 0x11, 0x7c,
0x6d, 0x03, 0xea, 0x3f, 0xa0, 0x53, 0x97, 0x9f, 0x5c, 0x53, 0xc0, 0x1b, 0x60, 0x5b, 0xfc, 0x90,
0x6e, 0x27, 0x90, 0x3c, 0xce, 0x0f, 0x02, 0x56, 0xb0, 0x9e, 0x89, 0xb9, 0x58, 0x1c, 0x15, 0xdf,
0x8f, 0xd4, 0xb9, 0x8c, 0xb6, 0xe3, 0x87, 0xb6, 0xb2, 0x0c, 0xf7, 0xf0, 0xd4, 0x03, 0x7a, 0x98,
0xed, 0xcd, 0xc5, 0x62, 0xbf, 0xd8, 0xb1, 0x5c, 0xdd, 0xbd, 0x0d, 0x4a, 0x6c, 0x06, 0x25, 0x3e,
0x06, 0x25, 0x5e, 0x47, 0x95, 0x6d, 0x46, 0x95, 0xbd, 0x8f, 0x2a, 0x7b, 0xbc, 0x5c, 0x06, 0xae,
0x7b, 0xa7, 0x3d, 0x35, 0x66, 0xb2, 0x35, 0xbf, 0xb6, 0xe7, 0x5b, 0x5d, 0xb3, 0xfe, 0x57, 0xce,
0x2f, 0x2d, 0x74, 0xee, 0x70, 0x9b, 0x78, 0xf1, 0x19, 0x00, 0x00, 0xff, 0xff, 0x05, 0xde, 0xcf,
0xef, 0x15, 0x01, 0x00, 0x00,
}
func (m *CoinMetaRollbackProtection) 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 *CoinMetaRollbackProtection) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *CoinMetaRollbackProtection) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.LastUpdateSequence != 0 {
i = encodeVarintCoinMetaRollbackProtection(dAtA, i, uint64(m.LastUpdateSequence))
i--
dAtA[i] = 0x10
}
if len(m.Index) > 0 {
i -= len(m.Index)
copy(dAtA[i:], m.Index)
i = encodeVarintCoinMetaRollbackProtection(dAtA, i, uint64(len(m.Index)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintCoinMetaRollbackProtection(dAtA []byte, offset int, v uint64) int {
offset -= sovCoinMetaRollbackProtection(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *CoinMetaRollbackProtection) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Index)
if l > 0 {
n += 1 + l + sovCoinMetaRollbackProtection(uint64(l))
}
if m.LastUpdateSequence != 0 {
n += 1 + sovCoinMetaRollbackProtection(uint64(m.LastUpdateSequence))
}
return n
}
func sovCoinMetaRollbackProtection(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozCoinMetaRollbackProtection(x uint64) (n int) {
return sovCoinMetaRollbackProtection(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *CoinMetaRollbackProtection) 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 ErrIntOverflowCoinMetaRollbackProtection
}
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: CoinMetaRollbackProtection: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: CoinMetaRollbackProtection: 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 ErrIntOverflowCoinMetaRollbackProtection
}
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 ErrInvalidLengthCoinMetaRollbackProtection
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCoinMetaRollbackProtection
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Index = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateSequence", wireType)
}
m.LastUpdateSequence = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCoinMetaRollbackProtection
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.LastUpdateSequence |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipCoinMetaRollbackProtection(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthCoinMetaRollbackProtection
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipCoinMetaRollbackProtection(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowCoinMetaRollbackProtection
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowCoinMetaRollbackProtection
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowCoinMetaRollbackProtection
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthCoinMetaRollbackProtection
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupCoinMetaRollbackProtection
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthCoinMetaRollbackProtection
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthCoinMetaRollbackProtection = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowCoinMetaRollbackProtection = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupCoinMetaRollbackProtection = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,266 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: tokenbridge/config.proto
package types
import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type Config struct {
}
func (m *Config) Reset() { *m = Config{} }
func (m *Config) String() string { return proto.CompactTextString(m) }
func (*Config) ProtoMessage() {}
func (*Config) Descriptor() ([]byte, []int) {
return fileDescriptor_b9e113abe6cc1887, []int{0}
}
func (m *Config) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Config.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 *Config) XXX_Merge(src proto.Message) {
xxx_messageInfo_Config.Merge(m, src)
}
func (m *Config) XXX_Size() int {
return m.Size()
}
func (m *Config) XXX_DiscardUnknown() {
xxx_messageInfo_Config.DiscardUnknown(m)
}
var xxx_messageInfo_Config proto.InternalMessageInfo
func init() {
proto.RegisterType((*Config)(nil), "certusone.wormholechain.tokenbridge.Config")
}
func init() { proto.RegisterFile("tokenbridge/config.proto", fileDescriptor_b9e113abe6cc1887) }
var fileDescriptor_b9e113abe6cc1887 = []byte{
// 162 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x28, 0xc9, 0xcf, 0x4e,
0xcd, 0x4b, 0x2a, 0xca, 0x4c, 0x49, 0x4f, 0xd5, 0x4f, 0xce, 0xcf, 0x4b, 0xcb, 0x4c, 0xd7, 0x2b,
0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0x4e, 0x4e, 0x2d, 0x2a, 0x29, 0x2d, 0xce, 0xcf, 0x4b, 0xd5,
0x2b, 0xcf, 0x2f, 0xca, 0xcd, 0xc8, 0xcf, 0x49, 0x4d, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x43, 0xd2,
0x21, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x56, 0xaf, 0x0f, 0x62, 0x41, 0xb4, 0x2a, 0x71, 0x70,
0xb1, 0x39, 0x83, 0x8d, 0x72, 0x0a, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07,
0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86,
0x28, 0xf3, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0xb8, 0x4d, 0xfa,
0x30, 0x9b, 0x74, 0xc1, 0x56, 0xe9, 0x57, 0xe8, 0x23, 0x3b, 0xaf, 0xa4, 0xb2, 0x20, 0xb5, 0x38,
0x89, 0x0d, 0x6c, 0x87, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x38, 0xe1, 0x04, 0x22, 0xba, 0x00,
0x00, 0x00,
}
func (m *Config) 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 *Config) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Config) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
return len(dAtA) - i, nil
}
func encodeVarintConfig(dAtA []byte, offset int, v uint64) int {
offset -= sovConfig(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *Config) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
return n
}
func sovConfig(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozConfig(x uint64) (n int) {
return sovConfig(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Config) 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 ErrIntOverflowConfig
}
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: Config: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Config: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipConfig(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConfig
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipConfig(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowConfig
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowConfig
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowConfig
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthConfig
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupConfig
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthConfig
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthConfig = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowConfig = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupConfig = fmt.Errorf("proto: unexpected end of group")
)

File diff suppressed because it is too large Load Diff

View File

@ -25,6 +25,7 @@ type BankKeeper interface {
type WormholeKeeper interface {
// Methods imported from wormhole should be defined here
VerifyVAA(ctx sdk.Context, vaa *vaa.VAA) error
VerifyGovernanceVAA(ctx sdk.Context, v *vaa.VAA, module [32]byte) (action byte, payload []byte, err error)
GetConfig(ctx sdk.Context) (val types.Config, found bool)
PostMessage(ctx sdk.Context, emitter types.EmitterAddress, nonce uint32, data []byte) error
}

View File

@ -1,524 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: tokenbridge/genesis.proto
package types
import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// GenesisState defines the tokenbridge module's genesis state.
type GenesisState struct {
Config *Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
ReplayProtectionList []ReplayProtection `protobuf:"bytes,2,rep,name=replayProtectionList,proto3" json:"replayProtectionList"`
ChainRegistrationList []ChainRegistration `protobuf:"bytes,3,rep,name=chainRegistrationList,proto3" json:"chainRegistrationList"`
CoinMetaRollbackProtectionList []CoinMetaRollbackProtection `protobuf:"bytes,4,rep,name=coinMetaRollbackProtectionList,proto3" json:"coinMetaRollbackProtectionList"`
}
func (m *GenesisState) Reset() { *m = GenesisState{} }
func (m *GenesisState) String() string { return proto.CompactTextString(m) }
func (*GenesisState) ProtoMessage() {}
func (*GenesisState) Descriptor() ([]byte, []int) {
return fileDescriptor_7868cbe02d959350, []int{0}
}
func (m *GenesisState) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) {
xxx_messageInfo_GenesisState.Merge(m, src)
}
func (m *GenesisState) XXX_Size() int {
return m.Size()
}
func (m *GenesisState) XXX_DiscardUnknown() {
xxx_messageInfo_GenesisState.DiscardUnknown(m)
}
var xxx_messageInfo_GenesisState proto.InternalMessageInfo
func (m *GenesisState) GetConfig() *Config {
if m != nil {
return m.Config
}
return nil
}
func (m *GenesisState) GetReplayProtectionList() []ReplayProtection {
if m != nil {
return m.ReplayProtectionList
}
return nil
}
func (m *GenesisState) GetChainRegistrationList() []ChainRegistration {
if m != nil {
return m.ChainRegistrationList
}
return nil
}
func (m *GenesisState) GetCoinMetaRollbackProtectionList() []CoinMetaRollbackProtection {
if m != nil {
return m.CoinMetaRollbackProtectionList
}
return nil
}
func init() {
proto.RegisterType((*GenesisState)(nil), "certusone.wormholechain.tokenbridge.GenesisState")
}
func init() { proto.RegisterFile("tokenbridge/genesis.proto", fileDescriptor_7868cbe02d959350) }
var fileDescriptor_7868cbe02d959350 = []byte{
// 352 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x4a, 0xf3, 0x40,
0x14, 0x85, 0x93, 0xbf, 0xa5, 0x8b, 0xf4, 0x5f, 0x85, 0x0a, 0xb5, 0x8b, 0xb1, 0x58, 0x17, 0x05,
0x31, 0x81, 0x8a, 0xba, 0x14, 0xda, 0x85, 0x1b, 0x05, 0x8d, 0x3b, 0x37, 0x61, 0x12, 0xaf, 0xd3,
0xa1, 0xe9, 0xdc, 0x32, 0x33, 0x45, 0xfb, 0x10, 0x82, 0x8f, 0xd5, 0x65, 0x97, 0xae, 0x44, 0xda,
0x17, 0x91, 0x4c, 0x62, 0x49, 0x6b, 0xc5, 0xec, 0x86, 0x99, 0x39, 0xdf, 0x39, 0xe7, 0x72, 0x9d,
0x7d, 0x8d, 0x23, 0x10, 0x91, 0xe4, 0x8f, 0x0c, 0x7c, 0x06, 0x02, 0x14, 0x57, 0xde, 0x44, 0xa2,
0x46, 0xb7, 0x13, 0x83, 0xd4, 0x53, 0x85, 0x02, 0xbc, 0x67, 0x94, 0xe3, 0x21, 0x26, 0x10, 0x0f,
0x29, 0x17, 0x5e, 0x41, 0xd2, 0x6a, 0x16, 0xf5, 0x31, 0x8a, 0x27, 0xce, 0x32, 0x79, 0xab, 0x53,
0x7c, 0x91, 0x30, 0x49, 0xe8, 0x2c, 0x4c, 0x5f, 0x20, 0xd6, 0x1c, 0x45, 0xfe, 0xe9, 0x68, 0x43,
0x9e, 0xd2, 0x43, 0x09, 0x8c, 0x2b, 0x2d, 0x69, 0xe1, 0x97, 0xbf, 0x69, 0xc2, 0x45, 0x38, 0x06,
0x4d, 0x43, 0x89, 0x49, 0x12, 0xd1, 0x78, 0xf4, 0x13, 0xdb, 0x60, 0xc8, 0xd0, 0x1c, 0xfd, 0xf4,
0x94, 0xdd, 0x1e, 0xce, 0x2b, 0xce, 0xff, 0xab, 0xac, 0xe2, 0xbd, 0xa6, 0x1a, 0xdc, 0x81, 0x53,
0xcb, 0x22, 0x37, 0xed, 0xb6, 0xdd, 0xad, 0xf7, 0x8e, 0xbd, 0x12, 0x95, 0xbd, 0x81, 0x91, 0x04,
0xb9, 0xd4, 0x45, 0xa7, 0x91, 0xb5, 0xbb, 0x5d, 0xa7, 0xb8, 0xe6, 0x4a, 0x37, 0xff, 0xb5, 0x2b,
0xdd, 0x7a, 0xef, 0xac, 0x14, 0x32, 0xd8, 0x02, 0xf4, 0xab, 0xf3, 0x8f, 0x03, 0x2b, 0xd8, 0x09,
0x76, 0xa5, 0xb3, 0x67, 0x08, 0x41, 0x61, 0x50, 0xc6, 0xb1, 0x62, 0x1c, 0xcf, 0xcb, 0x95, 0xd8,
0x26, 0xe4, 0x96, 0xbb, 0xd1, 0xee, 0xab, 0xed, 0x90, 0x74, 0xf0, 0x37, 0xa0, 0x69, 0x90, 0x8f,
0x7d, 0xab, 0x6f, 0xd5, 0xb8, 0x5f, 0x96, 0x1c, 0xe1, 0x6f, 0xa8, 0x3c, 0xc6, 0x1f, 0x66, 0xfd,
0xbb, 0xf9, 0x92, 0xd8, 0x8b, 0x25, 0xb1, 0x3f, 0x97, 0xc4, 0x7e, 0x5b, 0x11, 0x6b, 0xb1, 0x22,
0xd6, 0xfb, 0x8a, 0x58, 0x0f, 0x17, 0x8c, 0xeb, 0xe1, 0x34, 0xf2, 0x62, 0x1c, 0xfb, 0xeb, 0x28,
0xfe, 0x77, 0x94, 0x13, 0x93, 0xc5, 0x7f, 0xd9, 0xd8, 0x28, 0x3d, 0x9b, 0x80, 0x8a, 0x6a, 0x66,
0x49, 0x4e, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd5, 0x3e, 0xd3, 0x7d, 0x12, 0x03, 0x00, 0x00,
}
func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.CoinMetaRollbackProtectionList) > 0 {
for iNdEx := len(m.CoinMetaRollbackProtectionList) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.CoinMetaRollbackProtectionList[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGenesis(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x22
}
}
if len(m.ChainRegistrationList) > 0 {
for iNdEx := len(m.ChainRegistrationList) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.ChainRegistrationList[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGenesis(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
}
if len(m.ReplayProtectionList) > 0 {
for iNdEx := len(m.ReplayProtectionList) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.ReplayProtectionList[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGenesis(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
}
if m.Config != nil {
{
size, err := m.Config.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGenesis(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int {
offset -= sovGenesis(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *GenesisState) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Config != nil {
l = m.Config.Size()
n += 1 + l + sovGenesis(uint64(l))
}
if len(m.ReplayProtectionList) > 0 {
for _, e := range m.ReplayProtectionList {
l = e.Size()
n += 1 + l + sovGenesis(uint64(l))
}
}
if len(m.ChainRegistrationList) > 0 {
for _, e := range m.ChainRegistrationList {
l = e.Size()
n += 1 + l + sovGenesis(uint64(l))
}
}
if len(m.CoinMetaRollbackProtectionList) > 0 {
for _, e := range m.CoinMetaRollbackProtectionList {
l = e.Size()
n += 1 + l + sovGenesis(uint64(l))
}
}
return n
}
func sovGenesis(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozGenesis(x uint64) (n int) {
return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *GenesisState) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenesis
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: GenesisState: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenesis
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenesis
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenesis
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Config == nil {
m.Config = &Config{}
}
if err := m.Config.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ReplayProtectionList", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenesis
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenesis
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenesis
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ReplayProtectionList = append(m.ReplayProtectionList, ReplayProtection{})
if err := m.ReplayProtectionList[len(m.ReplayProtectionList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ChainRegistrationList", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenesis
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenesis
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenesis
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ChainRegistrationList = append(m.ChainRegistrationList, ChainRegistration{})
if err := m.ChainRegistrationList[len(m.ChainRegistrationList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CoinMetaRollbackProtectionList", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenesis
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenesis
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenesis
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.CoinMetaRollbackProtectionList = append(m.CoinMetaRollbackProtectionList, CoinMetaRollbackProtection{})
if err := m.CoinMetaRollbackProtectionList[len(m.CoinMetaRollbackProtectionList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenesis(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenesis
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipGenesis(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGenesis
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGenesis
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGenesis
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthGenesis
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupGenesis
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthGenesis
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)

File diff suppressed because it is too large Load Diff

View File

@ -673,19 +673,19 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
}
var (
pattern_Query_Config_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"certusone", "wormholechain", "tokenbridge", "config"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_Config_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"wormhole_foundation", "wormholechain", "tokenbridge", "config"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_ReplayProtection_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"certusone", "wormholechain", "tokenbridge", "replayProtection", "index"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_ReplayProtection_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"wormhole_foundation", "wormholechain", "tokenbridge", "replayProtection", "index"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_ReplayProtectionAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"certusone", "wormholechain", "tokenbridge", "replayProtection"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_ReplayProtectionAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"wormhole_foundation", "wormholechain", "tokenbridge", "replayProtection"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_ChainRegistration_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"certusone", "wormholechain", "tokenbridge", "chainRegistration", "chainID"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_ChainRegistration_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"wormhole_foundation", "wormholechain", "tokenbridge", "chainRegistration", "chainID"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_ChainRegistrationAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"certusone", "wormholechain", "tokenbridge", "chainRegistration"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_ChainRegistrationAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"wormhole_foundation", "wormholechain", "tokenbridge", "chainRegistration"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_CoinMetaRollbackProtection_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"certusone", "wormholechain", "tokenbridge", "coinMetaRollbackProtection", "index"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_CoinMetaRollbackProtection_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"wormhole_foundation", "wormholechain", "tokenbridge", "coinMetaRollbackProtection", "index"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_CoinMetaRollbackProtectionAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"certusone", "wormholechain", "tokenbridge", "coinMetaRollbackProtection"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_CoinMetaRollbackProtectionAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"wormhole_foundation", "wormholechain", "tokenbridge", "coinMetaRollbackProtection"}, "", runtime.AssumeColonVerbOpt(true)))
)
var (

View File

@ -1,319 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: tokenbridge/replay_protection.proto
package types
import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
proto "github.com/gogo/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type ReplayProtection struct {
Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"`
}
func (m *ReplayProtection) Reset() { *m = ReplayProtection{} }
func (m *ReplayProtection) String() string { return proto.CompactTextString(m) }
func (*ReplayProtection) ProtoMessage() {}
func (*ReplayProtection) Descriptor() ([]byte, []int) {
return fileDescriptor_26423141334c99f9, []int{0}
}
func (m *ReplayProtection) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ReplayProtection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ReplayProtection.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 *ReplayProtection) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReplayProtection.Merge(m, src)
}
func (m *ReplayProtection) XXX_Size() int {
return m.Size()
}
func (m *ReplayProtection) XXX_DiscardUnknown() {
xxx_messageInfo_ReplayProtection.DiscardUnknown(m)
}
var xxx_messageInfo_ReplayProtection proto.InternalMessageInfo
func (m *ReplayProtection) GetIndex() string {
if m != nil {
return m.Index
}
return ""
}
func init() {
proto.RegisterType((*ReplayProtection)(nil), "certusone.wormholechain.tokenbridge.ReplayProtection")
}
func init() {
proto.RegisterFile("tokenbridge/replay_protection.proto", fileDescriptor_26423141334c99f9)
}
var fileDescriptor_26423141334c99f9 = []byte{
// 179 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2e, 0xc9, 0xcf, 0x4e,
0xcd, 0x4b, 0x2a, 0xca, 0x4c, 0x49, 0x4f, 0xd5, 0x2f, 0x4a, 0x2d, 0xc8, 0x49, 0xac, 0x8c, 0x2f,
0x28, 0xca, 0x2f, 0x49, 0x4d, 0x2e, 0xc9, 0xcc, 0xcf, 0xd3, 0x03, 0x31, 0xf3, 0x85, 0x94, 0x93,
0x53, 0x8b, 0x4a, 0x4a, 0x8b, 0xf3, 0xf3, 0x52, 0xf5, 0xca, 0xf3, 0x8b, 0x72, 0x33, 0xf2, 0x73,
0x52, 0x93, 0x33, 0x12, 0x33, 0xf3, 0xf4, 0x90, 0x34, 0x2b, 0x69, 0x70, 0x09, 0x04, 0x81, 0xf5,
0x07, 0xc0, 0xb5, 0x0b, 0x89, 0x70, 0xb1, 0x66, 0xe6, 0xa5, 0xa4, 0x56, 0x48, 0x30, 0x2a, 0x30,
0x6a, 0x70, 0x06, 0x41, 0x38, 0x4e, 0x81, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8,
0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7,
0x10, 0x65, 0x9e, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0xb7, 0x53,
0x1f, 0x66, 0xa7, 0x2e, 0xd8, 0x52, 0xfd, 0x0a, 0x7d, 0x64, 0x37, 0x97, 0x54, 0x16, 0xa4, 0x16,
0x27, 0xb1, 0x81, 0x1d, 0x6a, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x31, 0xc6, 0x02, 0xec, 0xcf,
0x00, 0x00, 0x00,
}
func (m *ReplayProtection) 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 *ReplayProtection) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ReplayProtection) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Index) > 0 {
i -= len(m.Index)
copy(dAtA[i:], m.Index)
i = encodeVarintReplayProtection(dAtA, i, uint64(len(m.Index)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintReplayProtection(dAtA []byte, offset int, v uint64) int {
offset -= sovReplayProtection(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *ReplayProtection) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Index)
if l > 0 {
n += 1 + l + sovReplayProtection(uint64(l))
}
return n
}
func sovReplayProtection(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozReplayProtection(x uint64) (n int) {
return sovReplayProtection(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *ReplayProtection) 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 ErrIntOverflowReplayProtection
}
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: ReplayProtection: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ReplayProtection: 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 ErrIntOverflowReplayProtection
}
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 ErrInvalidLengthReplayProtection
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthReplayProtection
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Index = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipReplayProtection(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthReplayProtection
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipReplayProtection(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowReplayProtection
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowReplayProtection
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowReplayProtection
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthReplayProtection
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupReplayProtection
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthReplayProtection
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthReplayProtection = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowReplayProtection = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupReplayProtection = fmt.Errorf("proto: unexpected end of group")
)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,444 @@
package cli
import (
"crypto/ecdsa"
"encoding/base64"
"encoding/binary"
"encoding/hex"
"fmt"
"io/ioutil"
"math/big"
"os"
"strings"
"time"
"github.com/cosmos/cosmos-sdk/client/flags"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/spf13/cobra"
"github.com/cosmos/cosmos-sdk/client"
// "github.com/cosmos/cosmos-sdk/client/flags"
"github.com/ethereum/go-ethereum/crypto"
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/keeper"
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/types"
"github.com/wormhole-foundation/wormhole/sdk/vaa"
)
// normal vaa flags
const FLAG_KEY = "key"
const FLAG_EMITTER_CHAIN = "emitter-chain"
const FLAG_INDEX = "index"
const FLAG_SEQUENCE = "sequence"
const FLAG_NONCE = "nonce"
const FLAG_PAYLOAD = "payload"
// governance vaa flags
const FLAG_MODULE = "module"
const FLAG_ACTION = "action"
const FLAG_CHAIN = "chain"
const FLAG_PUBLIC_KEY = "public-key"
const FLAG_NEXT_INDEX = "next-index"
// GetGenesisCmd returns the genesis related commands for this module
func GetGenesisCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "genesis",
Short: fmt.Sprintf("%s genesis subcommands", types.ModuleName),
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
}
cmd.AddCommand(CmdGenerateTestGuardianKey())
cmd.AddCommand(CmdDecodeAddress())
cmd.AddCommand(CmdGenerateVaa())
cmd.AddCommand(CmdGenerateGovernanceVaa())
cmd.AddCommand(CmdGenerateGuardianSetUpdatea())
cmd.AddCommand(CmdSignAddress())
return cmd
}
func CmdGenerateTestGuardianKey() *cobra.Command {
cmd := &cobra.Command{
Use: "generate-test-guardian-keypair [output-private-key.hex] [address.hex]",
Short: "Generate a guardian keypair for testing use",
Args: cobra.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) (err error) {
outPrivatePath := args[0]
outPublicPath := args[1]
// https://ethereum.org/en/developers/docs/accounts/#account-creation)
key, err := crypto.GenerateKey()
if err != nil {
return err
}
addr := crypto.PubkeyToAddress(key.PublicKey)
private_key := [32]byte{}
key.D.FillBytes(private_key[:])
err = ioutil.WriteFile(outPrivatePath, []byte(hex.EncodeToString(private_key[:])), 0644)
if err != nil {
return err
}
ioutil.WriteFile(outPublicPath, []byte(hex.EncodeToString(addr.Bytes())), 0644)
if err != nil {
return err
}
return nil
},
}
return cmd
}
func CmdDecodeAddress() *cobra.Command {
cmd := &cobra.Command{
Use: "decode-address [address]",
Short: "Decode an address from either account, validator, or evm format",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) (err error) {
addrString := args[0]
if strings.HasPrefix(addrString, sdk.GetConfig().GetBech32AccountAddrPrefix()) {
addr, err := sdk.AccAddressFromBech32(addrString)
if err != nil {
return nil
}
fmt.Println(base64.StdEncoding.EncodeToString(addr))
} else if strings.HasPrefix(addrString, sdk.GetConfig().GetBech32ValidatorAddrPrefix()) {
addr, err := sdk.AccAddressFromBech32(addrString)
if err != nil {
return nil
}
fmt.Println(base64.StdEncoding.EncodeToString(addr))
} else {
// treat as hex
addr, err := hex.DecodeString(strings.TrimPrefix(addrString, "0x"))
if err != nil {
return err
}
fmt.Println(base64.StdEncoding.EncodeToString(addr))
}
return nil
},
}
return cmd
}
func ImportKeyFromFile(filePath string) (*ecdsa.PrivateKey, error) {
priv := ecdsa.PrivateKey{}
bz, err := ioutil.ReadFile(filePath)
if err != nil {
return &priv, err
}
return ImportKeyFromHex(string(bz))
}
func ImportPublicKeyFromFile(filePath string) ([]byte, error) {
hexBz, err := ioutil.ReadFile(filePath)
if err != nil {
return []byte{}, err
}
hexStr := string(hexBz)
bz, err := hex.DecodeString(hexStr)
if err != nil {
return []byte{}, err
}
return bz, nil
}
func ImportKeyFromHex(privHex string) (*ecdsa.PrivateKey, error) {
priv := ecdsa.PrivateKey{}
priv_bz, err := hex.DecodeString(privHex)
if err != nil {
return &priv, err
}
k := big.NewInt(0)
k.SetBytes(priv_bz)
priv.PublicKey.Curve = crypto.S256()
priv.D = k
priv.PublicKey.X, priv.PublicKey.Y = priv.PublicKey.Curve.ScalarBaseMult(k.Bytes())
return &priv, nil
}
func parseVaaFromFlags(cmd *cobra.Command) (vaa.VAA, error) {
var GOVERNANCE_EMITTER = [32]byte{00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 04}
emitterChain, err := cmd.Flags().GetUint16(FLAG_EMITTER_CHAIN)
if err != nil {
return vaa.VAA{}, err
}
index, err := cmd.Flags().GetUint32(FLAG_INDEX)
if err != nil {
return vaa.VAA{}, err
}
nonce, err := cmd.Flags().GetUint32(FLAG_NONCE)
if err != nil {
return vaa.VAA{}, err
}
seq, err := cmd.Flags().GetUint64(FLAG_SEQUENCE)
if err != nil {
return vaa.VAA{}, err
}
payloadHex, err := cmd.Flags().GetString(FLAG_PAYLOAD)
if err != nil {
return vaa.VAA{}, err
}
payload, err := hex.DecodeString(payloadHex)
if err != nil {
return vaa.VAA{}, err
}
v := vaa.VAA{
Version: uint8(1),
GuardianSetIndex: index,
Signatures: nil,
Timestamp: time.Now(),
Nonce: nonce,
Sequence: seq,
ConsistencyLevel: uint8(32),
EmitterChain: vaa.ChainID(emitterChain),
EmitterAddress: vaa.Address(GOVERNANCE_EMITTER),
Payload: payload,
}
return v, nil
}
func addVaaFlags(cmd *cobra.Command) {
cmd.Flags().StringArray(FLAG_KEY, []string{}, "guardian private key file(s) to sign with (hex format) in order.")
cmd.Flags().Uint16(FLAG_EMITTER_CHAIN, 0, "emitter chain")
cmd.Flags().Uint32(FLAG_INDEX, 0, "guardian set index")
cmd.Flags().Uint64(FLAG_SEQUENCE, 0, "sequence number")
cmd.Flags().Uint32(FLAG_NONCE, 0, "nonce")
cmd.Flags().String(FLAG_PAYLOAD, "", "payload (hex format)")
}
func addGovVaaFlags(cmd *cobra.Command) {
cmd.Flags().String(FLAG_MODULE, "", "module (ascii string)")
cmd.Flags().Uint8(FLAG_ACTION, 0, "action")
cmd.Flags().Uint16(FLAG_CHAIN, 0, "chain")
}
func CmdGenerateVaa() *cobra.Command {
cmd := &cobra.Command{
Use: "generate-vaa",
Short: "generate and sign a vaa with any payload",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) (err error) {
privateKeys := []*ecdsa.PrivateKey{}
privateKeysFiles, err := cmd.Flags().GetStringArray(FLAG_KEY)
if err != nil {
return err
}
for _, privFile := range privateKeysFiles {
priv, err := ImportKeyFromFile(privFile)
if err != nil {
return err
}
privateKeys = append(privateKeys, priv)
}
v, err := parseVaaFromFlags(cmd)
if err != nil {
return err
}
for i, key := range privateKeys {
v.AddSignature(key, uint8(i))
}
v_bz, err := v.Marshal()
if err != nil {
return err
}
fmt.Println(hex.EncodeToString(v_bz))
return nil
},
}
addVaaFlags(cmd)
return cmd
}
func CmdGenerateGovernanceVaa() *cobra.Command {
cmd := &cobra.Command{
Use: "generate-gov-vaa",
Short: "generate and sign a governance vaa with any payload",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) (err error) {
privateKeys := []*ecdsa.PrivateKey{}
privateKeysFiles, err := cmd.Flags().GetStringArray(FLAG_KEY)
if err != nil {
return err
}
for _, privFile := range privateKeysFiles {
priv, err := ImportKeyFromFile(privFile)
if err != nil {
return err
}
privateKeys = append(privateKeys, priv)
}
v, err := parseVaaFromFlags(cmd)
if err != nil {
return err
}
gov_payload := v.Payload
moduleString, err := cmd.Flags().GetString(FLAG_MODULE)
if err != nil {
return err
}
action, err := cmd.Flags().GetUint8(FLAG_ACTION)
if err != nil {
return err
}
chain, err := cmd.Flags().GetUint16(FLAG_CHAIN)
if err != nil {
return err
}
module := [32]byte{}
copy(module[len(module)-len(moduleString):], []byte(moduleString))
msg := types.NewGovernanceMessage(module, action, chain, gov_payload)
v.Payload = msg.MarshalBinary()
v.EmitterChain = 1
for i, key := range privateKeys {
v.AddSignature(key, uint8(i))
// address := crypto.PubkeyToAddress(privateKeys[0].PublicKey)
// fmt.Println("signed using ", hex.EncodeToString(address[:]))
}
v_bz, err := v.Marshal()
if err != nil {
return err
}
fmt.Println(hex.EncodeToString(v_bz))
return nil
},
}
addVaaFlags(cmd)
addGovVaaFlags(cmd)
return cmd
}
func CmdGenerateGuardianSetUpdatea() *cobra.Command {
cmd := &cobra.Command{
Use: "generate-guardian-update-vaa",
Short: "generate and sign a governance vaa with any payload",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) (err error) {
privateKeys := []*ecdsa.PrivateKey{}
privateKeysFiles, err := cmd.Flags().GetStringArray(FLAG_KEY)
if err != nil {
return err
}
for _, privFile := range privateKeysFiles {
priv, err := ImportKeyFromFile(privFile)
if err != nil {
return err
}
privateKeys = append(privateKeys, priv)
}
v, err := parseVaaFromFlags(cmd)
if err != nil {
return err
}
next_index, err := cmd.Flags().GetUint32(FLAG_NEXT_INDEX)
if err != nil {
return err
}
publicKeys := [][]byte{}
pubKeysFiles, err := cmd.Flags().GetStringArray(FLAG_PUBLIC_KEY)
if err != nil {
return err
}
for _, pubFile := range pubKeysFiles {
pubBz, err := ImportPublicKeyFromFile(pubFile)
if err != nil {
return err
}
publicKeys = append(publicKeys, pubBz)
}
set_update := make([]byte, 4)
binary.BigEndian.PutUint32(set_update, next_index)
set_update = append(set_update, uint8(len(pubKeysFiles)))
// Add keys to set_update
for _, pubkey := range publicKeys {
set_update = append(set_update, pubkey...)
}
action := keeper.ActionGuardianSetUpdate
chain := 3104
module := [32]byte{}
copy(module[:], vaa.CoreModule)
msg := types.NewGovernanceMessage(module, byte(action), uint16(chain), set_update)
v.Payload = msg.MarshalBinary()
v.EmitterChain = 1
for i, key := range privateKeys {
v.AddSignature(key, uint8(i))
}
v_bz, err := v.Marshal()
if err != nil {
return err
}
fmt.Println(hex.EncodeToString(v_bz))
return nil
},
}
addVaaFlags(cmd)
cmd.Flags().StringArray(FLAG_PUBLIC_KEY, []string{}, "guardian public key file(s) to include in new set (hex/evm format) in order.")
cmd.Flags().Uint32(FLAG_NEXT_INDEX, 0, "next guardian set index")
return cmd
}
func CmdSignAddress() *cobra.Command {
cmd := &cobra.Command{
Use: "sign-address",
Short: "sign the validator address to use for registering as a guardian. read guardian key as hex in $GUARDIAN_KEY env variable. use --from to indicate address to sign.",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) (err error) {
clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {
return err
}
info, err := clientCtx.Keyring.Key(clientCtx.From)
if err != nil {
return err
}
keyHex := os.Getenv("GUARDIAN_KEY")
key, err := ImportKeyFromHex(keyHex)
if err != nil {
return err
}
addr := info.GetAddress()
addrHash := crypto.Keccak256Hash(addr)
sig, err := crypto.Sign(addrHash[:], key)
if err != nil {
return err
}
fmt.Println(hex.EncodeToString(sig))
return nil
},
}
flags.AddTxFlagsToCmd(cmd)
return cmd
}

View File

@ -22,6 +22,8 @@ func GetTxCmd() *cobra.Command {
cmd.AddCommand(CmdExecuteGovernanceVAA())
cmd.AddCommand(CmdRegisterAccountAsGuardian())
cmd.AddCommand(CmdStoreCode())
cmd.AddCommand(CmdInstantiateContract())
// this line is used by starport scaffolding # 1
return cmd

View File

@ -0,0 +1,151 @@
package cli
import (
"fmt"
"io/ioutil"
"strconv"
"encoding/binary"
"encoding/hex"
"github.com/CosmWasm/wasmd/x/wasm/ioutils"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/spf13/cast"
"github.com/spf13/cobra"
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/types"
"golang.org/x/crypto/sha3"
)
var _ = strconv.Itoa(0)
func parseStoreCodeArgs(file string, sender sdk.AccAddress, vaa []byte) (types.MsgStoreCode, error) {
wasm, err := ioutil.ReadFile(file)
if err != nil {
return types.MsgStoreCode{}, err
}
// gzip the wasm file
if ioutils.IsWasm(wasm) {
wasm, err = ioutils.GzipIt(wasm)
if err != nil {
return types.MsgStoreCode{}, err
}
} else if !ioutils.IsGzip(wasm) {
return types.MsgStoreCode{}, fmt.Errorf("invalid input file. Use wasm binary or gzip")
}
return types.MsgStoreCode{
Signer: sender.String(),
WASMByteCode: wasm,
Vaa: vaa,
}, nil
}
// StoreCodeCmd will upload code to be reused.
func CmdStoreCode() *cobra.Command {
cmd := &cobra.Command{
Use: "store [wasm file] [vaa-hex]",
Short: "Upload a wasm binary with vaa, or just compute the hash for vaa if [vaa-hex] is omitted",
Aliases: []string{"upload", "st", "s"},
Args: cobra.RangeArgs(1, 2),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {
return err
}
hash_only := len(args) == 1
vaaBz := []byte{}
if !hash_only {
vaaBz, err = hex.DecodeString(args[1])
if err != nil {
return err
}
}
msg, err := parseStoreCodeArgs(args[0], clientCtx.GetFromAddress(), vaaBz)
if err != nil {
return err
}
if !hash_only {
if err = msg.ValidateBasic(); err != nil {
return err
}
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg)
} else {
var hashWasm [32]byte
keccak := sha3.NewLegacyKeccak256()
keccak.Write(msg.WASMByteCode)
keccak.Sum(hashWasm[:0])
fmt.Println(hex.EncodeToString(hashWasm[:]))
return nil
}
},
}
flags.AddTxFlagsToCmd(cmd)
return cmd
}
func CmdInstantiateContract() *cobra.Command {
cmd := &cobra.Command{
Use: "instantiate [label] [code_id_int64] [json_encoded_init_args] [vaa-hex]",
Short: "Instantiate a wasmd contract, or just compute the hash for vaa if vaa is omitted",
Args: cobra.RangeArgs(3, 4),
RunE: func(cmd *cobra.Command, args []string) (err error) {
clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {
return err
}
hash_only := len(args) == 3
labelStr := args[0]
codeId, err := cast.ToUint64E(args[1])
if err != nil {
return err
}
initMsg := args[2]
vaaBz := []byte{}
if !hash_only {
vaaBz, err = hex.DecodeString(args[3])
if err != nil {
return err
}
}
msg := types.MsgInstantiateContract{
Signer: clientCtx.GetFromAddress().String(),
CodeID: codeId,
Label: labelStr,
Msg: []byte(initMsg),
Vaa: vaaBz,
}
if !hash_only {
if err := msg.ValidateBasic(); err != nil {
return err
}
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg)
} else {
var hash [32]byte
keccak := sha3.NewLegacyKeccak256()
binary.Write(keccak, binary.BigEndian, msg.CodeID)
keccak.Write([]byte(msg.Label))
keccak.Write([]byte(msg.Msg))
keccak.Sum(hash[:0])
fmt.Println(hex.EncodeToString(hash[:]))
return nil
}
},
}
cmd.Flags().String("label", "", "A human-readable name for this contract in lists")
flags.AddTxFlagsToCmd(cmd)
return cmd
}

View File

@ -23,6 +23,12 @@ func NewHandler(k keeper.Keeper) sdk.Handler {
case *types.MsgRegisterAccountAsGuardian:
res, err := msgServer.RegisterAccountAsGuardian(sdk.WrapSDKContext(ctx), msg)
return sdk.WrapServiceResult(ctx, res, err)
case *types.MsgStoreCode:
res, err := msgServer.StoreCode(sdk.WrapSDKContext(ctx), msg)
return sdk.WrapServiceResult(ctx, res, err)
case *types.MsgInstantiateContract:
res, err := msgServer.InstantiateContract(sdk.WrapSDKContext(ctx), msg)
return sdk.WrapServiceResult(ctx, res, err)
// this line is used by starport scaffolding # 1
default:
errMsg := fmt.Sprintf("unrecognized %s message type: %T", types.ModuleName, msg)

View File

@ -21,7 +21,7 @@ var _ = strconv.IntSize
func TestGuardianValidatorQuerySingle(t *testing.T) {
keeper, ctx := keepertest.WormholeKeeper(t)
wctx := sdk.WrapSDKContext(ctx)
msgs := createNGuardianValidator(keeper, ctx, 2)
msgs, _ := createNGuardianValidator(keeper, ctx, 2)
for _, tc := range []struct {
desc string
request *types.QueryGetGuardianValidatorRequest
@ -71,7 +71,7 @@ func TestGuardianValidatorQuerySingle(t *testing.T) {
func TestGuardianValidatorQueryPaginated(t *testing.T) {
keeper, ctx := keepertest.WormholeKeeper(t)
wctx := sdk.WrapSDKContext(ctx)
msgs := createNGuardianValidator(keeper, ctx, 5)
msgs, _ := createNGuardianValidator(keeper, ctx, 5)
request := func(next []byte, offset, limit uint64, total bool) *types.QueryAllGuardianValidatorRequest {
return &types.QueryAllGuardianValidatorRequest{

View File

@ -1,10 +1,12 @@
package keeper_test
import (
"strconv"
"crypto/ecdsa"
"crypto/rand"
"testing"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/stretchr/testify/require"
keepertest "github.com/wormhole-foundation/wormhole-chain/testutil/keeper"
"github.com/wormhole-foundation/wormhole-chain/testutil/nullify"
@ -12,22 +14,43 @@ import (
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/types"
)
// Prevent strconv unused error
var _ = strconv.IntSize
func createNGuardianValidator(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.GuardianValidator {
// Create N guardians and return both their public and private keys
func createNGuardianValidator(keeper *keeper.Keeper, ctx sdk.Context, n int) ([]types.GuardianValidator, []*ecdsa.PrivateKey) {
items := make([]types.GuardianValidator, n)
privKeys := []*ecdsa.PrivateKey{}
for i := range items {
items[i].GuardianKey = []byte(strconv.Itoa(i))
privKey, err := ecdsa.GenerateKey(crypto.S256(), rand.Reader)
if err != nil {
panic(err)
}
addr := crypto.PubkeyToAddress(privKey.PublicKey)
items[i].GuardianKey = addr[:]
privKeys = append(privKeys, privKey)
keeper.SetGuardianValidator(ctx, items[i])
}
return items
return items, privKeys
}
func createNewGuardianSet(keeper *keeper.Keeper, ctx sdk.Context, guardians []types.GuardianValidator) *types.GuardianSet {
next_index := keeper.GetGuardianSetCount(ctx)
guardianSet := &types.GuardianSet{
Index: next_index,
Keys: [][]byte{},
ExpirationTime: 0,
}
for _, guardian := range guardians {
guardianSet.Keys = append(guardianSet.Keys, guardian.GuardianKey)
}
keeper.AppendGuardianSet(ctx, *guardianSet)
return guardianSet
}
func TestGuardianValidatorGet(t *testing.T) {
keeper, ctx := keepertest.WormholeKeeper(t)
items := createNGuardianValidator(keeper, ctx, 10)
items, _ := createNGuardianValidator(keeper, ctx, 10)
for _, item := range items {
rst, found := keeper.GetGuardianValidator(ctx,
item.GuardianKey,
@ -41,7 +64,7 @@ func TestGuardianValidatorGet(t *testing.T) {
}
func TestGuardianValidatorRemove(t *testing.T) {
keeper, ctx := keepertest.WormholeKeeper(t)
items := createNGuardianValidator(keeper, ctx, 10)
items, _ := createNGuardianValidator(keeper, ctx, 10)
for _, item := range items {
keeper.RemoveGuardianValidator(ctx,
item.GuardianKey,
@ -55,7 +78,7 @@ func TestGuardianValidatorRemove(t *testing.T) {
func TestGuardianValidatorGetAll(t *testing.T) {
keeper, ctx := keepertest.WormholeKeeper(t)
items := createNGuardianValidator(keeper, ctx, 10)
items, _ := createNGuardianValidator(keeper, ctx, 10)
require.ElementsMatch(t,
nullify.Fill(items),
nullify.Fill(keeper.GetAllGuardianValidator(ctx)),

View File

@ -18,6 +18,8 @@ type (
accountKeeper types.AccountKeeper
bankKeeper types.BankKeeper
wasmdKeeper types.WasmdKeeper
setWasmd bool
}
)
@ -37,6 +39,17 @@ func NewKeeper(
}
}
// This is necessary because x/staking relies on x/wormhole and x/wasmd relies on x/staking,
// So we must either:
// 1. make wormhole depend on staking and replace the modified functions from here.
// 2. add a new module that wraps x/wasmd instead of using x/wormhole.
// 3. (current) set wasmdKeeper late in init and use guards whenever it's referenced.
// Opted for (3) as we only reference in two places.
func (k *Keeper) SetWasmdKeeper(keeper types.WasmdKeeper) {
k.wasmdKeeper = keeper
k.setWasmd = true
}
func (k Keeper) Logger(ctx sdk.Context) log.Logger {
return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName))
}

View File

@ -1,7 +1,6 @@
package keeper
import (
"bytes"
"context"
"encoding/binary"
@ -13,6 +12,7 @@ import (
type GovernanceAction uint8
var (
ActionContractUpgrade GovernanceAction = 1
ActionGuardianSetUpdate GovernanceAction = 2
)
@ -25,50 +25,16 @@ func (k msgServer) ExecuteGovernanceVAA(goCtx context.Context, msg *types.MsgExe
return nil, err
}
coreModule := [32]byte{}
copy(coreModule[:], vaa.CoreModule)
// Verify VAA
err = k.VerifyVAA(ctx, v)
action, payload, err := k.VerifyGovernanceVAA(ctx, v, coreModule)
if err != nil {
return nil, err
}
config, ok := k.GetConfig(ctx)
if !ok {
return nil, types.ErrNoConfig
}
_, known := k.GetReplayProtection(ctx, v.HexDigest())
if known {
return nil, types.ErrVAAAlreadyExecuted
}
// Check governance emitter
if !bytes.Equal(v.EmitterAddress[:], config.GovernanceEmitter) {
return nil, types.ErrInvalidGovernanceEmitter
}
if v.EmitterChain != vaa.ChainID(config.GovernanceChain) {
return nil, types.ErrInvalidGovernanceEmitter
}
if len(v.Payload) < 35 {
return nil, types.ErrGovernanceHeaderTooShort
}
// Check governance header
if !bytes.Equal(v.Payload[:32], vaa.CoreModule) {
return nil, types.ErrUnknownGovernanceModule
}
// Decode header
action := GovernanceAction(v.Payload[32])
chain := binary.BigEndian.Uint16(v.Payload[33:35])
payload := v.Payload[35:]
if chain != 0 && chain != uint16(config.ChainId) {
return nil, types.ErrInvalidGovernanceTargetChain
}
// Execute action
switch action {
switch GovernanceAction(action) {
case ActionGuardianSetUpdate:
if len(payload) < 5 {
return nil, types.ErrInvalidGovernancePayloadLength
@ -105,8 +71,5 @@ func (k msgServer) ExecuteGovernanceVAA(goCtx context.Context, msg *types.MsgExe
}
// Prevent replay
k.SetReplayProtection(ctx, types.ReplayProtection{Index: v.HexDigest()})
return &types.MsgExecuteGovernanceVAAResponse{}, nil
}

View File

@ -0,0 +1,109 @@
package keeper_test
import (
"crypto/ecdsa"
"encoding/binary"
"testing"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/assert"
keepertest "github.com/wormhole-foundation/wormhole-chain/testutil/keeper"
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/keeper"
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/types"
"github.com/wormhole-foundation/wormhole/sdk/vaa"
)
func createExecuteGovernanceVaaPayload(k *keeper.Keeper, ctx sdk.Context, num_guardians byte) ([]byte, []*ecdsa.PrivateKey) {
guardians, privateKeys := createNGuardianValidator(k, ctx, int(num_guardians))
next_index := k.GetGuardianSetCount(ctx)
set_update := make([]byte, 4)
binary.BigEndian.PutUint32(set_update, next_index)
set_update = append(set_update, num_guardians)
// Add keys to set_update
for _, guardian := range guardians {
set_update = append(set_update, guardian.GuardianKey...)
}
// governance message with sha3 of wasmBytes as the payload
module := [32]byte{}
copy(module[:], vaa.CoreModule)
gov_msg := types.NewGovernanceMessage(module, byte(keeper.ActionGuardianSetUpdate), uint16(vaa.ChainIDWormchain), set_update)
return gov_msg.MarshalBinary(), privateKeys
}
func TestExecuteGovernanceVAA(t *testing.T) {
k, ctx := keepertest.WormholeKeeper(t)
guardians, privateKeys := createNGuardianValidator(k, ctx, 10)
_ = privateKeys
k.SetConfig(ctx, types.Config{
GovernanceEmitter: vaa.GovernanceEmitter[:],
GovernanceChain: uint32(vaa.GovernanceChain),
ChainId: uint32(vaa.ChainIDWormchain),
GuardianSetExpiration: 86400,
})
signer_bz := [20]byte{}
signer := sdk.AccAddress(signer_bz[:])
set := createNewGuardianSet(k, ctx, guardians)
k.SetConsensusGuardianSetIndex(ctx, types.ConsensusGuardianSetIndex{Index: set.Index})
context := sdk.WrapSDKContext(ctx)
msgServer := keeper.NewMsgServerImpl(*k)
// create governance to update guardian set with extra guardian
payload, newPrivateKeys := createExecuteGovernanceVaaPayload(k, ctx, 11)
v := generateVaa(set.Index, privateKeys, vaa.ChainID(vaa.GovernanceChain), payload)
vBz, _ := v.Marshal()
_, err := msgServer.ExecuteGovernanceVAA(context, &types.MsgExecuteGovernanceVAA{
Signer: signer.String(),
Vaa: vBz,
})
assert.NoError(t, err)
// we should have a new set with 11 guardians now
new_index := k.GetLatestGuardianSetIndex(ctx)
assert.Equal(t, set.Index+1, new_index)
new_set, _ := k.GetGuardianSet(ctx, new_index)
assert.Len(t, new_set.Keys, 11)
// Submitting another change with the old set doesn't work
v = generateVaa(set.Index, privateKeys, vaa.ChainID(vaa.GovernanceChain), payload)
vBz, _ = v.Marshal()
_, err = msgServer.ExecuteGovernanceVAA(context, &types.MsgExecuteGovernanceVAA{
Signer: signer.String(),
Vaa: vBz,
})
assert.ErrorIs(t, err, types.ErrGuardianSetNotSequential)
// Invalid length
v = generateVaa(set.Index, privateKeys, vaa.ChainID(vaa.GovernanceChain), payload[:len(payload)-1])
vBz, _ = v.Marshal()
_, err = msgServer.ExecuteGovernanceVAA(context, &types.MsgExecuteGovernanceVAA{
Signer: signer.String(),
Vaa: vBz,
})
assert.ErrorIs(t, err, types.ErrInvalidGovernancePayloadLength)
// Include a guardian address twice in an update
payload_bad, _ := createExecuteGovernanceVaaPayload(k, ctx, 11)
copy(payload_bad[len(payload_bad)-20:], payload_bad[len(payload_bad)-40:len(payload_bad)-20])
v = generateVaa(set.Index, privateKeys, vaa.ChainID(vaa.GovernanceChain), payload_bad)
vBz, _ = v.Marshal()
_, err = msgServer.ExecuteGovernanceVAA(context, &types.MsgExecuteGovernanceVAA{
Signer: signer.String(),
Vaa: vBz,
})
assert.ErrorIs(t, err, types.ErrDuplicateGuardianAddress)
// Change set again with new set update
payload, _ = createExecuteGovernanceVaaPayload(k, ctx, 12)
v = generateVaa(new_set.Index, newPrivateKeys, vaa.ChainID(vaa.GovernanceChain), payload)
vBz, _ = v.Marshal()
_, err = msgServer.ExecuteGovernanceVAA(context, &types.MsgExecuteGovernanceVAA{
Signer: signer.String(),
Vaa: vBz,
})
assert.NoError(t, err)
new_index2 := k.GetLatestGuardianSetIndex(ctx)
assert.Equal(t, new_set.Index+1, new_index2)
}

View File

@ -0,0 +1,127 @@
package keeper
import (
"bytes"
"context"
"encoding/binary"
wasmdtypes "github.com/CosmWasm/wasmd/x/wasm/types"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/types"
"golang.org/x/crypto/sha3"
)
// WasmdModule is the identifier of the Wasmd module (which is used for governance messages)
var WasmdModule = [32]byte{00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 0x57, 0x61, 0x73, 0x6D, 0x64, 0x4D, 0x6F, 0x64, 0x75, 0x6C, 0x65}
var (
ActionStoreCode GovernanceAction = 1
ActionInstantiateContract GovernanceAction = 2
)
// Simple wrapper of x/wasmd StoreCode that requires a VAA
func (k msgServer) StoreCode(goCtx context.Context, msg *types.MsgStoreCode) (*types.MsgStoreCodeResponse, error) {
if !k.setWasmd {
return nil, sdkerrors.Wrapf(sdkerrors.ErrNotSupported, "x/wasmd not set")
}
ctx := sdk.UnwrapSDKContext(goCtx)
// Parse VAA
v, err := ParseVAA(msg.Vaa)
if err != nil {
return nil, err
}
// Verify VAA
action, payload, err := k.VerifyGovernanceVAA(ctx, v, WasmdModule)
if err != nil {
return nil, err
}
if GovernanceAction(action) != ActionStoreCode {
return nil, types.ErrUnknownGovernanceAction
}
// verify payload is the sha3 256 hash of the wasm binary being uploaded
var expected_hash [32]byte
keccak := sha3.NewLegacyKeccak256()
keccak.Write(msg.WASMByteCode)
keccak.Sum(expected_hash[:0])
if !bytes.Equal(payload, expected_hash[:]) {
return nil, types.ErrInvalidHash
}
// Execute StoreCode normally
senderAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
return nil, sdkerrors.Wrap(err, "signer")
}
ctx.EventManager().EmitEvent(sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Signer),
))
codeID, err := k.wasmdKeeper.Create(ctx, senderAddr, msg.WASMByteCode, &wasmdtypes.DefaultUploadAccess)
if err != nil {
return nil, err
}
return &types.MsgStoreCodeResponse{
CodeID: codeID,
}, nil
}
// Simple wrapper of x/wasmd InstantiateContract that requires a VAA
func (k msgServer) InstantiateContract(goCtx context.Context, msg *types.MsgInstantiateContract) (*types.MsgInstantiateContractResponse, error) {
if !k.setWasmd {
return nil, sdkerrors.Wrapf(sdkerrors.ErrNotSupported, "x/wasmd not set")
}
ctx := sdk.UnwrapSDKContext(goCtx)
// Parse VAA
v, err := ParseVAA(msg.Vaa)
if err != nil {
return nil, err
}
// Verify VAA
action, payload, err := k.VerifyGovernanceVAA(ctx, v, WasmdModule)
if err != nil {
return nil, err
}
if GovernanceAction(action) != ActionInstantiateContract {
return nil, types.ErrUnknownGovernanceAction
}
// Need to verify the msg contents by checking sha3.Sum(BigEndian(CodeID) || Label || Msg)
// The vaa governance payload must contain this hash.
var expected_hash [32]byte
keccak := sha3.NewLegacyKeccak256()
binary.Write(keccak, binary.BigEndian, msg.CodeID)
keccak.Write([]byte(msg.Label))
keccak.Write([]byte(msg.Msg))
keccak.Sum(expected_hash[:0])
if !bytes.Equal(payload, expected_hash[:]) {
return nil, types.ErrInvalidHash
}
// Execute Instantiate normally
senderAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
return nil, sdkerrors.Wrap(err, "signer")
}
ctx.EventManager().EmitEvent(sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Signer),
))
contract_addr, data, err := k.wasmdKeeper.Instantiate(ctx, msg.CodeID, senderAddr, sdk.AccAddress{}, msg.Msg, msg.Label, sdk.Coins{})
if err != nil {
return nil, err
}
return &types.MsgInstantiateContractResponse{
Address: contract_addr.String(),
Data: data,
}, nil
}

View File

@ -0,0 +1,229 @@
package keeper_test
import (
"bytes"
"encoding/binary"
"testing"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/tendermint/crypto/sha3"
keepertest "github.com/wormhole-foundation/wormhole-chain/testutil/keeper"
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/keeper"
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/types"
"github.com/wormhole-foundation/wormhole/sdk/vaa"
)
func createWasmStoreCodePayload(wasmBytes []byte) []byte {
// governance message with sha3 of wasmBytes as the payload
var hashWasm [32]byte
keccak := sha3.NewLegacyKeccak256()
keccak.Write(wasmBytes)
keccak.Sum(hashWasm[:0])
gov_msg := types.NewGovernanceMessage(keeper.WasmdModule, byte(keeper.ActionStoreCode), uint16(vaa.ChainIDWormchain), hashWasm[:])
return gov_msg.MarshalBinary()
}
func createWasmInstantiatePayload(code_id uint64, label string, json_msg string) []byte {
// governance message with sha3 of arguments to instantiate
// - code_id (big endian)
// - label
// - json_msg
var expected_hash [32]byte
keccak := sha3.NewLegacyKeccak256()
binary.Write(keccak, binary.BigEndian, code_id)
keccak.Write([]byte(label))
keccak.Write([]byte(json_msg))
keccak.Sum(expected_hash[:0])
var payload bytes.Buffer
payload.Write(keeper.WasmdModule[:])
payload.Write([]byte{byte(keeper.ActionInstantiateContract)})
binary.Write(&payload, binary.BigEndian, uint16(vaa.ChainIDWormchain))
// custom payload
payload.Write(expected_hash[:])
return payload.Bytes()
}
func TestWasmdStoreCode(t *testing.T) {
k, ctx := keepertest.WormholeKeeper(t)
guardians, privateKeys := createNGuardianValidator(k, ctx, 10)
_ = privateKeys
k.SetConfig(ctx, types.Config{
GovernanceEmitter: vaa.GovernanceEmitter[:],
GovernanceChain: uint32(vaa.GovernanceChain),
ChainId: uint32(vaa.ChainIDWormchain),
GuardianSetExpiration: 86400,
})
signer_bz := [20]byte{}
signer := sdk.AccAddress(signer_bz[:])
set := createNewGuardianSet(k, ctx, guardians)
context := sdk.WrapSDKContext(ctx)
msgServer := keeper.NewMsgServerImpl(*k)
// create governance to store code
payload := createWasmStoreCodePayload(keepertest.EXAMPLE_WASM_CONTRACT_GZIP)
v := generateVaa(set.Index, privateKeys, vaa.ChainID(vaa.GovernanceChain), payload)
vBz, err := v.Marshal()
assert.NoError(t, err)
// store code should work
res, err := msgServer.StoreCode(context, &types.MsgStoreCode{
Signer: signer.String(),
WASMByteCode: keepertest.EXAMPLE_WASM_CONTRACT_GZIP,
Vaa: vBz,
})
_ = res
assert.NoError(t, err)
// replay attack does not work.
_, err = msgServer.StoreCode(context, &types.MsgStoreCode{
Signer: signer.String(),
WASMByteCode: keepertest.EXAMPLE_WASM_CONTRACT_GZIP,
Vaa: vBz,
})
assert.ErrorIs(t, err, types.ErrVAAAlreadyExecuted)
// modified wasm byte code does not verify
bad_wasm := make([]byte, len(keepertest.EXAMPLE_WASM_CONTRACT_GZIP))
copy(bad_wasm, keepertest.EXAMPLE_WASM_CONTRACT_GZIP)
bad_wasm[100] = bad_wasm[100] ^ 0x40
// create vaa with the hash of the "valid" wasm
v = generateVaa(set.Index, privateKeys, vaa.ChainID(vaa.GovernanceChain), payload)
vBz, _ = v.Marshal()
_, err = msgServer.StoreCode(context, &types.MsgStoreCode{
Signer: signer.String(),
WASMByteCode: bad_wasm,
Vaa: vBz,
})
assert.ErrorIs(t, err, types.ErrInvalidHash)
// Sending to wrong module is error
payload_wrong_module := createWasmStoreCodePayload(keepertest.EXAMPLE_WASM_CONTRACT_GZIP)
// tamper with the module id
payload_wrong_module[16] = 0xff
v = generateVaa(set.Index, privateKeys, vaa.ChainID(vaa.GovernanceChain), payload_wrong_module)
vBz, _ = v.Marshal()
_, err = msgServer.StoreCode(context, &types.MsgStoreCode{
Signer: signer.String(),
WASMByteCode: bad_wasm,
Vaa: vBz,
})
assert.ErrorIs(t, err, types.ErrUnknownGovernanceModule)
}
func TestWasmdInstantiateContract(t *testing.T) {
k, ctx := keepertest.WormholeKeeper(t)
guardians, privateKeys := createNGuardianValidator(k, ctx, 10)
_ = privateKeys
k.SetConfig(ctx, types.Config{
GovernanceEmitter: vaa.GovernanceEmitter[:],
GovernanceChain: uint32(vaa.GovernanceChain),
ChainId: uint32(vaa.ChainIDWormchain),
GuardianSetExpiration: 86400,
})
signer_bz := [20]byte{}
signer := sdk.AccAddress(signer_bz[:])
set := createNewGuardianSet(k, ctx, guardians)
context := sdk.WrapSDKContext(ctx)
msgServer := keeper.NewMsgServerImpl(*k)
// First we need to upload code that we can instantiate.
payload := createWasmStoreCodePayload(keepertest.EXAMPLE_WASM_CONTRACT_GZIP)
v := generateVaa(set.Index, privateKeys, vaa.ChainID(vaa.GovernanceChain), payload)
vBz, err := v.Marshal()
assert.NoError(t, err)
res, err := msgServer.StoreCode(context, &types.MsgStoreCode{
Signer: signer.String(),
WASMByteCode: keepertest.EXAMPLE_WASM_CONTRACT_GZIP,
Vaa: vBz,
})
assert.NoError(t, err)
code_id := res.CodeID
// Now that we have a code_id, we can test instantiating it.
payload = createWasmInstantiatePayload(code_id, "btc", "{}")
v = generateVaa(set.Index, privateKeys, vaa.ChainID(vaa.GovernanceChain), payload)
vBz, _ = v.Marshal()
_, err = msgServer.InstantiateContract(context, &types.MsgInstantiateContract{
Signer: signer.String(),
CodeID: code_id,
Label: "btc",
Msg: []byte("{}"),
Vaa: vBz,
})
require.NoError(t, err)
// Test instantiating with invalid json fails
payload = createWasmInstantiatePayload(code_id, "btc", "{")
v = generateVaa(set.Index, privateKeys, vaa.ChainID(vaa.GovernanceChain), payload)
vBz, _ = v.Marshal()
_, err = msgServer.InstantiateContract(context, &types.MsgInstantiateContract{
Signer: signer.String(),
CodeID: code_id,
Label: "btc",
Msg: []byte("{"),
Vaa: vBz,
})
require.Error(t, err)
// Test that tampering with either code_id, label, or msg fails vaa check
payload = createWasmInstantiatePayload(code_id, "btc", "{}")
v = generateVaa(set.Index, privateKeys, vaa.ChainID(vaa.GovernanceChain), payload)
vBz, _ = v.Marshal()
_, err = msgServer.InstantiateContract(context, &types.MsgInstantiateContract{
Signer: signer.String(),
CodeID: code_id + 1,
Label: "btc",
Msg: []byte("{}"),
Vaa: vBz,
})
// Bad code_id
assert.ErrorIs(t, err, types.ErrInvalidHash)
v = generateVaa(set.Index, privateKeys, vaa.ChainID(vaa.GovernanceChain), payload)
vBz, _ = v.Marshal()
_, err = msgServer.InstantiateContract(context, &types.MsgInstantiateContract{
Signer: signer.String(),
CodeID: code_id,
Label: "btc_bad",
Msg: []byte("{}"),
Vaa: vBz,
})
// Bad label
assert.ErrorIs(t, err, types.ErrInvalidHash)
v = generateVaa(set.Index, privateKeys, vaa.ChainID(vaa.GovernanceChain), payload)
vBz, _ = v.Marshal()
_, err = msgServer.InstantiateContract(context, &types.MsgInstantiateContract{
Signer: signer.String(),
CodeID: code_id,
Label: "btc",
Msg: []byte("{\"arg\":\"bad\"}"),
Vaa: vBz,
})
// Bad msg
assert.ErrorIs(t, err, types.ErrInvalidHash)
// Sending to wrong module is error
payload_wrong_module := createWasmInstantiatePayload(code_id, "btc", "{}")
// tamper with the module id
payload_wrong_module[16] = 0xff
v = generateVaa(set.Index, privateKeys, vaa.ChainID(vaa.GovernanceChain), payload_wrong_module)
vBz, _ = v.Marshal()
_, err = msgServer.InstantiateContract(context, &types.MsgInstantiateContract{
Signer: signer.String(),
CodeID: code_id,
Label: "btc",
Msg: []byte("{\"arg\":\"bad\"}"),
Vaa: vBz,
})
assert.ErrorIs(t, err, types.ErrUnknownGovernanceModule)
}

View File

@ -1,6 +1,9 @@
package keeper
import (
"bytes"
"encoding/binary"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/types"
"github.com/wormhole-foundation/wormhole/sdk/vaa"
@ -47,3 +50,59 @@ func (k Keeper) VerifyVAA(ctx sdk.Context, vaa *vaa.VAA) error {
return nil
}
// Verify a governance VAA:
// - Check signatures
// - Replay protection
// - Check the source chain and address is governance
// - Check the governance payload is for wormchain and the specified module
// - return the parsed action and governance payload
func (k Keeper) VerifyGovernanceVAA(ctx sdk.Context, v *vaa.VAA, module [32]byte) (action byte, payload []byte, err error) {
if err = k.VerifyVAA(ctx, v); err != nil {
return
}
_, known := k.GetReplayProtection(ctx, v.HexDigest())
if known {
err = types.ErrVAAAlreadyExecuted
return
}
// Prevent replay
k.SetReplayProtection(ctx, types.ReplayProtection{Index: v.HexDigest()})
config, ok := k.GetConfig(ctx)
if !ok {
err = types.ErrNoConfig
return
}
if !bytes.Equal(v.EmitterAddress[:], config.GovernanceEmitter) {
err = types.ErrInvalidGovernanceEmitter
return
}
if v.EmitterChain != vaa.ChainID(config.GovernanceChain) {
err = types.ErrInvalidGovernanceEmitter
return
}
if len(v.Payload) < 35 {
err = types.ErrGovernanceHeaderTooShort
return
}
// Check governance header
if !bytes.Equal(v.Payload[:32], module[:]) {
err = types.ErrUnknownGovernanceModule
return
}
// Decode header
action = v.Payload[32]
chain := binary.BigEndian.Uint16(v.Payload[33:35])
payload = v.Payload[35:]
if chain != 0 && chain != uint16(config.ChainId) {
err = types.ErrInvalidGovernanceTargetChain
return
}
return
}

View File

@ -3,6 +3,7 @@ package keeper_test
import (
"crypto/ecdsa"
"crypto/rand"
"encoding/binary"
"fmt"
"testing"
"time"
@ -43,26 +44,38 @@ func TestCalculateQuorum(t *testing.T) {
}
}
func getVaa() vaa.VAA {
var payload = []byte{97, 97, 97, 97, 97, 97}
var governanceEmitter = vaa.Address{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4}
var lastestSequence = 1
return vaa.VAA{
func generateVaa(index uint32, signers []*ecdsa.PrivateKey, emitterChain vaa.ChainID, payload []byte) vaa.VAA {
v := vaa.VAA{
Version: uint8(1),
GuardianSetIndex: uint32(0),
GuardianSetIndex: index,
Signatures: nil,
Timestamp: time.Unix(0, 0),
Nonce: uint32(1),
Sequence: uint64(1),
Sequence: uint64(lastestSequence),
ConsistencyLevel: uint8(32),
EmitterChain: vaa.ChainIDSolana,
EmitterAddress: governanceEmitter,
EmitterAddress: vaa.Address(vaa.GovernanceEmitter),
Payload: payload,
}
lastestSequence = lastestSequence + 1
for i, key := range signers {
v.AddSignature(key, uint8(i))
}
return v
}
func resignVaa(v vaa.VAA, signers []*ecdsa.PrivateKey) vaa.VAA {
v.Signatures = []*vaa.Signature{}
for i, key := range signers {
v.AddSignature(key, uint8(i))
}
return v
}
func TestVerifyVAA(t *testing.T) {
payload := []byte{97, 97, 97, 97, 97, 97}
privKey1, _ := ecdsa.GenerateKey(crypto.S256(), rand.Reader)
privKey2, _ := ecdsa.GenerateKey(crypto.S256(), rand.Reader)
@ -95,11 +108,7 @@ func TestVerifyVAA(t *testing.T) {
for _, tc := range tests {
t.Run(tc.label, func(t *testing.T) {
keeper, ctx := keepertest.WormholeKeeper(t)
vaa := getVaa()
for i, key := range tc.signers {
vaa.AddSignature(key, uint8(i))
}
vaa := generateVaa(tc.guardianSet.Index, tc.signers, vaa.ChainIDSolana, payload)
keeper.AppendGuardianSet(ctx, tc.guardianSet)
err := keeper.VerifyVAA(ctx, &vaa)
@ -112,3 +121,97 @@ func TestVerifyVAA(t *testing.T) {
})
}
}
func TestVerifyVAA2(t *testing.T) {
keeper, ctx := keepertest.WormholeKeeper(t)
guardians, privateKeys := createNGuardianValidator(keeper, ctx, 25)
set := createNewGuardianSet(keeper, ctx, guardians)
// check verify works
payload := []byte{97, 97, 97, 97, 97, 97}
v := generateVaa(set.Index, privateKeys, vaa.ChainIDSolana, payload)
err := keeper.VerifyVAA(ctx, &v)
assert.NoError(t, err)
// flip a bit in one of the signatures
v = generateVaa(set.Index, privateKeys, vaa.ChainIDSolana, payload)
v.Signatures[20].Signature[1] = v.Signatures[20].Signature[1] ^ 0x40
err = keeper.VerifyVAA(ctx, &v)
assert.Error(t, err)
// generate for a non existing guardian set
v = generateVaa(set.Index+1, privateKeys, vaa.ChainIDSolana, payload)
err = keeper.VerifyVAA(ctx, &v)
assert.Error(t, err)
}
func TestVerifyVAAGovernance(t *testing.T) {
keeper, ctx := keepertest.WormholeKeeper(t)
guardians, privateKeys := createNGuardianValidator(keeper, ctx, 25)
set := createNewGuardianSet(keeper, ctx, guardians)
config := types.Config{
GovernanceEmitter: vaa.GovernanceEmitter[:],
GovernanceChain: uint32(vaa.GovernanceChain),
ChainId: uint32(vaa.ChainIDWormchain),
GuardianSetExpiration: 86400,
}
keeper.SetConfig(ctx, config)
action := byte(0x12)
our_module := [32]byte{00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 01}
payload := []byte{}
// governance payload is {module_id, action, chain, payload}
payload = append(payload, our_module[:]...)
payload = append(payload, action)
chain_bz := [2]byte{}
binary.BigEndian.PutUint16(chain_bz[:], uint16(vaa.ChainIDWormchain))
payload = append(payload, chain_bz[:]...)
// custom payload
custom_payload := []byte{1, 2, 3, 4, 5}
payload = append(payload, custom_payload...)
v := generateVaa(set.Index, privateKeys, vaa.ChainID(vaa.GovernanceChain), payload)
err := keeper.VerifyVAA(ctx, &v)
assert.NoError(t, err)
parsed_action, parsed_payload, err := keeper.VerifyGovernanceVAA(ctx, &v, our_module)
assert.NoError(t, err)
assert.Equal(t, action, parsed_action)
assert.Equal(t, custom_payload, parsed_payload)
// verifying a second time will return error because of replay protection
_, _, err = keeper.VerifyGovernanceVAA(ctx, &v, our_module)
assert.ErrorIs(t, err, types.ErrVAAAlreadyExecuted)
// Expect error if module-id is different
v = generateVaa(set.Index, privateKeys, vaa.ChainID(vaa.GovernanceChain), payload)
bad_module := [32]byte{}
bad_module[31] = 0xff
_, _, err = keeper.VerifyGovernanceVAA(ctx, &v, bad_module)
assert.ErrorIs(t, err, types.ErrUnknownGovernanceModule)
// Expect error if we're not using the right governance emitter address
v = generateVaa(set.Index, privateKeys, vaa.ChainID(vaa.GovernanceChain), payload)
v.EmitterAddress[5] = 0xff
v = resignVaa(v, privateKeys)
_, _, err = keeper.VerifyGovernanceVAA(ctx, &v, our_module)
assert.ErrorIs(t, err, types.ErrInvalidGovernanceEmitter)
// Expect error if we're not using the right governance emitter chain
v = generateVaa(set.Index, privateKeys, vaa.ChainID(vaa.GovernanceChain), payload)
v.EmitterChain = vaa.ChainIDEthereum
v = resignVaa(v, privateKeys)
_, _, err = keeper.VerifyGovernanceVAA(ctx, &v, our_module)
assert.ErrorIs(t, err, types.ErrInvalidGovernanceEmitter)
// Expect error if we're using a small payload
v = generateVaa(set.Index, privateKeys, vaa.ChainID(vaa.GovernanceChain), payload[:34])
_, _, err = keeper.VerifyGovernanceVAA(ctx, &v, our_module)
assert.ErrorIs(t, err, types.ErrGovernanceHeaderTooShort)
// Expect error if we're using a different target chain
payload[33] = 0xff
payload[34] = 0xff
v = generateVaa(set.Index, privateKeys, vaa.ChainID(vaa.GovernanceChain), payload)
_, _, err = keeper.VerifyGovernanceVAA(ctx, &v, our_module)
assert.ErrorIs(t, err, types.ErrInvalidGovernanceTargetChain)
}

View File

@ -11,12 +11,16 @@ import (
func RegisterCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgExecuteGovernanceVAA{}, "wormhole/ExecuteGovernanceVAA", nil)
cdc.RegisterConcrete(&MsgRegisterAccountAsGuardian{}, "wormhole/RegisterAccountAsGuardian", nil)
cdc.RegisterConcrete(&MsgStoreCode{}, "wormhole/StoreCode", nil)
cdc.RegisterConcrete(&MsgInstantiateContract{}, "wormhole/InstantiateContract", nil)
// this line is used by starport scaffolding # 2
}
func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgExecuteGovernanceVAA{},
&MsgStoreCode{},
&MsgInstantiateContract{},
)
registry.RegisterImplementations((*gov.Content)(nil),
&GovernanceWormholeMessageProposal{},

View File

@ -1,430 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: wormhole/config.proto
package types
import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type Config struct {
GuardianSetExpiration uint64 `protobuf:"varint,1,opt,name=guardian_set_expiration,json=guardianSetExpiration,proto3" json:"guardian_set_expiration,omitempty"`
GovernanceEmitter []byte `protobuf:"bytes,2,opt,name=governance_emitter,json=governanceEmitter,proto3" json:"governance_emitter,omitempty"`
GovernanceChain uint32 `protobuf:"varint,3,opt,name=governance_chain,json=governanceChain,proto3" json:"governance_chain,omitempty"`
ChainId uint32 `protobuf:"varint,4,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
}
func (m *Config) Reset() { *m = Config{} }
func (m *Config) String() string { return proto.CompactTextString(m) }
func (*Config) ProtoMessage() {}
func (*Config) Descriptor() ([]byte, []int) {
return fileDescriptor_14d08d38823c924a, []int{0}
}
func (m *Config) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Config.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 *Config) XXX_Merge(src proto.Message) {
xxx_messageInfo_Config.Merge(m, src)
}
func (m *Config) XXX_Size() int {
return m.Size()
}
func (m *Config) XXX_DiscardUnknown() {
xxx_messageInfo_Config.DiscardUnknown(m)
}
var xxx_messageInfo_Config proto.InternalMessageInfo
func (m *Config) GetGuardianSetExpiration() uint64 {
if m != nil {
return m.GuardianSetExpiration
}
return 0
}
func (m *Config) GetGovernanceEmitter() []byte {
if m != nil {
return m.GovernanceEmitter
}
return nil
}
func (m *Config) GetGovernanceChain() uint32 {
if m != nil {
return m.GovernanceChain
}
return 0
}
func (m *Config) GetChainId() uint32 {
if m != nil {
return m.ChainId
}
return 0
}
func init() {
proto.RegisterType((*Config)(nil), "certusone.wormholechain.wormhole.Config")
}
func init() { proto.RegisterFile("wormhole/config.proto", fileDescriptor_14d08d38823c924a) }
var fileDescriptor_14d08d38823c924a = []byte{
// 269 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0x31, 0x4e, 0xc3, 0x30,
0x14, 0x86, 0x63, 0xa8, 0x0a, 0xb2, 0x40, 0x80, 0x45, 0x45, 0x60, 0xb0, 0x22, 0xa6, 0x30, 0x34,
0x1e, 0x40, 0x1c, 0x80, 0xaa, 0x03, 0x0b, 0x43, 0xd8, 0x58, 0xa2, 0x34, 0x79, 0x38, 0x96, 0x88,
0x5f, 0x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x28, 0xc3, 0x52, 0x0c, 0xa5, 0x88, 0xbe,
0x86, 0xa9, 0x5b, 0x20, 0x96, 0x43, 0x20, 0xec, 0x67, 0x05, 0xf5, 0x62, 0xec, 0xea, 0xb8, 0xfd,
0x0f, 0x00, 0x00, 0xff, 0xff, 0x61, 0xcb, 0x83, 0x1f, 0x5f, 0x01, 0x00, 0x00,
}
func (m *Config) 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 *Config) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Config) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.ChainId != 0 {
i = encodeVarintConfig(dAtA, i, uint64(m.ChainId))
i--
dAtA[i] = 0x20
}
if m.GovernanceChain != 0 {
i = encodeVarintConfig(dAtA, i, uint64(m.GovernanceChain))
i--
dAtA[i] = 0x18
}
if len(m.GovernanceEmitter) > 0 {
i -= len(m.GovernanceEmitter)
copy(dAtA[i:], m.GovernanceEmitter)
i = encodeVarintConfig(dAtA, i, uint64(len(m.GovernanceEmitter)))
i--
dAtA[i] = 0x12
}
if m.GuardianSetExpiration != 0 {
i = encodeVarintConfig(dAtA, i, uint64(m.GuardianSetExpiration))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func encodeVarintConfig(dAtA []byte, offset int, v uint64) int {
offset -= sovConfig(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *Config) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.GuardianSetExpiration != 0 {
n += 1 + sovConfig(uint64(m.GuardianSetExpiration))
}
l = len(m.GovernanceEmitter)
if l > 0 {
n += 1 + l + sovConfig(uint64(l))
}
if m.GovernanceChain != 0 {
n += 1 + sovConfig(uint64(m.GovernanceChain))
}
if m.ChainId != 0 {
n += 1 + sovConfig(uint64(m.ChainId))
}
return n
}
func sovConfig(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozConfig(x uint64) (n int) {
return sovConfig(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Config) 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 ErrIntOverflowConfig
}
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: Config: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Config: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field GuardianSetExpiration", wireType)
}
m.GuardianSetExpiration = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConfig
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.GuardianSetExpiration |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field GovernanceEmitter", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConfig
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthConfig
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthConfig
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.GovernanceEmitter = append(m.GovernanceEmitter[:0], dAtA[iNdEx:postIndex]...)
if m.GovernanceEmitter == nil {
m.GovernanceEmitter = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field GovernanceChain", wireType)
}
m.GovernanceChain = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConfig
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.GovernanceChain |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType)
}
m.ChainId = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConfig
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ChainId |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipConfig(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConfig
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipConfig(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowConfig
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowConfig
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowConfig
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthConfig
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupConfig
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthConfig
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthConfig = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowConfig = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupConfig = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,303 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: wormhole/consensus_guardian_set_index.proto
package types
import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
proto "github.com/gogo/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type ConsensusGuardianSetIndex struct {
Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
}
func (m *ConsensusGuardianSetIndex) Reset() { *m = ConsensusGuardianSetIndex{} }
func (m *ConsensusGuardianSetIndex) String() string { return proto.CompactTextString(m) }
func (*ConsensusGuardianSetIndex) ProtoMessage() {}
func (*ConsensusGuardianSetIndex) Descriptor() ([]byte, []int) {
return fileDescriptor_18e45d0c16ad5fce, []int{0}
}
func (m *ConsensusGuardianSetIndex) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ConsensusGuardianSetIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ConsensusGuardianSetIndex.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 *ConsensusGuardianSetIndex) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConsensusGuardianSetIndex.Merge(m, src)
}
func (m *ConsensusGuardianSetIndex) XXX_Size() int {
return m.Size()
}
func (m *ConsensusGuardianSetIndex) XXX_DiscardUnknown() {
xxx_messageInfo_ConsensusGuardianSetIndex.DiscardUnknown(m)
}
var xxx_messageInfo_ConsensusGuardianSetIndex proto.InternalMessageInfo
func (m *ConsensusGuardianSetIndex) GetIndex() uint32 {
if m != nil {
return m.Index
}
return 0
}
func init() {
proto.RegisterType((*ConsensusGuardianSetIndex)(nil), "certusone.wormholechain.wormhole.ConsensusGuardianSetIndex")
}
func init() {
proto.RegisterFile("wormhole/consensus_guardian_set_index.proto", fileDescriptor_18e45d0c16ad5fce)
}
var fileDescriptor_18e45d0c16ad5fce = []byte{
// 185 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x2e, 0xcf, 0x2f, 0xca,
0xcd, 0xc8, 0xcf, 0x49, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x4e, 0xcd, 0x2b, 0x2e, 0x2d, 0x8e, 0x4f,
0x2f, 0x4d, 0x2c, 0x4a, 0xc9, 0x4c, 0xcc, 0x8b, 0x2f, 0x4e, 0x2d, 0x89, 0xcf, 0xcc, 0x4b, 0x49,
0xad, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0x48, 0x4e, 0x2d, 0x2a, 0x29, 0x2d, 0xce,
0xcf, 0x4b, 0xd5, 0x83, 0x69, 0x4b, 0xce, 0x48, 0xcc, 0xcc, 0x83, 0xf3, 0x94, 0x0c, 0xb9, 0x24,
0x9d, 0x61, 0xe6, 0xb8, 0x43, 0x8d, 0x09, 0x4e, 0x2d, 0xf1, 0x04, 0x19, 0x22, 0x24, 0xc2, 0xc5,
0x0a, 0x36, 0x4d, 0x82, 0x51, 0x81, 0x51, 0x83, 0x37, 0x08, 0xc2, 0x71, 0xf2, 0x3b, 0xf1, 0x48,
0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0,
0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x93, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd,
0xe4, 0xfc, 0x5c, 0x7d, 0xb8, 0xcd, 0xfa, 0x30, 0xbb, 0x74, 0xc1, 0x56, 0xeb, 0x57, 0xc0, 0x05,
0xf4, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x6e, 0x35, 0x06, 0x04, 0x00, 0x00, 0xff,
0xff, 0x06, 0xd1, 0x4d, 0x03, 0xda, 0x00, 0x00, 0x00,
}
func (m *ConsensusGuardianSetIndex) 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 *ConsensusGuardianSetIndex) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ConsensusGuardianSetIndex) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Index != 0 {
i = encodeVarintConsensusGuardianSetIndex(dAtA, i, uint64(m.Index))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func encodeVarintConsensusGuardianSetIndex(dAtA []byte, offset int, v uint64) int {
offset -= sovConsensusGuardianSetIndex(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *ConsensusGuardianSetIndex) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Index != 0 {
n += 1 + sovConsensusGuardianSetIndex(uint64(m.Index))
}
return n
}
func sovConsensusGuardianSetIndex(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozConsensusGuardianSetIndex(x uint64) (n int) {
return sovConsensusGuardianSetIndex(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *ConsensusGuardianSetIndex) 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 ErrIntOverflowConsensusGuardianSetIndex
}
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: ConsensusGuardianSetIndex: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ConsensusGuardianSetIndex: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
}
m.Index = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensusGuardianSetIndex
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Index |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipConsensusGuardianSetIndex(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConsensusGuardianSetIndex
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipConsensusGuardianSetIndex(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowConsensusGuardianSetIndex
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowConsensusGuardianSetIndex
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowConsensusGuardianSetIndex
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthConsensusGuardianSetIndex
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupConsensusGuardianSetIndex
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthConsensusGuardianSetIndex
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthConsensusGuardianSetIndex = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowConsensusGuardianSetIndex = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupConsensusGuardianSetIndex = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -29,4 +29,5 @@ var (
ErrDuplicateGuardianAddress = sdkerrors.Register(ModuleName, 1120, "guardian set has duplicate addresses")
ErrSignerAlreadyRegistered = sdkerrors.Register(ModuleName, 1121, "transaction signer already registered as a guardian validator")
ErrConsensusSetNotUpdatable = sdkerrors.Register(ModuleName, 1122, "cannot make changes to active consensus guardian set")
ErrInvalidHash = sdkerrors.Register(ModuleName, 1123, "could not verify the hash in governance action")
)

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,10 @@
package types
import (
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)
type AccountKeeper interface {
// Methods imported from account should be defined here
}
@ -7,3 +12,9 @@ type AccountKeeper interface {
type BankKeeper interface {
// Methods imported from bank should be defined here
}
type WasmdKeeper interface {
// For StoreCode
Create(ctx sdk.Context, creator sdk.AccAddress, wasmCode []byte, instantiateAccess *wasmtypes.AccessConfig) (codeID uint64, err error)
Instantiate(ctx sdk.Context, codeID uint64, creator, admin sdk.AccAddress, initMsg []byte, label string, deposit sdk.Coins) (sdk.AccAddress, []byte, error)
}

View File

@ -1,651 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: wormhole/genesis.proto
package types
import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// GenesisState defines the wormhole module's genesis state.
type GenesisState struct {
GuardianSetList []GuardianSet `protobuf:"bytes,1,rep,name=guardianSetList,proto3" json:"guardianSetList"`
Config *Config `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
ReplayProtectionList []ReplayProtection `protobuf:"bytes,3,rep,name=replayProtectionList,proto3" json:"replayProtectionList"`
SequenceCounterList []SequenceCounter `protobuf:"bytes,4,rep,name=sequenceCounterList,proto3" json:"sequenceCounterList"`
ConsensusGuardianSetIndex *ConsensusGuardianSetIndex `protobuf:"bytes,5,opt,name=consensusGuardianSetIndex,proto3" json:"consensusGuardianSetIndex,omitempty"`
GuardianValidatorList []GuardianValidator `protobuf:"bytes,6,rep,name=guardianValidatorList,proto3" json:"guardianValidatorList"`
}
func (m *GenesisState) Reset() { *m = GenesisState{} }
func (m *GenesisState) String() string { return proto.CompactTextString(m) }
func (*GenesisState) ProtoMessage() {}
func (*GenesisState) Descriptor() ([]byte, []int) {
return fileDescriptor_9a7ced3fe0304831, []int{0}
}
func (m *GenesisState) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) {
xxx_messageInfo_GenesisState.Merge(m, src)
}
func (m *GenesisState) XXX_Size() int {
return m.Size()
}
func (m *GenesisState) XXX_DiscardUnknown() {
xxx_messageInfo_GenesisState.DiscardUnknown(m)
}
var xxx_messageInfo_GenesisState proto.InternalMessageInfo
func (m *GenesisState) GetGuardianSetList() []GuardianSet {
if m != nil {
return m.GuardianSetList
}
return nil
}
func (m *GenesisState) GetConfig() *Config {
if m != nil {
return m.Config
}
return nil
}
func (m *GenesisState) GetReplayProtectionList() []ReplayProtection {
if m != nil {
return m.ReplayProtectionList
}
return nil
}
func (m *GenesisState) GetSequenceCounterList() []SequenceCounter {
if m != nil {
return m.SequenceCounterList
}
return nil
}
func (m *GenesisState) GetConsensusGuardianSetIndex() *ConsensusGuardianSetIndex {
if m != nil {
return m.ConsensusGuardianSetIndex
}
return nil
}
func (m *GenesisState) GetGuardianValidatorList() []GuardianValidator {
if m != nil {
return m.GuardianValidatorList
}
return nil
}
func init() {
proto.RegisterType((*GenesisState)(nil), "certusone.wormholechain.wormhole.GenesisState")
}
func init() { proto.RegisterFile("wormhole/genesis.proto", fileDescriptor_9a7ced3fe0304831) }
var fileDescriptor_9a7ced3fe0304831 = []byte{
// 418 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xcf, 0x8a, 0xda, 0x40,
0x18, 0x4f, 0xaa, 0xf5, 0x30, 0x16, 0x0a, 0xa9, 0x16, 0x6b, 0x21, 0xa6, 0x3d, 0x09, 0xc5, 0x84,
0x6a, 0x6f, 0xbd, 0x14, 0x3d, 0x48, 0xa1, 0x94, 0x25, 0xc2, 0x1e, 0x16, 0x96, 0x10, 0xe3, 0xb7,
0x71, 0x20, 0xce, 0xb8, 0x99, 0xc9, 0xae, 0xbe, 0xc5, 0x3e, 0x96, 0x47, 0x8f, 0x7b, 0x5a, 0x16,
0x7d, 0x85, 0x7d, 0x80, 0xc5, 0xc9, 0x64, 0x74, 0xdd, 0x2c, 0xf1, 0x36, 0xf9, 0xf2, 0xfb, 0xf3,
0xcd, 0xef, 0x37, 0xe8, 0xf3, 0x2d, 0x8d, 0x67, 0x53, 0x1a, 0x81, 0x13, 0x02, 0x01, 0x86, 0x99,
0x3d, 0x8f, 0x29, 0xa7, 0x86, 0x15, 0x40, 0xcc, 0x13, 0x46, 0x09, 0xd8, 0x19, 0x22, 0x98, 0xfa,
0x98, 0xa8, 0xaf, 0xe6, 0xd7, 0x3d, 0x33, 0xf1, 0xe3, 0x09, 0xf6, 0x89, 0xc7, 0x80, 0xa7, 0xf4,
0x66, 0x5d, 0xfd, 0x0c, 0x28, 0xb9, 0xc2, 0xa1, 0x1c, 0x5b, 0x6a, 0x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x4f, 0x4a, 0x2b, 0x5f, 0xc2, 0x7d, 0x5b, 0xdd, 0xa0, 0xa8, 0x9e, 0x15, 0x75,
0x9e, 0x3d, 0x1b, 0x71, 0xcf, 0x8a, 0xb8, 0x67, 0xef, 0xf4, 0xea, 0x15, 0x5d, 0xde, 0x34, 0x5f,
0xb7, 0xff, 0x7f, 0xb5, 0x31, 0xf5, 0xf5, 0xc6, 0xd4, 0x1f, 0x37, 0xa6, 0x7e, 0xb7, 0x35, 0xb5,
0xf5, 0xd6, 0xd4, 0xee, 0xb7, 0xa6, 0x76, 0xf1, 0x2b, 0xc4, 0x7c, 0x9a, 0x8c, 0xed, 0x80, 0xce,
0x1c, 0xe5, 0xea, 0x64, 0x3e, 0x1d, 0x61, 0xeb, 0x2c, 0xd4, 0xc0, 0xe1, 0xcb, 0x39, 0xb0, 0x71,
0x45, 0xbc, 0xe6, 0xde, 0x73, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe0, 0x90, 0x08, 0x30, 0xe6, 0x03,
0x00, 0x00,
}
func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.GuardianValidatorList) > 0 {
for iNdEx := len(m.GuardianValidatorList) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.GuardianValidatorList[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGenesis(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x32
}
}
if m.ConsensusGuardianSetIndex != nil {
{
size, err := m.ConsensusGuardianSetIndex.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGenesis(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x2a
}
if len(m.SequenceCounterList) > 0 {
for iNdEx := len(m.SequenceCounterList) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.SequenceCounterList[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGenesis(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x22
}
}
if len(m.ReplayProtectionList) > 0 {
for iNdEx := len(m.ReplayProtectionList) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.ReplayProtectionList[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGenesis(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
}
if m.Config != nil {
{
size, err := m.Config.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGenesis(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if len(m.GuardianSetList) > 0 {
for iNdEx := len(m.GuardianSetList) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.GuardianSetList[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGenesis(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int {
offset -= sovGenesis(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *GenesisState) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.GuardianSetList) > 0 {
for _, e := range m.GuardianSetList {
l = e.Size()
n += 1 + l + sovGenesis(uint64(l))
}
}
if m.Config != nil {
l = m.Config.Size()
n += 1 + l + sovGenesis(uint64(l))
}
if len(m.ReplayProtectionList) > 0 {
for _, e := range m.ReplayProtectionList {
l = e.Size()
n += 1 + l + sovGenesis(uint64(l))
}
}
if len(m.SequenceCounterList) > 0 {
for _, e := range m.SequenceCounterList {
l = e.Size()
n += 1 + l + sovGenesis(uint64(l))
}
}
if m.ConsensusGuardianSetIndex != nil {
l = m.ConsensusGuardianSetIndex.Size()
n += 1 + l + sovGenesis(uint64(l))
}
if len(m.GuardianValidatorList) > 0 {
for _, e := range m.GuardianValidatorList {
l = e.Size()
n += 1 + l + sovGenesis(uint64(l))
}
}
return n
}
func sovGenesis(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozGenesis(x uint64) (n int) {
return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *GenesisState) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenesis
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: GenesisState: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field GuardianSetList", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenesis
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenesis
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenesis
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.GuardianSetList = append(m.GuardianSetList, GuardianSet{})
if err := m.GuardianSetList[len(m.GuardianSetList)-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 Config", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenesis
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenesis
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenesis
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Config == nil {
m.Config = &Config{}
}
if err := m.Config.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ReplayProtectionList", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenesis
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenesis
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenesis
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ReplayProtectionList = append(m.ReplayProtectionList, ReplayProtection{})
if err := m.ReplayProtectionList[len(m.ReplayProtectionList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SequenceCounterList", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenesis
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenesis
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenesis
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SequenceCounterList = append(m.SequenceCounterList, SequenceCounter{})
if err := m.SequenceCounterList[len(m.SequenceCounterList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ConsensusGuardianSetIndex", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenesis
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenesis
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenesis
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.ConsensusGuardianSetIndex == nil {
m.ConsensusGuardianSetIndex = &ConsensusGuardianSetIndex{}
}
if err := m.ConsensusGuardianSetIndex.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field GuardianValidatorList", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenesis
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenesis
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenesis
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.GuardianValidatorList = append(m.GuardianValidatorList, GuardianValidator{})
if err := m.GuardianValidatorList[len(m.GuardianValidatorList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenesis(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenesis
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipGenesis(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGenesis
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGenesis
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGenesis
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthGenesis
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupGenesis
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthGenesis
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,901 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: wormhole/governance.proto
package types
import (
bytes "bytes"
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// GuardianSetUpdateProposal defines a guardian set update governance proposal
type GuardianSetUpdateProposal struct {
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
NewGuardianSet GuardianSet `protobuf:"bytes,3,opt,name=newGuardianSet,proto3" json:"newGuardianSet"`
}
func (m *GuardianSetUpdateProposal) Reset() { *m = GuardianSetUpdateProposal{} }
func (*GuardianSetUpdateProposal) ProtoMessage() {}
func (*GuardianSetUpdateProposal) Descriptor() ([]byte, []int) {
return fileDescriptor_ceebda8f8c3f5f74, []int{0}
}
func (m *GuardianSetUpdateProposal) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *GuardianSetUpdateProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_GuardianSetUpdateProposal.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 *GuardianSetUpdateProposal) XXX_Merge(src proto.Message) {
xxx_messageInfo_GuardianSetUpdateProposal.Merge(m, src)
}
func (m *GuardianSetUpdateProposal) XXX_Size() int {
return m.Size()
}
func (m *GuardianSetUpdateProposal) XXX_DiscardUnknown() {
xxx_messageInfo_GuardianSetUpdateProposal.DiscardUnknown(m)
}
var xxx_messageInfo_GuardianSetUpdateProposal proto.InternalMessageInfo
func (m *GuardianSetUpdateProposal) GetTitle() string {
if m != nil {
return m.Title
}
return ""
}
func (m *GuardianSetUpdateProposal) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func (m *GuardianSetUpdateProposal) GetNewGuardianSet() GuardianSet {
if m != nil {
return m.NewGuardianSet
}
return GuardianSet{}
}
// GovernanceWormholeMessageProposal defines a governance proposal to emit a generic message in the governance message
// format.
type GovernanceWormholeMessageProposal struct {
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
Action uint32 `protobuf:"varint,3,opt,name=action,proto3" json:"action,omitempty"`
Module []byte `protobuf:"bytes,4,opt,name=module,proto3" json:"module,omitempty"`
TargetChain uint32 `protobuf:"varint,5,opt,name=targetChain,proto3" json:"targetChain,omitempty"`
Payload []byte `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"`
}
func (m *GovernanceWormholeMessageProposal) Reset() { *m = GovernanceWormholeMessageProposal{} }
func (*GovernanceWormholeMessageProposal) ProtoMessage() {}
func (*GovernanceWormholeMessageProposal) Descriptor() ([]byte, []int) {
return fileDescriptor_ceebda8f8c3f5f74, []int{1}
}
func (m *GovernanceWormholeMessageProposal) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *GovernanceWormholeMessageProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_GovernanceWormholeMessageProposal.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 *GovernanceWormholeMessageProposal) XXX_Merge(src proto.Message) {
xxx_messageInfo_GovernanceWormholeMessageProposal.Merge(m, src)
}
func (m *GovernanceWormholeMessageProposal) XXX_Size() int {
return m.Size()
}
func (m *GovernanceWormholeMessageProposal) XXX_DiscardUnknown() {
xxx_messageInfo_GovernanceWormholeMessageProposal.DiscardUnknown(m)
}
var xxx_messageInfo_GovernanceWormholeMessageProposal proto.InternalMessageInfo
func (m *GovernanceWormholeMessageProposal) GetTitle() string {
if m != nil {
return m.Title
}
return ""
}
func (m *GovernanceWormholeMessageProposal) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func (m *GovernanceWormholeMessageProposal) GetAction() uint32 {
if m != nil {
return m.Action
}
return 0
}
func (m *GovernanceWormholeMessageProposal) GetModule() []byte {
if m != nil {
return m.Module
}
return nil
}
func (m *GovernanceWormholeMessageProposal) GetTargetChain() uint32 {
if m != nil {
return m.TargetChain
}
return 0
}
func (m *GovernanceWormholeMessageProposal) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
func init() {
proto.RegisterType((*GuardianSetUpdateProposal)(nil), "certusone.wormholechain.wormhole.GuardianSetUpdateProposal")
proto.RegisterType((*GovernanceWormholeMessageProposal)(nil), "certusone.wormholechain.wormhole.GovernanceWormholeMessageProposal")
}
func init() { proto.RegisterFile("wormhole/governance.proto", fileDescriptor_ceebda8f8c3f5f74) }
var fileDescriptor_ceebda8f8c3f5f74 = []byte{
// 357 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x51, 0xb1, 0x4e, 0xe3, 0x40,
0x14, 0xf4, 0xde, 0x25, 0xb9, 0xbb, 0xcd, 0x41, 0x61, 0x45, 0xc8, 0x09, 0x92, 0x63, 0x52, 0xa5,
0x89, 0x2d, 0x01, 0x15, 0x65, 0x28, 0x52, 0x81, 0x90, 0x11, 0x42, 0x82, 0x02, 0x6d, 0xec, 0x27,
0xc7, 0x92, 0xe3, 0x67, 0xed, 0xae, 0x09, 0xf9, 0x0b, 0x4a, 0xca, 0x7c, 0x07, 0x5f, 0x90, 0x32,
0x74, 0x54, 0x08, 0x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xe3, 0xc7, 0xe8, 0xa7, 0x11,
0x18, 0x15, 0x8b, 0x74, 0xff, 0xbb, 0x39, 0xca, 0x1c, 0x25, 0xe3, 0x01, 0xc8, 0xd3, 0x2c, 0x91,
0x51, 0x55, 0xa2, 0x32, 0xa5, 0x1b, 0xf4, 0x4f, 0xc2, 0xa6, 0x11, 0x32, 0xdf, 0xa8, 0x29, 0xe9,
0x06, 0x6e, 0x33, 0xf5, 0xcf, 0xe7, 0x4b, 0x93, 0x2c, 0x96, 0x26, 0x79, 0x5f, 0x9a, 0xe4, 0x71,
0x65, 0x6a, 0x8b, 0x95, 0xa9, 0xbd, 0xae, 0x4c, 0xed, 0xe6, 0x38, 0x08, 0xe5, 0x28, 0x1d, 0xda,
0x1e, 0x8e, 0x9d, 0xa2, 0x46, 0x67, 0x53, 0x5c, 0x4f, 0xf5, 0xe8, 0x3c, 0x14, 0x84, 0x23, 0xa7,
0x09, 0x88, 0x61, 0x4d, 0xfd, 0xf3, 0xd1, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6d, 0x07, 0x3a,
0x70, 0x59, 0x02, 0x00, 0x00,
}
func (this *GuardianSetUpdateProposal) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*GuardianSetUpdateProposal)
if !ok {
that2, ok := that.(GuardianSetUpdateProposal)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Title != that1.Title {
return false
}
if this.Description != that1.Description {
return false
}
if !this.NewGuardianSet.Equal(&that1.NewGuardianSet) {
return false
}
return true
}
func (this *GovernanceWormholeMessageProposal) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*GovernanceWormholeMessageProposal)
if !ok {
that2, ok := that.(GovernanceWormholeMessageProposal)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Title != that1.Title {
return false
}
if this.Description != that1.Description {
return false
}
if this.Action != that1.Action {
return false
}
if !bytes.Equal(this.Module, that1.Module) {
return false
}
if this.TargetChain != that1.TargetChain {
return false
}
if !bytes.Equal(this.Payload, that1.Payload) {
return false
}
return true
}
func (m *GuardianSetUpdateProposal) 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 *GuardianSetUpdateProposal) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *GuardianSetUpdateProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
{
size, err := m.NewGuardianSet.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGovernance(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
if len(m.Description) > 0 {
i -= len(m.Description)
copy(dAtA[i:], m.Description)
i = encodeVarintGovernance(dAtA, i, uint64(len(m.Description)))
i--
dAtA[i] = 0x12
}
if len(m.Title) > 0 {
i -= len(m.Title)
copy(dAtA[i:], m.Title)
i = encodeVarintGovernance(dAtA, i, uint64(len(m.Title)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *GovernanceWormholeMessageProposal) 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 *GovernanceWormholeMessageProposal) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *GovernanceWormholeMessageProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Payload) > 0 {
i -= len(m.Payload)
copy(dAtA[i:], m.Payload)
i = encodeVarintGovernance(dAtA, i, uint64(len(m.Payload)))
i--
dAtA[i] = 0x32
}
if m.TargetChain != 0 {
i = encodeVarintGovernance(dAtA, i, uint64(m.TargetChain))
i--
dAtA[i] = 0x28
}
if len(m.Module) > 0 {
i -= len(m.Module)
copy(dAtA[i:], m.Module)
i = encodeVarintGovernance(dAtA, i, uint64(len(m.Module)))
i--
dAtA[i] = 0x22
}
if m.Action != 0 {
i = encodeVarintGovernance(dAtA, i, uint64(m.Action))
i--
dAtA[i] = 0x18
}
if len(m.Description) > 0 {
i -= len(m.Description)
copy(dAtA[i:], m.Description)
i = encodeVarintGovernance(dAtA, i, uint64(len(m.Description)))
i--
dAtA[i] = 0x12
}
if len(m.Title) > 0 {
i -= len(m.Title)
copy(dAtA[i:], m.Title)
i = encodeVarintGovernance(dAtA, i, uint64(len(m.Title)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintGovernance(dAtA []byte, offset int, v uint64) int {
offset -= sovGovernance(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *GuardianSetUpdateProposal) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Title)
if l > 0 {
n += 1 + l + sovGovernance(uint64(l))
}
l = len(m.Description)
if l > 0 {
n += 1 + l + sovGovernance(uint64(l))
}
l = m.NewGuardianSet.Size()
n += 1 + l + sovGovernance(uint64(l))
return n
}
func (m *GovernanceWormholeMessageProposal) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Title)
if l > 0 {
n += 1 + l + sovGovernance(uint64(l))
}
l = len(m.Description)
if l > 0 {
n += 1 + l + sovGovernance(uint64(l))
}
if m.Action != 0 {
n += 1 + sovGovernance(uint64(m.Action))
}
l = len(m.Module)
if l > 0 {
n += 1 + l + sovGovernance(uint64(l))
}
if m.TargetChain != 0 {
n += 1 + sovGovernance(uint64(m.TargetChain))
}
l = len(m.Payload)
if l > 0 {
n += 1 + l + sovGovernance(uint64(l))
}
return n
}
func sovGovernance(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozGovernance(x uint64) (n int) {
return sovGovernance(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *GuardianSetUpdateProposal) 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 ErrIntOverflowGovernance
}
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: GuardianSetUpdateProposal: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: GuardianSetUpdateProposal: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGovernance
}
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 ErrInvalidLengthGovernance
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGovernance
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Title = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGovernance
}
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 ErrInvalidLengthGovernance
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGovernance
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Description = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field NewGuardianSet", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGovernance
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGovernance
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGovernance
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.NewGuardianSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGovernance(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGovernance
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *GovernanceWormholeMessageProposal) 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 ErrIntOverflowGovernance
}
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: GovernanceWormholeMessageProposal: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: GovernanceWormholeMessageProposal: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGovernance
}
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 ErrInvalidLengthGovernance
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGovernance
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Title = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGovernance
}
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 ErrInvalidLengthGovernance
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGovernance
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Description = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType)
}
m.Action = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGovernance
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Action |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Module", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGovernance
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthGovernance
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthGovernance
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Module = append(m.Module[:0], dAtA[iNdEx:postIndex]...)
if m.Module == nil {
m.Module = []byte{}
}
iNdEx = postIndex
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field TargetChain", wireType)
}
m.TargetChain = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGovernance
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.TargetChain |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGovernance
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthGovernance
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthGovernance
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...)
if m.Payload == nil {
m.Payload = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGovernance(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGovernance
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipGovernance(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGovernance
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGovernance
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGovernance
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthGovernance
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupGovernance
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthGovernance
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthGovernance = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGovernance = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupGovernance = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,318 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: wormhole/guardian_key.proto
package types
import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
proto "github.com/gogo/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type GuardianKey struct {
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}
func (m *GuardianKey) Reset() { *m = GuardianKey{} }
func (m *GuardianKey) String() string { return proto.CompactTextString(m) }
func (*GuardianKey) ProtoMessage() {}
func (*GuardianKey) Descriptor() ([]byte, []int) {
return fileDescriptor_87576a0b45454f44, []int{0}
}
func (m *GuardianKey) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *GuardianKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_GuardianKey.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 *GuardianKey) XXX_Merge(src proto.Message) {
xxx_messageInfo_GuardianKey.Merge(m, src)
}
func (m *GuardianKey) XXX_Size() int {
return m.Size()
}
func (m *GuardianKey) XXX_DiscardUnknown() {
xxx_messageInfo_GuardianKey.DiscardUnknown(m)
}
var xxx_messageInfo_GuardianKey proto.InternalMessageInfo
func (m *GuardianKey) GetKey() []byte {
if m != nil {
return m.Key
}
return nil
}
func init() {
proto.RegisterType((*GuardianKey)(nil), "certusone.wormholechain.wormhole.GuardianKey")
}
func init() { proto.RegisterFile("wormhole/guardian_key.proto", fileDescriptor_87576a0b45454f44) }
var fileDescriptor_87576a0b45454f44 = []byte{
// 164 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0xcf, 0x2f, 0xca,
0xcd, 0xc8, 0xcf, 0x49, 0xd5, 0x4f, 0x2f, 0x4d, 0x2c, 0x4a, 0xc9, 0x4c, 0xcc, 0x8b, 0xcf, 0x4e,
0xad, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0x48, 0x4e, 0x2d, 0x2a, 0x29, 0x2d, 0xce,
0xcf, 0x4b, 0xd5, 0x83, 0x29, 0x4b, 0xce, 0x48, 0xcc, 0xcc, 0x83, 0xf3, 0x94, 0xe4, 0xb9, 0xb8,
0xdd, 0xa1, 0xfa, 0xbc, 0x53, 0x2b, 0x85, 0x04, 0xb8, 0x98, 0xb3, 0x53, 0x2b, 0x25, 0x18, 0x15,
0x18, 0x35, 0x78, 0x82, 0x40, 0x4c, 0x27, 0xbf, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63,
0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96,
0x63, 0x88, 0x32, 0x49, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x87, 0xdb,
0xa3, 0x0f, 0x33, 0x59, 0x17, 0x6c, 0x91, 0x7e, 0x05, 0x5c, 0x40, 0xbf, 0xa4, 0xb2, 0x20, 0xb5,
0x38, 0x89, 0x0d, 0xec, 0x32, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x28, 0x0c, 0xe7, 0x2d,
0xb8, 0x00, 0x00, 0x00,
}
func (m *GuardianKey) 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 *GuardianKey) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *GuardianKey) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Key) > 0 {
i -= len(m.Key)
copy(dAtA[i:], m.Key)
i = encodeVarintGuardianKey(dAtA, i, uint64(len(m.Key)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintGuardianKey(dAtA []byte, offset int, v uint64) int {
offset -= sovGuardianKey(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *GuardianKey) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Key)
if l > 0 {
n += 1 + l + sovGuardianKey(uint64(l))
}
return n
}
func sovGuardianKey(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozGuardianKey(x uint64) (n int) {
return sovGuardianKey(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *GuardianKey) 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 ErrIntOverflowGuardianKey
}
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: GuardianKey: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: GuardianKey: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuardianKey
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthGuardianKey
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthGuardianKey
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
if m.Key == nil {
m.Key = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGuardianKey(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGuardianKey
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipGuardianKey(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGuardianKey
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGuardianKey
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGuardianKey
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthGuardianKey
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupGuardianKey
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthGuardianKey
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthGuardianKey = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGuardianKey = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupGuardianKey = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,431 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: wormhole/guardian_set.proto
package types
import (
bytes "bytes"
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type GuardianSet struct {
Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
Keys [][]byte `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"`
ExpirationTime uint64 `protobuf:"varint,3,opt,name=expirationTime,proto3" json:"expirationTime,omitempty"`
}
func (m *GuardianSet) Reset() { *m = GuardianSet{} }
func (m *GuardianSet) String() string { return proto.CompactTextString(m) }
func (*GuardianSet) ProtoMessage() {}
func (*GuardianSet) Descriptor() ([]byte, []int) {
return fileDescriptor_3a6a773f49e89397, []int{0}
}
func (m *GuardianSet) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *GuardianSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_GuardianSet.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 *GuardianSet) XXX_Merge(src proto.Message) {
xxx_messageInfo_GuardianSet.Merge(m, src)
}
func (m *GuardianSet) XXX_Size() int {
return m.Size()
}
func (m *GuardianSet) XXX_DiscardUnknown() {
xxx_messageInfo_GuardianSet.DiscardUnknown(m)
}
var xxx_messageInfo_GuardianSet proto.InternalMessageInfo
func (m *GuardianSet) GetIndex() uint32 {
if m != nil {
return m.Index
}
return 0
}
func (m *GuardianSet) GetKeys() [][]byte {
if m != nil {
return m.Keys
}
return nil
}
func (m *GuardianSet) GetExpirationTime() uint64 {
if m != nil {
return m.ExpirationTime
}
return 0
}
func init() {
proto.RegisterType((*GuardianSet)(nil), "certusone.wormholechain.wormhole.GuardianSet")
}
func init() { proto.RegisterFile("wormhole/guardian_set.proto", fileDescriptor_3a6a773f49e89397) }
var fileDescriptor_3a6a773f49e89397 = []byte{
// 229 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0xcf, 0x2f, 0xca,
0xcd, 0xc8, 0xcf, 0x49, 0xd5, 0x4f, 0x2f, 0x4d, 0x2c, 0x4a, 0xc9, 0x4c, 0xcc, 0x8b, 0x2f, 0x4e,
0x2d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0x48, 0x4e, 0x2d, 0x2a, 0x29, 0x2d, 0xce,
0xcf, 0x4b, 0xd5, 0x83, 0x29, 0x4b, 0xce, 0x48, 0xcc, 0xcc, 0x83, 0xf3, 0xa4, 0x44, 0xd2, 0xf3,
0xd3, 0xf3, 0xc1, 0x8a, 0xf5, 0x41, 0x2c, 0x88, 0x3e, 0xa5, 0x54, 0x2e, 0x6e, 0x77, 0xa8, 0x69,
0xc1, 0xa9, 0x25, 0x42, 0x22, 0x5c, 0xac, 0x99, 0x79, 0x29, 0xa9, 0x15, 0x12, 0x8c, 0x0a, 0x8c,
0x1a, 0xbc, 0x41, 0x10, 0x8e, 0x90, 0x10, 0x17, 0x4b, 0x76, 0x6a, 0x65, 0xb1, 0x04, 0x93, 0x02,
0xb3, 0x06, 0x4f, 0x10, 0x98, 0x2d, 0xa4, 0xc6, 0xc5, 0x97, 0x5a, 0x51, 0x90, 0x59, 0x94, 0x58,
0x92, 0x99, 0x9f, 0x17, 0x92, 0x99, 0x9b, 0x2a, 0xc1, 0xac, 0xc0, 0xa8, 0xc1, 0x12, 0x84, 0x26,
0x6a, 0xc5, 0xf2, 0x62, 0x81, 0x3c, 0xa3, 0x93, 0xdf, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9,
0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e,
0xcb, 0x31, 0x44, 0x99, 0xa4, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xc3,
0xfd, 0xa0, 0x0f, 0x73, 0xb5, 0x2e, 0xd8, 0x13, 0xfa, 0x15, 0x70, 0x01, 0xfd, 0x92, 0xca, 0x82,
0xd4, 0xe2, 0x24, 0x36, 0xb0, 0xeb, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x44, 0x6e,
0x52, 0x14, 0x01, 0x00, 0x00,
}
func (this *GuardianSet) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*GuardianSet)
if !ok {
that2, ok := that.(GuardianSet)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Index != that1.Index {
return false
}
if len(this.Keys) != len(that1.Keys) {
return false
}
for i := range this.Keys {
if !bytes.Equal(this.Keys[i], that1.Keys[i]) {
return false
}
}
if this.ExpirationTime != that1.ExpirationTime {
return false
}
return true
}
func (m *GuardianSet) 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 *GuardianSet) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *GuardianSet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.ExpirationTime != 0 {
i = encodeVarintGuardianSet(dAtA, i, uint64(m.ExpirationTime))
i--
dAtA[i] = 0x18
}
if len(m.Keys) > 0 {
for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Keys[iNdEx])
copy(dAtA[i:], m.Keys[iNdEx])
i = encodeVarintGuardianSet(dAtA, i, uint64(len(m.Keys[iNdEx])))
i--
dAtA[i] = 0x12
}
}
if m.Index != 0 {
i = encodeVarintGuardianSet(dAtA, i, uint64(m.Index))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func encodeVarintGuardianSet(dAtA []byte, offset int, v uint64) int {
offset -= sovGuardianSet(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *GuardianSet) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Index != 0 {
n += 1 + sovGuardianSet(uint64(m.Index))
}
if len(m.Keys) > 0 {
for _, b := range m.Keys {
l = len(b)
n += 1 + l + sovGuardianSet(uint64(l))
}
}
if m.ExpirationTime != 0 {
n += 1 + sovGuardianSet(uint64(m.ExpirationTime))
}
return n
}
func sovGuardianSet(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozGuardianSet(x uint64) (n int) {
return sovGuardianSet(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *GuardianSet) 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 ErrIntOverflowGuardianSet
}
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: GuardianSet: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: GuardianSet: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
}
m.Index = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuardianSet
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Index |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuardianSet
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthGuardianSet
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthGuardianSet
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Keys = append(m.Keys, make([]byte, postIndex-iNdEx))
copy(m.Keys[len(m.Keys)-1], dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ExpirationTime", wireType)
}
m.ExpirationTime = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuardianSet
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ExpirationTime |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipGuardianSet(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGuardianSet
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipGuardianSet(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGuardianSet
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGuardianSet
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGuardianSet
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthGuardianSet
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupGuardianSet
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthGuardianSet
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthGuardianSet = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGuardianSet = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupGuardianSet = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,372 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: wormhole/guardian_validator.proto
package types
import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
proto "github.com/gogo/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type GuardianValidator struct {
GuardianKey []byte `protobuf:"bytes,1,opt,name=guardianKey,proto3" json:"guardianKey,omitempty"`
ValidatorAddr []byte `protobuf:"bytes,2,opt,name=validatorAddr,proto3" json:"validatorAddr,omitempty"`
}
func (m *GuardianValidator) Reset() { *m = GuardianValidator{} }
func (m *GuardianValidator) String() string { return proto.CompactTextString(m) }
func (*GuardianValidator) ProtoMessage() {}
func (*GuardianValidator) Descriptor() ([]byte, []int) {
return fileDescriptor_a7e08ab792af660a, []int{0}
}
func (m *GuardianValidator) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *GuardianValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_GuardianValidator.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 *GuardianValidator) XXX_Merge(src proto.Message) {
xxx_messageInfo_GuardianValidator.Merge(m, src)
}
func (m *GuardianValidator) XXX_Size() int {
return m.Size()
}
func (m *GuardianValidator) XXX_DiscardUnknown() {
xxx_messageInfo_GuardianValidator.DiscardUnknown(m)
}
var xxx_messageInfo_GuardianValidator proto.InternalMessageInfo
func (m *GuardianValidator) GetGuardianKey() []byte {
if m != nil {
return m.GuardianKey
}
return nil
}
func (m *GuardianValidator) GetValidatorAddr() []byte {
if m != nil {
return m.ValidatorAddr
}
return nil
}
func init() {
proto.RegisterType((*GuardianValidator)(nil), "certusone.wormholechain.wormhole.GuardianValidator")
}
func init() { proto.RegisterFile("wormhole/guardian_validator.proto", fileDescriptor_a7e08ab792af660a) }
var fileDescriptor_a7e08ab792af660a = []byte{
// 188 bytes of a gzipped FileDescriptorProto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fa, 0x00, 0x00, 0x00,
}
func (m *GuardianValidator) 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 *GuardianValidator) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *GuardianValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.ValidatorAddr) > 0 {
i -= len(m.ValidatorAddr)
copy(dAtA[i:], m.ValidatorAddr)
i = encodeVarintGuardianValidator(dAtA, i, uint64(len(m.ValidatorAddr)))
i--
dAtA[i] = 0x12
}
if len(m.GuardianKey) > 0 {
i -= len(m.GuardianKey)
copy(dAtA[i:], m.GuardianKey)
i = encodeVarintGuardianValidator(dAtA, i, uint64(len(m.GuardianKey)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintGuardianValidator(dAtA []byte, offset int, v uint64) int {
offset -= sovGuardianValidator(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *GuardianValidator) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.GuardianKey)
if l > 0 {
n += 1 + l + sovGuardianValidator(uint64(l))
}
l = len(m.ValidatorAddr)
if l > 0 {
n += 1 + l + sovGuardianValidator(uint64(l))
}
return n
}
func sovGuardianValidator(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozGuardianValidator(x uint64) (n int) {
return sovGuardianValidator(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *GuardianValidator) 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 ErrIntOverflowGuardianValidator
}
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: GuardianValidator: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: GuardianValidator: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field GuardianKey", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuardianValidator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthGuardianValidator
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthGuardianValidator
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.GuardianKey = append(m.GuardianKey[:0], dAtA[iNdEx:postIndex]...)
if m.GuardianKey == nil {
m.GuardianKey = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuardianValidator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthGuardianValidator
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthGuardianValidator
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ValidatorAddr = append(m.ValidatorAddr[:0], dAtA[iNdEx:postIndex]...)
if m.ValidatorAddr == nil {
m.ValidatorAddr = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGuardianValidator(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGuardianValidator
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipGuardianValidator(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGuardianValidator
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGuardianValidator
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGuardianValidator
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthGuardianValidator
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupGuardianValidator
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthGuardianValidator
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthGuardianValidator = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGuardianValidator = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupGuardianValidator = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -0,0 +1,58 @@
package types
import (
sdk "github.com/cosmos/cosmos-sdk/types"
)
var _ sdk.Msg = &MsgInstantiateContract{}
var _ sdk.Msg = &MsgStoreCode{}
func (msg *MsgInstantiateContract) Route() string {
return RouterKey
}
func (msg *MsgInstantiateContract) Type() string {
return "InstantiateContract"
}
func (msg *MsgInstantiateContract) GetSigners() []sdk.AccAddress {
signer, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
panic(err)
}
return []sdk.AccAddress{signer}
}
func (msg *MsgInstantiateContract) GetSignBytes() []byte {
bz := ModuleCdc.MustMarshalJSON(msg)
return sdk.MustSortJSON(bz)
}
func (msg *MsgInstantiateContract) ValidateBasic() error {
return msg.ToWasmd().ValidateBasic()
}
func (msg *MsgStoreCode) Route() string {
return RouterKey
}
func (msg *MsgStoreCode) Type() string {
return "StoreCode"
}
func (msg *MsgStoreCode) GetSigners() []sdk.AccAddress {
signer, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
panic(err)
}
return []sdk.AccAddress{signer}
}
func (msg *MsgStoreCode) GetSignBytes() []byte {
bz := ModuleCdc.MustMarshalJSON(msg)
return sdk.MustSortJSON(bz)
}
func (msg *MsgStoreCode) ValidateBasic() error {
return msg.ToWasmd().ValidateBasic()
}

File diff suppressed because it is too large Load Diff

View File

@ -971,27 +971,27 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
}
var (
pattern_Query_GuardianSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"certusone", "wormholechain", "wormhole", "guardianSet", "index"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_GuardianSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"wormhole_foundation", "wormholechain", "wormhole", "guardianSet", "index"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_GuardianSetAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"certusone", "wormholechain", "wormhole", "guardianSet"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_GuardianSetAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"wormhole_foundation", "wormholechain", "wormhole", "guardianSet"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_Config_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"certusone", "wormholechain", "wormhole", "config"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_Config_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"wormhole_foundation", "wormholechain", "wormhole", "config"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_ReplayProtection_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"certusone", "wormholechain", "wormhole", "replayProtection", "index"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_ReplayProtection_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"wormhole_foundation", "wormholechain", "wormhole", "replayProtection", "index"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_ReplayProtectionAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"certusone", "wormholechain", "wormhole", "replayProtection"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_ReplayProtectionAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"wormhole_foundation", "wormholechain", "wormhole", "replayProtection"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_SequenceCounter_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"certusone", "wormholechain", "wormhole", "sequenceCounter", "index"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_SequenceCounter_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"wormhole_foundation", "wormholechain", "wormhole", "sequenceCounter", "index"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_SequenceCounterAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"certusone", "wormholechain", "wormhole", "sequenceCounter"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_SequenceCounterAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"wormhole_foundation", "wormholechain", "wormhole", "sequenceCounter"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_ConsensusGuardianSetIndex_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"certusone", "wormholechain", "wormhole", "consensus_guardian_set_index"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_ConsensusGuardianSetIndex_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"wormhole_foundation", "wormholechain", "wormhole", "consensus_guardian_set_index"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_GuardianValidator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"certusone", "wormholechain", "wormhole", "guardian_validator", "guardianKey"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_GuardianValidator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"wormhole_foundation", "wormholechain", "wormhole", "guardian_validator", "guardianKey"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_GuardianValidatorAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"certusone", "wormholechain", "wormhole", "guardian_validator"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_GuardianValidatorAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"wormhole_foundation", "wormholechain", "wormhole", "guardian_validator"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_LatestGuardianSetIndex_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"certusone", "wormholechain", "wormhole", "latest_guardian_set_index"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_LatestGuardianSetIndex_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"wormhole_foundation", "wormholechain", "wormhole", "latest_guardian_set_index"}, "", runtime.AssumeColonVerbOpt(true)))
)
var (

View File

@ -1,316 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: wormhole/replay_protection.proto
package types
import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
proto "github.com/gogo/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type ReplayProtection struct {
Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"`
}
func (m *ReplayProtection) Reset() { *m = ReplayProtection{} }
func (m *ReplayProtection) String() string { return proto.CompactTextString(m) }
func (*ReplayProtection) ProtoMessage() {}
func (*ReplayProtection) Descriptor() ([]byte, []int) {
return fileDescriptor_da495f697a0fb01c, []int{0}
}
func (m *ReplayProtection) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ReplayProtection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ReplayProtection.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 *ReplayProtection) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReplayProtection.Merge(m, src)
}
func (m *ReplayProtection) XXX_Size() int {
return m.Size()
}
func (m *ReplayProtection) XXX_DiscardUnknown() {
xxx_messageInfo_ReplayProtection.DiscardUnknown(m)
}
var xxx_messageInfo_ReplayProtection proto.InternalMessageInfo
func (m *ReplayProtection) GetIndex() string {
if m != nil {
return m.Index
}
return ""
}
func init() {
proto.RegisterType((*ReplayProtection)(nil), "certusone.wormholechain.wormhole.ReplayProtection")
}
func init() { proto.RegisterFile("wormhole/replay_protection.proto", fileDescriptor_da495f697a0fb01c) }
var fileDescriptor_da495f697a0fb01c = []byte{
// 168 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x28, 0xcf, 0x2f, 0xca,
0xcd, 0xc8, 0xcf, 0x49, 0xd5, 0x2f, 0x4a, 0x2d, 0xc8, 0x49, 0xac, 0x8c, 0x2f, 0x28, 0xca, 0x2f,
0x49, 0x4d, 0x2e, 0xc9, 0xcc, 0xcf, 0xd3, 0x03, 0x31, 0xf3, 0x85, 0x14, 0x92, 0x53, 0x8b, 0x4a,
0x4a, 0x8b, 0xf3, 0xf3, 0x52, 0xf5, 0x60, 0x6a, 0x93, 0x33, 0x12, 0x33, 0xf3, 0xe0, 0x3c, 0x25,
0x0d, 0x2e, 0x81, 0x20, 0xb0, 0xe6, 0x00, 0xb8, 0x5e, 0x21, 0x11, 0x2e, 0xd6, 0xcc, 0xbc, 0x94,
0xd4, 0x0a, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x08, 0xc7, 0xc9, 0xef, 0xc4, 0x23, 0x39,
0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63,
0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x4c, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92,
0xf3, 0x73, 0xf5, 0xe1, 0x16, 0xea, 0xc3, 0xac, 0xd0, 0x05, 0xdb, 0xa8, 0x5f, 0x01, 0x17, 0xd0,
0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0x3b, 0xd1, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff,
0x56, 0x0b, 0xd5, 0x49, 0xc6, 0x00, 0x00, 0x00,
}
func (m *ReplayProtection) 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 *ReplayProtection) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ReplayProtection) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Index) > 0 {
i -= len(m.Index)
copy(dAtA[i:], m.Index)
i = encodeVarintReplayProtection(dAtA, i, uint64(len(m.Index)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintReplayProtection(dAtA []byte, offset int, v uint64) int {
offset -= sovReplayProtection(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *ReplayProtection) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Index)
if l > 0 {
n += 1 + l + sovReplayProtection(uint64(l))
}
return n
}
func sovReplayProtection(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozReplayProtection(x uint64) (n int) {
return sovReplayProtection(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *ReplayProtection) 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 ErrIntOverflowReplayProtection
}
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: ReplayProtection: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ReplayProtection: 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 ErrIntOverflowReplayProtection
}
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 ErrInvalidLengthReplayProtection
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthReplayProtection
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Index = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipReplayProtection(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthReplayProtection
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipReplayProtection(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowReplayProtection
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowReplayProtection
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowReplayProtection
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthReplayProtection
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupReplayProtection
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthReplayProtection
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthReplayProtection = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowReplayProtection = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupReplayProtection = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,352 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: wormhole/sequence_counter.proto
package types
import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
proto "github.com/gogo/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type SequenceCounter struct {
Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"`
Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"`
}
func (m *SequenceCounter) Reset() { *m = SequenceCounter{} }
func (m *SequenceCounter) String() string { return proto.CompactTextString(m) }
func (*SequenceCounter) ProtoMessage() {}
func (*SequenceCounter) Descriptor() ([]byte, []int) {
return fileDescriptor_adec725923edb1a5, []int{0}
}
func (m *SequenceCounter) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *SequenceCounter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_SequenceCounter.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 *SequenceCounter) XXX_Merge(src proto.Message) {
xxx_messageInfo_SequenceCounter.Merge(m, src)
}
func (m *SequenceCounter) XXX_Size() int {
return m.Size()
}
func (m *SequenceCounter) XXX_DiscardUnknown() {
xxx_messageInfo_SequenceCounter.DiscardUnknown(m)
}
var xxx_messageInfo_SequenceCounter proto.InternalMessageInfo
func (m *SequenceCounter) GetIndex() string {
if m != nil {
return m.Index
}
return ""
}
func (m *SequenceCounter) GetSequence() uint64 {
if m != nil {
return m.Sequence
}
return 0
}
func init() {
proto.RegisterType((*SequenceCounter)(nil), "certusone.wormholechain.wormhole.SequenceCounter")
}
func init() { proto.RegisterFile("wormhole/sequence_counter.proto", fileDescriptor_adec725923edb1a5) }
var fileDescriptor_adec725923edb1a5 = []byte{
// 185 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2f, 0xcf, 0x2f, 0xca,
0xcd, 0xc8, 0xcf, 0x49, 0xd5, 0x2f, 0x4e, 0x2d, 0x2c, 0x4d, 0xcd, 0x4b, 0x4e, 0x8d, 0x4f, 0xce,
0x2f, 0xcd, 0x2b, 0x49, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0x48, 0x4e, 0x2d,
0x2a, 0x29, 0x2d, 0xce, 0xcf, 0x4b, 0xd5, 0x83, 0x29, 0x4d, 0xce, 0x48, 0xcc, 0xcc, 0x83, 0xf3,
0x94, 0x9c, 0xb9, 0xf8, 0x83, 0xa1, 0x7a, 0x9d, 0x21, 0x5a, 0x85, 0x44, 0xb8, 0x58, 0x33, 0xf3,
0x52, 0x52, 0x2b, 0x24, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0x20, 0x1c, 0x21, 0x29, 0x2e, 0x0e,
0x98, 0x25, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0x2c, 0x41, 0x70, 0xbe, 0x93, 0xdf, 0x89, 0x47, 0x72,
0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7,
0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x99, 0xa4, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25,
0xe7, 0xe7, 0xea, 0xc3, 0xdd, 0xa2, 0x0f, 0xb3, 0x5d, 0x17, 0xec, 0x18, 0xfd, 0x0a, 0xb8, 0x80,
0x7e, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0xd8, 0xf5, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff,
0xff, 0x47, 0xc8, 0x9f, 0x62, 0xe0, 0x00, 0x00, 0x00,
}
func (m *SequenceCounter) 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 *SequenceCounter) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *SequenceCounter) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Sequence != 0 {
i = encodeVarintSequenceCounter(dAtA, i, uint64(m.Sequence))
i--
dAtA[i] = 0x10
}
if len(m.Index) > 0 {
i -= len(m.Index)
copy(dAtA[i:], m.Index)
i = encodeVarintSequenceCounter(dAtA, i, uint64(len(m.Index)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintSequenceCounter(dAtA []byte, offset int, v uint64) int {
offset -= sovSequenceCounter(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *SequenceCounter) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Index)
if l > 0 {
n += 1 + l + sovSequenceCounter(uint64(l))
}
if m.Sequence != 0 {
n += 1 + sovSequenceCounter(uint64(m.Sequence))
}
return n
}
func sovSequenceCounter(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozSequenceCounter(x uint64) (n int) {
return sovSequenceCounter(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *SequenceCounter) 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 ErrIntOverflowSequenceCounter
}
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: SequenceCounter: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: SequenceCounter: 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 ErrIntOverflowSequenceCounter
}
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 ErrInvalidLengthSequenceCounter
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthSequenceCounter
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Index = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType)
}
m.Sequence = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSequenceCounter
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Sequence |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipSequenceCounter(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthSequenceCounter
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipSequenceCounter(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowSequenceCounter
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowSequenceCounter
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowSequenceCounter
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthSequenceCounter
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupSequenceCounter
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthSequenceCounter
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthSequenceCounter = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowSequenceCounter = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupSequenceCounter = fmt.Errorf("proto: unexpected end of group")
)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,31 @@
package types
import "encoding/binary"
type GovernanceMessage struct {
Module [32]byte
Action byte
Chain uint16
Payload []byte
}
func NewGovernanceMessage(module [32]byte, action byte, chain uint16, payload []byte) GovernanceMessage {
return GovernanceMessage{
Module: module,
Action: action,
Chain: chain,
Payload: payload,
}
}
func (gm *GovernanceMessage) MarshalBinary() []byte {
bz := []byte{}
bz = append(bz, gm.Module[:]...)
bz = append(bz, gm.Action)
chain_bz := [2]byte{}
binary.BigEndian.PutUint16(chain_bz[:], gm.Chain)
bz = append(bz, chain_bz[:]...)
// set update payload
bz = append(bz, gm.Payload...)
return bz
}

View File

@ -0,0 +1,21 @@
package types
import (
wasmdtypes "github.com/CosmWasm/wasmd/x/wasm/types"
)
func (msg MsgInstantiateContract) ToWasmd() wasmdtypes.MsgInstantiateContract {
return wasmdtypes.MsgInstantiateContract{
Sender: msg.Signer,
CodeID: msg.CodeID,
Label: msg.Label,
Msg: msg.Msg,
}
}
func (msg MsgStoreCode) ToWasmd() wasmdtypes.MsgStoreCode {
return wasmdtypes.MsgStoreCode{
Sender: msg.Signer,
WASMByteCode: msg.WASMByteCode,
}
}