diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ebf2bb36a..e3e71018f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,10 +11,11 @@ updates: interval: "weekly" open-pull-requests-limit: 10 labels: - - dependencies - + - dependencies - package-ecosystem: github-actions directory: "/" schedule: interval: monthly open-pull-requests-limit: 10 + labels: + - gh-action-version \ No newline at end of file diff --git a/.github/mergify.yml b/.github/mergify.yml new file mode 100644 index 000000000..d3bd9f26e --- /dev/null +++ b/.github/mergify.yml @@ -0,0 +1,27 @@ +pull_request_rules: + - name: backport to maintained branches + conditions: + - base~=^(main|v4|v4-ics|v5|v6)$ + - label=BACKPORT + actions: + backport: + branches: + - main + - v4-ics + - v4 + - v5 + - v6 + assignees: + - "{{ author }}" + labels: + - automerge + - backported + title: "`[BP: {{ destination_branch }} <- #{{ number }}]` {{ title }}" + + - name: automerge backported PR's for maintained branches + conditions: + - label=automerge + - base~=^(v4|v4-ics|v5|v6)$ + actions: + merge: + method: squash \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/e2e-tests.yml similarity index 58% rename from .github/workflows/tests.yml rename to .github/workflows/e2e-tests.yml index 389317a3f..75868b76f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -1,38 +1,14 @@ -name: Run Go Tests +name: Run End-To-End Tests on: pull_request: - push: - branches: - - main - paths: - - "**.go" - - "**.mod" - - "**.sum" -jobs: - test-unit: - name: unit-tests - runs-on: [self-hosted, linux] - steps: - # Install and setup go - - name: Set up Go 1.19 - uses: actions/setup-go@v4 - with: - go-version: 1.19 - - - name: checkout interchaintest - uses: actions/checkout@v3 +# Ensures that only a single workflow per PR will run at a time. Cancels in-progress jobs if new commit is pushed. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true - # cleanup environment on self-hosted test runner - - name: clean - run: |- - rm -rf ~/.interchaintest - - # run tests - - name: run unit tests - # -short flag purposefully omitted because there are some longer unit tests - run: go test -race -timeout 10m -p 2 $(go list ./... | grep -v /cmd | grep -v /examples) +jobs: test-conformance: name: test-conformance runs-on: [self-hosted, linux] @@ -53,7 +29,7 @@ jobs: # run tests - name: run conformance tests - run: (go test -race -timeout 30m -v -p 2 ./cmd/interchaintest) || (echo "\n\n*****CHAIN and RELAYER LOGS*****" && cat "$HOME/.interchaintest/logs/interchaintest.log" && exit 1) + run: (go test -race -timeout 30m -failfast -v -p 2 ./cmd/interchaintest) || (echo "\n\n*****CHAIN and RELAYER LOGS*****" && cat "$HOME/.interchaintest/logs/interchaintest.log" && exit 1) test-ibc-examples: name: test-ibc-examples runs-on: [self-hosted, linux] @@ -63,6 +39,7 @@ jobs: uses: actions/setup-go@v4 with: go-version: 1.19 + cache: false - name: checkout interchaintest uses: actions/checkout@v3 @@ -74,7 +51,7 @@ jobs: # run tests - name: run example ibc tests - run: go test -race -timeout 30m -v -p 2 ./examples/ibc + run: go test -race -timeout 30m -failfast -v -p 2 ./examples/ibc test-cosmos-examples: name: test-cosmos-examples runs-on: [self-hosted, linux] @@ -84,6 +61,7 @@ jobs: uses: actions/setup-go@v4 with: go-version: 1.19 + cache: false - name: checkout interchaintest uses: actions/checkout@v3 @@ -95,4 +73,4 @@ jobs: # run tests - name: run example cosmos tests - run: go test -race -timeout 30m -v -p 2 ./examples/cosmos + run: go test -race -failfast -timeout 30m -v -p 2 ./examples/cosmos diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cf32fa74f..e703eaa3f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,11 +1,7 @@ name: golangci-lint on: - push: - tags: - - v* - branches: - - main pull_request: + jobs: golangci: name: lint @@ -17,4 +13,4 @@ jobs: with: version: latest only-new-issues: true - args: --timeout=3m + args: --timeout=5m diff --git a/.github/workflows/prior-version-pr.yml b/.github/workflows/prior-version-pr.yml deleted file mode 100644 index d2e4be23c..000000000 --- a/.github/workflows/prior-version-pr.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: PR for release branch -on: - push: - branches: - - main -jobs: - release_pull_request: - runs-on: ubuntu-latest - name: release_pull_request - steps: - - name: checkout - uses: actions/checkout@v3 - - name: Create PR to branch - uses: gorillio/github-action-cherry-pick@master - with: - pr_branch: v3 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITBOT_EMAIL: action@github.com - DRY_RUN: false diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 000000000..d133e0398 --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,28 @@ +name: Run Unit Tests + +on: + pull_request: + +# Ensures that only a single workflow per PR will run at a time. Cancels in-progress jobs if new commit is pushed. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test-unit: + name: unit-tests + runs-on: [self-hosted, linux] + steps: + # Install and setup go + - name: Set up Go 1.19 + uses: actions/setup-go@v4 + with: + go-version: 1.19 + + - name: checkout interchaintest + uses: actions/checkout@v3 + + # run tests + - name: run unit tests + # -short flag purposefully omitted because there are some longer unit tests + run: go test -race -timeout 10m -failfast -p 2 $(go list ./... | grep -v /cmd | grep -v /examples) \ No newline at end of file diff --git a/README.md b/README.md index 24896f92e..5083d66cc 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,18 @@ It allows users to quickly spin up custom testnets and dev environments to test
+### Maintained Branches + +| **Branch Name** | **IBC-Go** | **Cosmos-sdk** | **Maintained** | +|:----------------------------------------------------------------------------:|:----------:|:--------------:|:-------------------:| +| main | v7 | v0.47 | ✅ | +| [v6](https://github.com/strangelove-ventures/interchaintest/tree/v6) | v6 | v0.46 | ✅ | +| [v5](https://github.com/strangelove-ventures/interchaintest/tree/v5) | v5 | v0.46 | ✅ | +| [v4](https://github.com/strangelove-ventures/interchaintest/tree/v4) | v4 | v0.45 | ✅ | +| [v4-ics](https://github.com/strangelove-ventures/interchaintest/tree/v4-ics) | v4 | v0.45.x-ics | ✅ | +| [v3](https://github.com/strangelove-ventures/interchaintest/tree/v3) | v3 | v0.45 |❌
(June 25 2023) | +| [v3-ics](https://github.com/strangelove-ventures/interchaintest/tree/v3-ics) | v3 | v0.45.11-ics |❌
(April 24 2023)| + ## Table Of Contents - [Building Binary](#building-binary) - **Usage:** @@ -37,7 +49,7 @@ It allows users to quickly spin up custom testnets and dev environments to test ## Building Binary -While it is not necessary to build the binary, sometimes it can be more convenient, *specifically* when running conformance test with custom chain sets. +While it is not necessary to build the binary, sometimes it can be more convenient, *specifically* when running conformance test with custom chain sets. Building binary: ```shell @@ -46,7 +58,7 @@ cd interchaintest make interchaintest ``` -This places the binary in `interchaintest/.bin/interchaintest` +This places the binary in `interchaintest/bin/interchaintest` Note that this is not in your Go path. @@ -62,4 +74,4 @@ Please read the [logging style guide](./docs/logging.md). Significant bugs that were more easily fixed with `interchaintest`: - [Juno network halt reproduction](https://github.com/strangelove-ventures/interchaintest/pull/7) -- [Juno network halt fix confirmation](https://github.com/strangelove-ventures/interchaintest/pull/8) \ No newline at end of file +- [Juno network halt fix confirmation](https://github.com/strangelove-ventures/interchaintest/pull/8) diff --git a/chain/cosmos/08-wasm-types/client_state.go b/chain/cosmos/08-wasm-types/client_state.go new file mode 100644 index 000000000..eb0a8417f --- /dev/null +++ b/chain/cosmos/08-wasm-types/client_state.go @@ -0,0 +1,123 @@ +package types + +import ( + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v7/modules/core/exported" +) + +var _ exported.ClientState = (*ClientState)(nil) + +func (c ClientState) ClientType() string { + return "" +} + +func (c ClientState) GetLatestHeight() exported.Height { + return c.LatestHeight +} + +func (c ClientState) Validate() error { + return nil +} + +func (c ClientState) Status(ctx sdk.Context, store sdk.KVStore, cdc codec.BinaryCodec) exported.Status { + return exported.Active +} + +func (c ClientState) ExportMetadata(store sdk.KVStore) []exported.GenesisMetadata { + return []exported.GenesisMetadata{} +} + +func (c ClientState) ZeroCustomFields() exported.ClientState { + return &c +} + +func (c ClientState) GetTimestampAtHeight( + ctx sdk.Context, + clientStore sdk.KVStore, + cdc codec.BinaryCodec, + height exported.Height, +) (uint64, error) { + return 0, nil +} + +func (c ClientState) Initialize(context sdk.Context, marshaler codec.BinaryCodec, store sdk.KVStore, state exported.ConsensusState) error { + return nil +} + +func (c ClientState) VerifyMembership( + ctx sdk.Context, + clientStore sdk.KVStore, + cdc codec.BinaryCodec, + height exported.Height, + delayTimePeriod uint64, + delayBlockPeriod uint64, + proof []byte, + path exported.Path, + value []byte, +) error { + return nil +} + +func (c ClientState) VerifyNonMembership( + ctx sdk.Context, + clientStore sdk.KVStore, + cdc codec.BinaryCodec, + height exported.Height, + delayTimePeriod uint64, + delayBlockPeriod uint64, + proof []byte, + path exported.Path, +) error { + return nil +} + +// VerifyClientMessage must verify a ClientMessage. A ClientMessage could be a Header, Misbehaviour, or batch update. +// It must handle each type of ClientMessage appropriately. Calls to CheckForMisbehaviour, UpdateState, and UpdateStateOnMisbehaviour +// will assume that the content of the ClientMessage has been verified and can be trusted. An error should be returned +// if the ClientMessage fails to verify. +func (c ClientState) VerifyClientMessage(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, clientMsg exported.ClientMessage) error { + return nil +} + +func (c ClientState) CheckForMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, msg exported.ClientMessage) bool { + return true +} + +// UpdateStateOnMisbehaviour should perform appropriate state changes on a client state given that misbehaviour has been detected and verified +func (c ClientState) UpdateStateOnMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, clientMsg exported.ClientMessage) { + +} + +func (c ClientState) UpdateState(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, clientMsg exported.ClientMessage) []exported.Height { + return []exported.Height{c.LatestHeight} +} + +func (c ClientState) CheckSubstituteAndUpdateState( + ctx sdk.Context, cdc codec.BinaryCodec, subjectClientStore, + substituteClientStore sdk.KVStore, substituteClient exported.ClientState, +) error { + return nil +} + +func (c ClientState) VerifyUpgradeAndUpdateState( + ctx sdk.Context, + cdc codec.BinaryCodec, + store sdk.KVStore, + newClient exported.ClientState, + newConsState exported.ConsensusState, + proofUpgradeClient, + proofUpgradeConsState []byte, +) error { + return nil +} + +// NewClientState creates a new ClientState instance. +func NewClientState(latestSequence uint64, consensusState *ConsensusState) *ClientState { + return &ClientState{ + Data: []byte{0}, + CodeId: []byte{}, + LatestHeight: clienttypes.Height{}, + } +} diff --git a/chain/cosmos/08-wasm-types/codec.go b/chain/cosmos/08-wasm-types/codec.go new file mode 100644 index 000000000..3408876da --- /dev/null +++ b/chain/cosmos/08-wasm-types/codec.go @@ -0,0 +1,32 @@ +package types + +import ( + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/ibc-go/v7/modules/core/exported" +) + +// RegisterInterfaces registers the tendermint concrete client-related +// implementations and interfaces. +func RegisterInterfaces(registry codectypes.InterfaceRegistry) { + registry.RegisterImplementations( + (*exported.ClientState)(nil), + &ClientState{}, + ) + registry.RegisterImplementations( + (*exported.ConsensusState)(nil), + &ConsensusState{}, + ) + registry.RegisterImplementations( + (*sdk.Msg)(nil), + &MsgStoreCode{}, + ) + registry.RegisterImplementations( + (*exported.ClientMessage)(nil), + &Misbehaviour{}, + ) + registry.RegisterImplementations( + (*exported.ClientMessage)(nil), + &Header{}, + ) +} diff --git a/chain/cosmos/08-wasm-types/consensus_state.go b/chain/cosmos/08-wasm-types/consensus_state.go new file mode 100644 index 000000000..d2482589f --- /dev/null +++ b/chain/cosmos/08-wasm-types/consensus_state.go @@ -0,0 +1,19 @@ +package types + +import ( + "github.com/cosmos/ibc-go/v7/modules/core/exported" +) + +var _ exported.ConsensusState = (*ConsensusState)(nil) + +func (m ConsensusState) ClientType() string { + return "" +} + +func (m ConsensusState) GetTimestamp() uint64 { + return m.Timestamp +} + +func (m ConsensusState) ValidateBasic() error { + return nil +} diff --git a/chain/cosmos/08-wasm-types/header.go b/chain/cosmos/08-wasm-types/header.go new file mode 100644 index 000000000..f47a48f74 --- /dev/null +++ b/chain/cosmos/08-wasm-types/header.go @@ -0,0 +1,15 @@ +package types + +import ( + "github.com/cosmos/ibc-go/v7/modules/core/exported" +) + +var _ exported.ClientMessage = &Header{} + +func (m Header) ClientType() string { + return "" +} + +func (m Header) ValidateBasic() error { + return nil +} diff --git a/chain/cosmos/08-wasm-types/misbehavior.go b/chain/cosmos/08-wasm-types/misbehavior.go new file mode 100644 index 000000000..daa3623a3 --- /dev/null +++ b/chain/cosmos/08-wasm-types/misbehavior.go @@ -0,0 +1,17 @@ +package types + +import ( + exported "github.com/cosmos/ibc-go/v7/modules/core/exported" +) + +var ( + _ exported.ClientMessage = &Misbehaviour{} +) + +func (m Misbehaviour) ClientType() string { + return "" +} + +func (m Misbehaviour) ValidateBasic() error { + return nil +} diff --git a/chain/cosmos/08-wasm-types/module.go b/chain/cosmos/08-wasm-types/module.go new file mode 100644 index 000000000..85fa9f128 --- /dev/null +++ b/chain/cosmos/08-wasm-types/module.go @@ -0,0 +1,57 @@ +package types + +import ( + "encoding/json" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/types/module" + //grpc "github.com/cosmos/gogoproto/grpc" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/spf13/cobra" +) + +var _ module.AppModuleBasic = AppModuleBasic{} + +// AppModuleBasic defines the basic application module used by the tendermint light client. +// Only the RegisterInterfaces function needs to be implemented. All other function perform +// a no-op. +type AppModuleBasic struct{} + +// Name returns the tendermint module name. +func (AppModuleBasic) Name() string { + return "08-wasm" +} + +// RegisterLegacyAminoCodec performs a no-op. The Wasm client does not support amino. +func (AppModuleBasic) RegisterLegacyAminoCodec(*codec.LegacyAmino) {} + +// RegisterInterfaces registers module concrete types into protobuf Any. This allows core IBC +// to unmarshal wasm light client types. +func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { + RegisterInterfaces(registry) +} + +// DefaultGenesis performs a no-op. Genesis is not supported for the tendermint light client. +func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { + return nil +} + +// ValidateGenesis performs a no-op. Genesis is not supported for the tendermint light cilent. +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { + return nil +} + +// RegisterGRPCGatewayRoutes performs a no-op. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {} + +// GetTxCmd performs a no-op. Please see the 02-client cli commands. +func (AppModuleBasic) GetTxCmd() *cobra.Command { + return nil +} + +// GetQueryCmd performs a no-op. Please see the 02-client cli commands. +func (AppModuleBasic) GetQueryCmd() *cobra.Command { + return nil +} diff --git a/chain/cosmos/08-wasm-types/msgs.go b/chain/cosmos/08-wasm-types/msgs.go new file mode 100644 index 000000000..ad8284065 --- /dev/null +++ b/chain/cosmos/08-wasm-types/msgs.go @@ -0,0 +1,21 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +var ( + _ sdk.Msg = &MsgStoreCode{} +) + +func (m MsgStoreCode) ValidateBasic() error { + return nil +} + +func (m MsgStoreCode) GetSigners() []sdk.AccAddress { + signer, err := sdk.AccAddressFromBech32(m.Signer) + if err != nil { + panic(err) + } + return []sdk.AccAddress{signer} +} diff --git a/chain/cosmos/08-wasm-types/tx.pb.go b/chain/cosmos/08-wasm-types/tx.pb.go new file mode 100644 index 000000000..cce6e707c --- /dev/null +++ b/chain/cosmos/08-wasm-types/tx.pb.go @@ -0,0 +1,635 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/lightclients/wasm/v1/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgStoreCode defines the request type for the StoreCode rpc. +type MsgStoreCode struct { + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + Code []byte `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` +} + +func (m *MsgStoreCode) Reset() { *m = MsgStoreCode{} } +func (m *MsgStoreCode) String() string { return proto.CompactTextString(m) } +func (*MsgStoreCode) ProtoMessage() {} +func (*MsgStoreCode) Descriptor() ([]byte, []int) { + return fileDescriptor_1d9737363bf1e38d, []int{0} +} +func (m *MsgStoreCode) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStoreCode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgStoreCode.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 *MsgStoreCode) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStoreCode.Merge(m, src) +} +func (m *MsgStoreCode) XXX_Size() int { + return m.Size() +} +func (m *MsgStoreCode) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStoreCode.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgStoreCode proto.InternalMessageInfo + +func (m *MsgStoreCode) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +func (m *MsgStoreCode) GetCode() []byte { + if m != nil { + return m.Code + } + return nil +} + +// MsgStoreCodeResponse defines the response type for the StoreCode rpc +type MsgStoreCodeResponse struct { + CodeId []byte `protobuf:"bytes,1,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"` +} + +func (m *MsgStoreCodeResponse) Reset() { *m = MsgStoreCodeResponse{} } +func (m *MsgStoreCodeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgStoreCodeResponse) ProtoMessage() {} +func (*MsgStoreCodeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1d9737363bf1e38d, []int{1} +} +func (m *MsgStoreCodeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStoreCodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgStoreCodeResponse.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 *MsgStoreCodeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStoreCodeResponse.Merge(m, src) +} +func (m *MsgStoreCodeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgStoreCodeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStoreCodeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgStoreCodeResponse proto.InternalMessageInfo + +func (m *MsgStoreCodeResponse) GetCodeId() []byte { + if m != nil { + return m.CodeId + } + return nil +} + +func init() { + proto.RegisterType((*MsgStoreCode)(nil), "ibc.lightclients.wasm.v1.MsgStoreCode") + proto.RegisterType((*MsgStoreCodeResponse)(nil), "ibc.lightclients.wasm.v1.MsgStoreCodeResponse") +} + +func init() { proto.RegisterFile("ibc/lightclients/wasm/v1/tx.proto", fileDescriptor_1d9737363bf1e38d) } + +var fileDescriptor_1d9737363bf1e38d = []byte{ + // 270 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xcc, 0x4c, 0x4a, 0xd6, + 0xcf, 0xc9, 0x4c, 0xcf, 0x28, 0x49, 0xce, 0xc9, 0x4c, 0xcd, 0x2b, 0x29, 0xd6, 0x2f, 0x4f, 0x2c, + 0xce, 0xd5, 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0xc8, + 0x4c, 0x4a, 0xd6, 0x43, 0x56, 0xa2, 0x07, 0x52, 0xa2, 0x57, 0x66, 0xa8, 0x64, 0xc5, 0xc5, 0xe3, + 0x5b, 0x9c, 0x1e, 0x5c, 0x92, 0x5f, 0x94, 0xea, 0x9c, 0x9f, 0x92, 0x2a, 0x24, 0xc6, 0xc5, 0x56, + 0x9c, 0x99, 0x9e, 0x97, 0x5a, 0x24, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0xe5, 0x09, 0x09, + 0x71, 0xb1, 0x24, 0xe7, 0xa7, 0xa4, 0x4a, 0x30, 0x29, 0x30, 0x6a, 0xf0, 0x04, 0x81, 0xd9, 0x4a, + 0xfa, 0x5c, 0x22, 0xc8, 0x7a, 0x83, 0x52, 0x8b, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x85, 0xc4, 0xb9, + 0xd8, 0x41, 0xf2, 0xf1, 0x99, 0x29, 0x60, 0x43, 0x78, 0x82, 0xd8, 0x40, 0x5c, 0xcf, 0x14, 0xa3, + 0x2c, 0x2e, 0x66, 0xdf, 0xe2, 0x74, 0xa1, 0x64, 0x2e, 0x4e, 0x84, 0x85, 0x6a, 0x7a, 0xb8, 0xdc, + 0xa6, 0x87, 0x6c, 0xb8, 0x94, 0x1e, 0x71, 0xea, 0x60, 0x8e, 0x70, 0x8a, 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, 0xfb, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, + 0xfc, 0x5c, 0xfd, 0xe4, 0xfc, 0xe2, 0xdc, 0xfc, 0x62, 0xfd, 0xcc, 0xa4, 0x64, 0xdd, 0xf4, 0x7c, + 0xfd, 0x32, 0x73, 0xfd, 0xdc, 0xfc, 0x94, 0xd2, 0x9c, 0xd4, 0x62, 0x48, 0x78, 0xea, 0xc2, 0x02, + 0xd4, 0xc0, 0x42, 0x17, 0x1c, 0xa6, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0xe0, 0x40, 0x35, + 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x99, 0x32, 0xbd, 0x79, 0x01, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // StoreCode defines a rpc handler method for MsgStoreCode. + StoreCode(ctx context.Context, in *MsgStoreCode, opts ...grpc.CallOption) (*MsgStoreCodeResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) StoreCode(ctx context.Context, in *MsgStoreCode, opts ...grpc.CallOption) (*MsgStoreCodeResponse, error) { + out := new(MsgStoreCodeResponse) + err := c.cc.Invoke(ctx, "/ibc.lightclients.wasm.v1.Msg/StoreCode", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // StoreCode defines a rpc handler method for MsgStoreCode. + StoreCode(context.Context, *MsgStoreCode) (*MsgStoreCodeResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) StoreCode(ctx context.Context, req *MsgStoreCode) (*MsgStoreCodeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StoreCode not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_StoreCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgStoreCode) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).StoreCode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.lightclients.wasm.v1.Msg/StoreCode", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).StoreCode(ctx, req.(*MsgStoreCode)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ibc.lightclients.wasm.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "StoreCode", + Handler: _Msg_StoreCode_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ibc/lightclients/wasm/v1/tx.proto", +} + +func (m *MsgStoreCode) 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 *MsgStoreCode) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStoreCode) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Code) > 0 { + i -= len(m.Code) + copy(dAtA[i:], m.Code) + i = encodeVarintTx(dAtA, i, uint64(len(m.Code))) + i-- + dAtA[i] = 0x12 + } + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgStoreCodeResponse) 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 *MsgStoreCodeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStoreCodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CodeId) > 0 { + i -= len(m.CodeId) + copy(dAtA[i:], m.CodeId) + i = encodeVarintTx(dAtA, i, uint64(len(m.CodeId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgStoreCode) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Code) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgStoreCodeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.CodeId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgStoreCode) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgStoreCode: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStoreCode: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Code = append(m.Code[:0], dAtA[iNdEx:postIndex]...) + if m.Code == nil { + m.Code = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgStoreCodeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgStoreCodeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStoreCodeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CodeId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CodeId = append(m.CodeId[:0], dAtA[iNdEx:postIndex]...) + if m.CodeId == nil { + m.CodeId = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + 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, ErrIntOverflowTx + } + 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, ErrIntOverflowTx + } + 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, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/chain/cosmos/08-wasm-types/wasm.pb.go b/chain/cosmos/08-wasm-types/wasm.pb.go new file mode 100644 index 000000000..0a2f17cac --- /dev/null +++ b/chain/cosmos/08-wasm-types/wasm.pb.go @@ -0,0 +1,995 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/lightclients/wasm/v1/wasm.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + types "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Wasm light client's Client state +type ClientState struct { + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + CodeId []byte `protobuf:"bytes,2,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"` + LatestHeight types.Height `protobuf:"bytes,3,opt,name=latest_height,json=latestHeight,proto3" json:"latest_height" yaml:"latest_height"` +} + +func (m *ClientState) Reset() { *m = ClientState{} } +func (m *ClientState) String() string { return proto.CompactTextString(m) } +func (*ClientState) ProtoMessage() {} +func (*ClientState) Descriptor() ([]byte, []int) { + return fileDescriptor_678928ebbdee1807, []int{0} +} +func (m *ClientState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ClientState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ClientState.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 *ClientState) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClientState.Merge(m, src) +} +func (m *ClientState) XXX_Size() int { + return m.Size() +} +func (m *ClientState) XXX_DiscardUnknown() { + xxx_messageInfo_ClientState.DiscardUnknown(m) +} + +var xxx_messageInfo_ClientState proto.InternalMessageInfo + +// Wasm light client's ConsensusState +type ConsensusState struct { + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + // timestamp that corresponds to the block height in which the ConsensusState + // was stored. + Timestamp uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (m *ConsensusState) Reset() { *m = ConsensusState{} } +func (m *ConsensusState) String() string { return proto.CompactTextString(m) } +func (*ConsensusState) ProtoMessage() {} +func (*ConsensusState) Descriptor() ([]byte, []int) { + return fileDescriptor_678928ebbdee1807, []int{1} +} +func (m *ConsensusState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConsensusState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ConsensusState.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 *ConsensusState) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConsensusState.Merge(m, src) +} +func (m *ConsensusState) XXX_Size() int { + return m.Size() +} +func (m *ConsensusState) XXX_DiscardUnknown() { + xxx_messageInfo_ConsensusState.DiscardUnknown(m) +} + +var xxx_messageInfo_ConsensusState proto.InternalMessageInfo + +// Wasm light client Header +type Header struct { + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Height types.Height `protobuf:"bytes,2,opt,name=height,proto3" json:"height" yaml:"height"` +} + +func (m *Header) Reset() { *m = Header{} } +func (m *Header) String() string { return proto.CompactTextString(m) } +func (*Header) ProtoMessage() {} +func (*Header) Descriptor() ([]byte, []int) { + return fileDescriptor_678928ebbdee1807, []int{2} +} +func (m *Header) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Header.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 *Header) XXX_Merge(src proto.Message) { + xxx_messageInfo_Header.Merge(m, src) +} +func (m *Header) XXX_Size() int { + return m.Size() +} +func (m *Header) XXX_DiscardUnknown() { + xxx_messageInfo_Header.DiscardUnknown(m) +} + +var xxx_messageInfo_Header proto.InternalMessageInfo + +// Wasm light client Misbehaviour +type Misbehaviour struct { + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (m *Misbehaviour) Reset() { *m = Misbehaviour{} } +func (m *Misbehaviour) String() string { return proto.CompactTextString(m) } +func (*Misbehaviour) ProtoMessage() {} +func (*Misbehaviour) Descriptor() ([]byte, []int) { + return fileDescriptor_678928ebbdee1807, []int{3} +} +func (m *Misbehaviour) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Misbehaviour) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Misbehaviour.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 *Misbehaviour) XXX_Merge(src proto.Message) { + xxx_messageInfo_Misbehaviour.Merge(m, src) +} +func (m *Misbehaviour) XXX_Size() int { + return m.Size() +} +func (m *Misbehaviour) XXX_DiscardUnknown() { + xxx_messageInfo_Misbehaviour.DiscardUnknown(m) +} + +var xxx_messageInfo_Misbehaviour proto.InternalMessageInfo + +func init() { + proto.RegisterType((*ClientState)(nil), "ibc.lightclients.wasm.v1.ClientState") + proto.RegisterType((*ConsensusState)(nil), "ibc.lightclients.wasm.v1.ConsensusState") + proto.RegisterType((*Header)(nil), "ibc.lightclients.wasm.v1.Header") + proto.RegisterType((*Misbehaviour)(nil), "ibc.lightclients.wasm.v1.Misbehaviour") +} + +func init() { + proto.RegisterFile("ibc/lightclients/wasm/v1/wasm.proto", fileDescriptor_678928ebbdee1807) +} + +var fileDescriptor_678928ebbdee1807 = []byte{ + // 386 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xc1, 0x6a, 0xea, 0x40, + 0x14, 0x86, 0x13, 0xaf, 0xe4, 0x72, 0x47, 0xbd, 0x8b, 0xe0, 0xe5, 0x06, 0x91, 0x44, 0x72, 0x37, + 0x6e, 0xcc, 0x5c, 0xdb, 0x45, 0x8b, 0x9b, 0x82, 0x6e, 0x74, 0xd1, 0x8d, 0x5d, 0xb5, 0x50, 0x64, + 0x32, 0x19, 0x92, 0x81, 0x8c, 0x23, 0xce, 0x24, 0xc5, 0x37, 0xe8, 0xb2, 0x6f, 0xd0, 0x3e, 0x8e, + 0x4b, 0x97, 0x5d, 0x49, 0xd1, 0x37, 0xe8, 0x13, 0x94, 0xcc, 0x44, 0xda, 0x82, 0xa5, 0xab, 0x9c, + 0x73, 0xf2, 0xe5, 0x3f, 0xff, 0x4f, 0x0e, 0xf8, 0x47, 0x43, 0x0c, 0x53, 0x1a, 0x27, 0x12, 0xa7, + 0x94, 0xcc, 0xa5, 0x80, 0x77, 0x48, 0x30, 0x98, 0xf7, 0xd5, 0x33, 0x58, 0x2c, 0xb9, 0xe4, 0xb6, + 0x43, 0x43, 0x1c, 0x7c, 0x84, 0x02, 0xf5, 0x32, 0xef, 0xb7, 0x9a, 0x31, 0x8f, 0xb9, 0x82, 0x60, + 0x51, 0x69, 0xbe, 0xe5, 0x15, 0xa2, 0x98, 0x2f, 0x09, 0xd4, 0x7c, 0x21, 0xa7, 0x2b, 0x0d, 0xf8, + 0x8f, 0x26, 0xa8, 0x8d, 0xd4, 0xe0, 0x4a, 0x22, 0x49, 0x6c, 0x1b, 0x54, 0x23, 0x24, 0x91, 0x63, + 0x76, 0xcc, 0x6e, 0x7d, 0xaa, 0x6a, 0xfb, 0x2f, 0xf8, 0x89, 0x79, 0x44, 0x66, 0x34, 0x72, 0x2a, + 0x6a, 0x6c, 0x15, 0xed, 0x24, 0xb2, 0x6f, 0x41, 0x23, 0x45, 0x92, 0x08, 0x39, 0x4b, 0x48, 0xe1, + 0xc9, 0xf9, 0xd1, 0x31, 0xbb, 0xb5, 0x93, 0x56, 0x50, 0xb8, 0x2c, 0xb6, 0x06, 0xe5, 0xae, 0xbc, + 0x1f, 0x8c, 0x15, 0x31, 0x6c, 0xaf, 0xb7, 0x9e, 0xf1, 0xba, 0xf5, 0x9a, 0x2b, 0xc4, 0xd2, 0x81, + 0xff, 0xe9, 0x73, 0x7f, 0x5a, 0xd7, 0xbd, 0x66, 0x07, 0xd5, 0xfb, 0x27, 0xcf, 0xf0, 0xc7, 0xe0, + 0xf7, 0x88, 0xcf, 0x05, 0x99, 0x8b, 0x4c, 0x7c, 0xed, 0xb1, 0x0d, 0x7e, 0x49, 0xca, 0x88, 0x90, + 0x88, 0x2d, 0x94, 0xcb, 0xea, 0xf4, 0x7d, 0x50, 0x2a, 0x31, 0x60, 0x8d, 0x09, 0x8a, 0xc8, 0xf2, + 0xa8, 0xc2, 0x04, 0x58, 0x65, 0x8a, 0xca, 0xb7, 0x29, 0xfe, 0x94, 0x29, 0x1a, 0x3a, 0xc5, 0xc1, + 0x7e, 0x29, 0x50, 0xae, 0xeb, 0x82, 0xfa, 0x25, 0x15, 0x21, 0x49, 0x50, 0x4e, 0x79, 0x76, 0x74, + 0xa9, 0x26, 0x87, 0xd7, 0xeb, 0x9d, 0x6b, 0x6e, 0x76, 0xae, 0xf9, 0xb2, 0x73, 0xcd, 0x87, 0xbd, + 0x6b, 0x6c, 0xf6, 0xae, 0xf1, 0xbc, 0x77, 0x8d, 0x9b, 0x8b, 0x98, 0xca, 0x24, 0x0b, 0x03, 0xcc, + 0x19, 0xc4, 0x5c, 0x30, 0x2e, 0x20, 0x0d, 0x71, 0x2f, 0xe6, 0x30, 0x3f, 0x83, 0x8c, 0x47, 0x59, + 0x4a, 0x84, 0x3e, 0x9a, 0xde, 0xe1, 0x6a, 0xfe, 0x9f, 0xf7, 0xd4, 0xe1, 0xc8, 0xd5, 0x82, 0x88, + 0xd0, 0x52, 0xbf, 0xf9, 0xf4, 0x2d, 0x00, 0x00, 0xff, 0xff, 0x8b, 0xed, 0x18, 0x0a, 0x5e, 0x02, + 0x00, 0x00, +} + +func (m *ClientState) 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 *ClientState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.LatestHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintWasm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.CodeId) > 0 { + i -= len(m.CodeId) + copy(dAtA[i:], m.CodeId) + i = encodeVarintWasm(dAtA, i, uint64(len(m.CodeId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintWasm(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ConsensusState) 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 *ConsensusState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConsensusState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Timestamp != 0 { + i = encodeVarintWasm(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x10 + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintWasm(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Header) 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 *Header) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintWasm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintWasm(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Misbehaviour) 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 *Misbehaviour) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Misbehaviour) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintWasm(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintWasm(dAtA []byte, offset int, v uint64) int { + offset -= sovWasm(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ClientState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Data) + if l > 0 { + n += 1 + l + sovWasm(uint64(l)) + } + l = len(m.CodeId) + if l > 0 { + n += 1 + l + sovWasm(uint64(l)) + } + l = m.LatestHeight.Size() + n += 1 + l + sovWasm(uint64(l)) + return n +} + +func (m *ConsensusState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Data) + if l > 0 { + n += 1 + l + sovWasm(uint64(l)) + } + if m.Timestamp != 0 { + n += 1 + sovWasm(uint64(m.Timestamp)) + } + return n +} + +func (m *Header) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Data) + if l > 0 { + n += 1 + l + sovWasm(uint64(l)) + } + l = m.Height.Size() + n += 1 + l + sovWasm(uint64(l)) + return n +} + +func (m *Misbehaviour) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Data) + if l > 0 { + n += 1 + l + sovWasm(uint64(l)) + } + return n +} + +func sovWasm(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozWasm(x uint64) (n int) { + return sovWasm(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ClientState) 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 ErrIntOverflowWasm + } + 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: ClientState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClientState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWasm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthWasm + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthWasm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CodeId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWasm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthWasm + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthWasm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CodeId = append(m.CodeId[:0], dAtA[iNdEx:postIndex]...) + if m.CodeId == nil { + m.CodeId = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LatestHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWasm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthWasm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthWasm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LatestHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipWasm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthWasm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConsensusState) 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 ErrIntOverflowWasm + } + 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: ConsensusState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConsensusState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWasm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthWasm + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthWasm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWasm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipWasm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthWasm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Header) 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 ErrIntOverflowWasm + } + 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: Header: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWasm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthWasm + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthWasm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWasm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthWasm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthWasm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipWasm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthWasm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Misbehaviour) 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 ErrIntOverflowWasm + } + 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: Misbehaviour: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Misbehaviour: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWasm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthWasm + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthWasm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipWasm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthWasm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipWasm(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, ErrIntOverflowWasm + } + 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, ErrIntOverflowWasm + } + 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, ErrIntOverflowWasm + } + 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, ErrInvalidLengthWasm + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupWasm + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthWasm + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthWasm = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowWasm = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupWasm = fmt.Errorf("proto: unexpected end of group") +) diff --git a/chain/cosmos/broadcaster.go b/chain/cosmos/broadcaster.go index 9ace40b04..fc378dd65 100644 --- a/chain/cosmos/broadcaster.go +++ b/chain/cosmos/broadcaster.go @@ -84,12 +84,12 @@ func (b *Broadcaster) GetFactory(ctx context.Context, user User) (tx.Factory, er return tx.Factory{}, err } - accNumber, err := clientContext.AccountRetriever.GetAccount(clientContext, sdkAdd) + account, err := clientContext.AccountRetriever.GetAccount(clientContext, sdkAdd) if err != nil { return tx.Factory{}, err } - f := b.defaultTxFactory(clientContext, accNumber.GetAccountNumber()) + f := b.defaultTxFactory(clientContext, account) for _, opt := range b.factoryOptions { f = opt(f) } @@ -166,10 +166,11 @@ func (b *Broadcaster) defaultClientContext(fromUser User, sdkAdd sdk.AccAddress) } // defaultTxFactory creates a new Factory with default configuration. -func (b *Broadcaster) defaultTxFactory(clientCtx client.Context, accountNumber uint64) tx.Factory { +func (b *Broadcaster) defaultTxFactory(clientCtx client.Context, account client.Account) tx.Factory { chainConfig := b.chain.Config() return tx.Factory{}. - WithAccountNumber(accountNumber). + WithAccountNumber(account.GetAccountNumber()). + WithSequence(account.GetSequence()). WithSignMode(signing.SignMode_SIGN_MODE_DIRECT). WithGasAdjustment(chainConfig.GasAdjustment). WithGas(flags.DefaultGasLimit). diff --git a/chain/cosmos/chain_node.go b/chain/cosmos/chain_node.go index bfc98790c..917f8bcac 100644 --- a/chain/cosmos/chain_node.go +++ b/chain/cosmos/chain_node.go @@ -26,8 +26,10 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/types" + authTx "github.com/cosmos/cosmos-sdk/x/auth/tx" paramsutils "github.com/cosmos/cosmos-sdk/x/params/client/utils" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + volumetypes "github.com/docker/docker/api/types/volume" dockerclient "github.com/docker/docker/client" "github.com/docker/go-connections/nat" "github.com/strangelove-ventures/interchaintest/v7/ibc" @@ -50,6 +52,9 @@ type ChainNode struct { TestName string Image ibc.DockerImage + // Additional processes that need to be run on a per-validator basis. + Sidecars SidecarProcesses + lock sync.Mutex log *zap.Logger @@ -58,8 +63,6 @@ type ChainNode struct { // Ports set during StartContainer. hostRPCPort string hostGRPCPort string - - preStartListeners dockerutil.Listeners } func NewChainNode(log *zap.Logger, validator bool, chain *CosmosChain, dockerClient *dockerclient.Client, networkID string, testName string, image ibc.DockerImage, index int) *ChainNode { @@ -121,6 +124,48 @@ func (tn *ChainNode) NewClient(addr string) error { return nil } +func (tn *ChainNode) NewSidecarProcess( + ctx context.Context, + preStart bool, + processName string, + cli *dockerclient.Client, + networkID string, + image ibc.DockerImage, + homeDir string, + ports []string, + startCmd []string, +) error { + s := NewSidecar(tn.log, true, preStart, tn.Chain, cli, networkID, processName, tn.TestName, image, homeDir, tn.Index, ports, startCmd) + + v, err := cli.VolumeCreate(ctx, volumetypes.CreateOptions{ + Labels: map[string]string{ + dockerutil.CleanupLabel: tn.TestName, + dockerutil.NodeOwnerLabel: s.Name(), + }, + }) + if err != nil { + return fmt.Errorf("creating volume for sidecar process: %w", err) + } + s.VolumeName = v.Name + + if err := dockerutil.SetVolumeOwner(ctx, dockerutil.VolumeOwnerOptions{ + Log: tn.log, + + Client: cli, + + VolumeName: v.Name, + ImageRef: image.Ref(), + TestName: tn.TestName, + UidGid: image.UidGid, + }); err != nil { + return fmt.Errorf("set volume owner: %w", err) + } + + tn.Sidecars = append(tn.Sidecars, s) + + return nil +} + // CliContext creates a new Cosmos SDK client context func (tn *ChainNode) CliContext() client.Context { cfg := tn.Chain.Config() @@ -152,7 +197,7 @@ func (tn *ChainNode) HostName() string { return dockerutil.CondenseHostName(tn.Name()) } -func (tn *ChainNode) genesisFileContent(ctx context.Context) ([]byte, error) { +func (tn *ChainNode) GenesisFileContent(ctx context.Context) ([]byte, error) { gen, err := tn.ReadFile(ctx, "config/genesis.json") if err != nil { return nil, fmt.Errorf("getting genesis.json content: %w", err) @@ -161,7 +206,7 @@ func (tn *ChainNode) genesisFileContent(ctx context.Context) ([]byte, error) { return gen, nil } -func (tn *ChainNode) overwriteGenesisFile(ctx context.Context, content []byte) error { +func (tn *ChainNode) OverwriteGenesisFile(ctx context.Context, content []byte) error { err := tn.WriteFile(ctx, content, "config/genesis.json") if err != nil { return fmt.Errorf("overwriting genesis.json: %w", err) @@ -404,13 +449,27 @@ func (tn *ChainNode) FindTxs(ctx context.Context, height uint64) ([]blockdb.Tx, // with the chain node binary. func (tn *ChainNode) TxCommand(keyName string, command ...string) []string { command = append([]string{"tx"}, command...) + var gasPriceFound, gasAdjustmentFound = false, false + for i := 0; i < len(command); i++ { + if command[i] == "--gas-prices" { + gasPriceFound = true + } + if command[i] == "--gas-adjustment" { + gasAdjustmentFound = true + } + } + if !gasPriceFound { + command = append(command, "--gas-prices", tn.Chain.Config().GasPrices) + } + if !gasAdjustmentFound { + command = append(command, "--gas-adjustment", fmt.Sprint(tn.Chain.Config().GasAdjustment)) + } return tn.NodeCommand(append(command, "--from", keyName, - "--gas-prices", tn.Chain.Config().GasPrices, - "--gas-adjustment", fmt.Sprint(tn.Chain.Config().GasAdjustment), "--keyring-backend", keyring.BackendTest, "--output", "json", "-y", + "--chain-id", tn.Chain.Config().ChainID, )...) } @@ -446,7 +505,6 @@ func (tn *ChainNode) NodeCommand(command ...string) []string { command = tn.BinCommand(command...) return append(command, "--node", fmt.Sprintf("tcp://%s:26657", tn.HostName()), - "--chain-id", tn.Chain.Config().ChainID, ) } @@ -662,7 +720,7 @@ func (tn *ChainNode) SendIBCTransfer( ) (string, error) { command := []string{ "ibc-transfer", "transfer", "transfer", channelID, - amount.Address, fmt.Sprintf("%d%s", amount.Amount, amount.Denom), + amount.Address, fmt.Sprintf("%s%s", amount.Amount.String(), amount.Denom), } if options.Timeout != nil { if options.Timeout.NanoSeconds > 0 { @@ -680,7 +738,7 @@ func (tn *ChainNode) SendIBCTransfer( func (tn *ChainNode) SendFunds(ctx context.Context, keyName string, amount ibc.WalletAmount) error { _, err := tn.ExecTx(ctx, keyName, "bank", "send", keyName, - amount.Address, fmt.Sprintf("%d%s", amount.Amount, amount.Denom), + amount.Address, fmt.Sprintf("%s%s", amount.Amount.String(), amount.Denom), ) return err } @@ -720,7 +778,7 @@ func (tn *ChainNode) StoreContract(ctx context.Context, keyName string, fileName return "", fmt.Errorf("writing contract file to docker volume: %w", err) } - if _, err := tn.ExecTx(ctx, keyName, "wasm", "store", path.Join(tn.HomeDir(), file)); err != nil { + if _, err := tn.ExecTx(ctx, keyName, "wasm", "store", path.Join(tn.HomeDir(), file), "--gas", "auto"); err != nil { return "", err } @@ -742,17 +800,43 @@ func (tn *ChainNode) StoreContract(ctx context.Context, keyName string, fileName return res.CodeInfos[0].CodeID, nil } +func (tn *ChainNode) getTransaction(clientCtx client.Context, txHash string) (*types.TxResponse, error) { + // Retry because sometimes the tx is not committed to state yet. + var txResp *types.TxResponse + err := retry.Do(func() error { + var err error + txResp, err = authTx.QueryTx(clientCtx, txHash) + return err + }, + // retry for total of 3 seconds + retry.Attempts(15), + retry.Delay(200*time.Millisecond), + retry.DelayType(retry.FixedDelay), + retry.LastErrorOnly(true), + ) + return txResp, err +} + // InstantiateContract takes a code id for a smart contract and initialization message and returns the instantiated contract address. -func (tn *ChainNode) InstantiateContract(ctx context.Context, keyName string, codeID string, initMessage string, needsNoAdminFlag bool) (string, error) { +func (tn *ChainNode) InstantiateContract(ctx context.Context, keyName string, codeID string, initMessage string, needsNoAdminFlag bool, extraExecTxArgs ...string) (string, error) { command := []string{"wasm", "instantiate", codeID, initMessage, "--label", "wasm-contract"} + command = append(command, extraExecTxArgs...) if needsNoAdminFlag { command = append(command, "--no-admin") } - _, err := tn.ExecTx(ctx, keyName, command...) + txHash, err := tn.ExecTx(ctx, keyName, command...) if err != nil { return "", err } + txResp, err := tn.getTransaction(tn.CliContext(), txHash) + if err != nil { + return "", fmt.Errorf("failed to get transaction %s: %w", txHash, err) + } + if txResp.Code != 0 { + return "", fmt.Errorf("error in transaction (code: %d): %s", txResp.Code, txResp.RawLog) + } + stdout, _, err := tn.ExecQuery(ctx, "wasm", "list-contract-by-code", codeID) if err != nil { return "", err @@ -768,11 +852,10 @@ func (tn *ChainNode) InstantiateContract(ctx context.Context, keyName string, co } // ExecuteContract executes a contract transaction with a message using it's address. -func (tn *ChainNode) ExecuteContract(ctx context.Context, keyName string, contractAddress string, message string) error { - _, err := tn.ExecTx(ctx, keyName, +func (tn *ChainNode) ExecuteContract(ctx context.Context, keyName string, contractAddress string, message string) (txHash string, err error) { + return tn.ExecTx(ctx, keyName, "wasm", "execute", contractAddress, message, ) - return err } // QueryContract performs a smart query, taking in a query struct and returning a error with the response struct populated. @@ -792,13 +875,16 @@ func (tn *ChainNode) QueryContract(ctx context.Context, contractAddress string, // StoreClientContract takes a file path to a client smart contract and stores it on-chain. Returns the contracts code id. func (tn *ChainNode) StoreClientContract(ctx context.Context, keyName string, fileName string) (string, error) { content, err := os.ReadFile(fileName) + if err != nil { + return "", err + } _, file := filepath.Split(fileName) err = tn.WriteFile(ctx, content, file) if err != nil { return "", fmt.Errorf("writing contract file to docker volume: %w", err) } - _, err = tn.ExecTx(ctx, keyName, "ibc", "wasm-client", "push-wasm", path.Join(tn.HomeDir(), file), "--gas", "auto") + _, err = tn.ExecTx(ctx, keyName, "ibc-wasm", "store-code", path.Join(tn.HomeDir(), file), "--gas", "auto") if err != nil { return "", err } @@ -812,7 +898,7 @@ func (tn *ChainNode) StoreClientContract(ctx context.Context, keyName string, fi // QueryClientContractCode performs a query with the contract codeHash as the input and code as the output func (tn *ChainNode) QueryClientContractCode(ctx context.Context, codeHash string, response any) error { - stdout, _, err := tn.ExecQuery(ctx, "ibc", "wasm-client", "code", codeHash) + stdout, _, err := tn.ExecQuery(ctx, "ibc-wasm", "code", codeHash) if err != nil { return err } @@ -824,7 +910,7 @@ func (tn *ChainNode) QueryClientContractCode(ctx context.Context, codeHash strin func (tn *ChainNode) VoteOnProposal(ctx context.Context, keyName string, proposalID string, vote string) error { _, err := tn.ExecTx(ctx, keyName, "gov", "vote", - proposalID, vote, + proposalID, vote, "--gas", "auto", ) return err } @@ -843,6 +929,27 @@ func (tn *ChainNode) QueryProposal(ctx context.Context, proposalID string) (*Pro return &proposal, nil } +// SubmitProposal submits a gov v1 proposal to the chain. +func (tn *ChainNode) SubmitProposal(ctx context.Context, keyName string, prop TxProposalv1) (string, error) { + // Write msg to container + file := "proposal.json" + propJson, err := json.MarshalIndent(prop, "", " ") + if err != nil { + return "", err + } + fw := dockerutil.NewFileWriter(tn.logger(), tn.DockerClient, tn.TestName) + if err := fw.WriteFile(ctx, tn.VolumeName, file, propJson); err != nil { + return "", fmt.Errorf("writing contract file to docker volume: %w", err) + } + + command := []string{ + "gov", "submit-proposal", + path.Join(tn.HomeDir(), file), "--gas", "auto", + } + + return tn.ExecTx(ctx, keyName, command...) +} + // UpgradeProposal submits a software-upgrade governance proposal to the chain. func (tn *ChainNode) UpgradeProposal(ctx context.Context, keyName string, prop SoftwareUpgradeProposal) (string, error) { command := []string{ @@ -901,6 +1008,20 @@ func (tn *ChainNode) ParamChangeProposal(ctx context.Context, keyName string, pr return tn.ExecTx(ctx, keyName, command...) } +// QueryParam returns the state and details of a subspace param. +func (tn *ChainNode) QueryParam(ctx context.Context, subspace, key string) (*ParamChange, error) { + stdout, _, err := tn.ExecQuery(ctx, "params", "subspace", subspace, key) + if err != nil { + return nil, err + } + var param ParamChange + err = json.Unmarshal(stdout, ¶m) + if err != nil { + return nil, err + } + return ¶m, nil +} + // DumpContractState dumps the state of a contract at a block height. func (tn *ChainNode) DumpContractState(ctx context.Context, contractAddress string, height int64) (*DumpContractStateResponse, error) { stdout, _, err := tn.ExecQuery(ctx, @@ -952,6 +1073,20 @@ func (tn *ChainNode) CreateNodeContainer(ctx context.Context) error { } func (tn *ChainNode) StartContainer(ctx context.Context) error { + for _, s := range tn.Sidecars { + err := s.containerLifecycle.Running(ctx) + + if s.preStart && err != nil { + if err := s.CreateContainer(ctx); err != nil { + return err + } + + if err := s.StartContainer(ctx); err != nil { + return err + } + } + } + if err := tn.containerLifecycle.StartContainer(ctx); err != nil { return err } @@ -984,10 +1119,20 @@ func (tn *ChainNode) StartContainer(ctx context.Context) error { } func (tn *ChainNode) StopContainer(ctx context.Context) error { + for _, s := range tn.Sidecars { + if err := s.StopContainer(ctx); err != nil { + return err + } + } return tn.containerLifecycle.StopContainer(ctx) } func (tn *ChainNode) RemoveContainer(ctx context.Context) error { + for _, s := range tn.Sidecars { + if err := s.RemoveContainer(ctx); err != nil { + return err + } + } return tn.containerLifecycle.RemoveContainer(ctx) } @@ -1087,7 +1232,7 @@ func (nodes ChainNodes) PeerString(ctx context.Context) string { // LogGenesisHashes logs the genesis hashes for the various nodes func (nodes ChainNodes) LogGenesisHashes(ctx context.Context) error { for _, n := range nodes { - gen, err := n.genesisFileContent(ctx) + gen, err := n.GenesisFileContent(ctx) if err != nil { return err } @@ -1158,7 +1303,7 @@ func (tn *ChainNode) SendICABankTransfer(ctx context.Context, connectionID, from "amount": []map[string]any{ { "denom": amount.Denom, - "amount": amount.Amount, + "amount": amount.Amount.String(), }, }, }) diff --git a/chain/cosmos/codec.go b/chain/cosmos/codec.go index fe0af864e..ac5c1e70d 100644 --- a/chain/cosmos/codec.go +++ b/chain/cosmos/codec.go @@ -26,6 +26,7 @@ import ( transfer "github.com/cosmos/ibc-go/v7/modules/apps/transfer" ibccore "github.com/cosmos/ibc-go/v7/modules/core" ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" + ibcwasm "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos/08-wasm-types" ) func DefaultEncoding() testutil.TestEncodingConfig { @@ -51,6 +52,7 @@ func DefaultEncoding() testutil.TestEncodingConfig { transfer.AppModuleBasic{}, ibccore.AppModuleBasic{}, ibctm.AppModuleBasic{}, + ibcwasm.AppModuleBasic{}, ) } diff --git a/chain/cosmos/cosmos_chain.go b/chain/cosmos/cosmos_chain.go index a055e0524..1c3ca6593 100644 --- a/chain/cosmos/cosmos_chain.go +++ b/chain/cosmos/cosmos_chain.go @@ -3,28 +3,33 @@ package cosmos import ( "bytes" "context" + "crypto/sha256" + "encoding/hex" + "encoding/json" "fmt" "io" "os" "strconv" "strings" "sync" - "time" - "github.com/avast/retry-go/v4" + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/types" - authTx "github.com/cosmos/cosmos-sdk/x/auth/tx" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bankTypes "github.com/cosmos/cosmos-sdk/x/bank/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" paramsutils "github.com/cosmos/cosmos-sdk/x/params/client/utils" + cosmosproto "github.com/cosmos/gogoproto/proto" chanTypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" dockertypes "github.com/docker/docker/api/types" volumetypes "github.com/docker/docker/api/types/volume" "github.com/docker/docker/client" + wasmtypes "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos/08-wasm-types" "github.com/strangelove-ventures/interchaintest/v7/chain/internal/tendermint" "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/strangelove-ventures/interchaintest/v7/internal/blockdb" @@ -46,6 +51,9 @@ type CosmosChain struct { Validators ChainNodes FullNodes ChainNodes + // Additional processes that need to be run on a per-chain basis. + Sidecars SidecarProcesses + log *zap.Logger keyring keyring.Keyring findTxMu sync.Mutex @@ -110,7 +118,7 @@ func (c *CosmosChain) AddFullNodes(ctx context.Context, configFileOverrides map[ peers := c.Nodes().PeerString(ctx) // Get genesis.json - genbz, err := c.Validators[0].genesisFileContent(ctx) + genbz, err := c.Validators[0].GenesisFileContent(ctx) if err != nil { return err } @@ -132,7 +140,7 @@ func (c *CosmosChain) AddFullNodes(ctx context.Context, configFileOverrides map[ if err := fn.SetPeers(ctx, peers); err != nil { return err } - if err := fn.overwriteGenesisFile(ctx, genbz); err != nil { + if err := fn.OverwriteGenesisFile(ctx, genbz); err != nil { return err } for configFile, modifiedConfig := range configFileOverrides { @@ -168,6 +176,9 @@ func (c *CosmosChain) Config() ibc.ChainConfig { // Implements Chain interface func (c *CosmosChain) Initialize(ctx context.Context, testName string, cli *client.Client, networkID string) error { + if err := c.initializeSidecars(ctx, testName, cli, networkID); err != nil { + return err + } return c.initializeChainNodes(ctx, testName, cli, networkID) } @@ -353,6 +364,36 @@ func (c *CosmosChain) QueryProposal(ctx context.Context, proposalID string) (*Pr return c.getFullNode().QueryProposal(ctx, proposalID) } +// PushNewWasmClientProposal submits a new wasm client governance proposal to the chain +func (c *CosmosChain) PushNewWasmClientProposal(ctx context.Context, keyName string, fileName string, prop TxProposalv1) (TxProposal, string, error) { + tx := TxProposal{} + content, err := os.ReadFile(fileName) + if err != nil { + return tx, "", err + } + codeHashByte32 := sha256.Sum256(content) + codeHash := hex.EncodeToString(codeHashByte32[:]) + content, err = testutil.GzipIt(content) + if err != nil { + return tx, "", err + } + message := wasmtypes.MsgStoreCode{ + Signer: types.MustBech32ifyAddressBytes(c.cfg.Bech32Prefix, authtypes.NewModuleAddress(govtypes.ModuleName)), + Code: content, + } + msg, err := c.cfg.EncodingConfig.Codec.MarshalInterfaceJSON(&message) + if err != nil { + return tx, "", err + } + prop.Messages = append(prop.Messages, msg) + txHash, err := c.getFullNode().SubmitProposal(ctx, keyName, prop) + if err != nil { + return tx, "", fmt.Errorf("failed to submit wasm client proposal: %w", err) + } + tx, err = c.txProposal(txHash) + return tx, codeHash, err +} + // UpgradeProposal submits a software-upgrade governance proposal to the chain. func (c *CosmosChain) UpgradeProposal(ctx context.Context, keyName string, prop SoftwareUpgradeProposal) (tx TxProposal, _ error) { txHash, err := c.getFullNode().UpgradeProposal(ctx, keyName, prop) @@ -362,6 +403,39 @@ func (c *CosmosChain) UpgradeProposal(ctx context.Context, keyName string, prop return c.txProposal(txHash) } +// SubmitProposal submits a gov v1 proposal to the chain. +func (c *CosmosChain) SubmitProposal(ctx context.Context, keyName string, prop TxProposalv1) (tx TxProposal, _ error) { + txHash, err := c.getFullNode().SubmitProposal(ctx, keyName, prop) + if err != nil { + return tx, fmt.Errorf("failed to submit gov v1 proposal: %w", err) + } + return c.txProposal(txHash) +} + +// Build a gov v1 proposal type. +func (c *CosmosChain) BuildProposal(messages []cosmosproto.Message, title, summary, metadata, depositStr string) (TxProposalv1, error) { + var propType TxProposalv1 + rawMsgs := make([]json.RawMessage, len(messages)) + + for i, msg := range messages { + msg, err := c.Config().EncodingConfig.Codec.MarshalInterfaceJSON(msg) + if err != nil { + return propType, err + } + rawMsgs[i] = msg + } + + propType = TxProposalv1{ + Messages: rawMsgs, + Metadata: metadata, + Deposit: depositStr, + Title: title, + Summary: summary, + } + + return propType, nil +} + // TextProposal submits a text governance proposal to the chain. func (c *CosmosChain) TextProposal(ctx context.Context, keyName string, prop TextProposal) (tx TxProposal, _ error) { txHash, err := c.getFullNode().TextProposal(ctx, keyName, prop) @@ -381,6 +455,11 @@ func (c *CosmosChain) ParamChangeProposal(ctx context.Context, keyName string, p return c.txProposal(txHash) } +// QueryParam returns the param state of a given key. +func (c *CosmosChain) QueryParam(ctx context.Context, subspace, key string) (*ParamChange, error) { + return c.getFullNode().QueryParam(ctx, subspace, key) +} + func (c *CosmosChain) txProposal(txHash string) (tx TxProposal, _ error) { txResp, err := c.getTransaction(txHash) if err != nil { @@ -407,12 +486,12 @@ func (c *CosmosChain) StoreContract(ctx context.Context, keyName string, fileNam } // InstantiateContract takes a code id for a smart contract and initialization message and returns the instantiated contract address. -func (c *CosmosChain) InstantiateContract(ctx context.Context, keyName string, codeID string, initMessage string, needsNoAdminFlag bool) (string, error) { - return c.getFullNode().InstantiateContract(ctx, keyName, codeID, initMessage, needsNoAdminFlag) +func (c *CosmosChain) InstantiateContract(ctx context.Context, keyName string, codeID string, initMessage string, needsNoAdminFlag bool, extraExecTxArgs ...string) (string, error) { + return c.getFullNode().InstantiateContract(ctx, keyName, codeID, initMessage, needsNoAdminFlag, extraExecTxArgs...) } // ExecuteContract executes a contract transaction with a message using it's address. -func (c *CosmosChain) ExecuteContract(ctx context.Context, keyName string, contractAddress string, message string) error { +func (c *CosmosChain) ExecuteContract(ctx context.Context, keyName string, contractAddress string, message string) (txHash string, err error) { return c.getFullNode().ExecuteContract(ctx, keyName, contractAddress, message) } @@ -444,12 +523,12 @@ func (c *CosmosChain) ExportState(ctx context.Context, height int64) (string, er // GetBalance fetches the current balance for a specific account address and denom. // Implements Chain interface -func (c *CosmosChain) GetBalance(ctx context.Context, address string, denom string) (int64, error) { +func (c *CosmosChain) GetBalance(ctx context.Context, address string, denom string) (math.Int, error) { params := &bankTypes.QueryBalanceRequest{Address: address, Denom: denom} grpcAddress := c.getFullNode().hostGRPCPort conn, err := grpc.Dial(grpcAddress, grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { - return 0, err + return math.Int{}, err } defer conn.Close() @@ -457,10 +536,10 @@ func (c *CosmosChain) GetBalance(ctx context.Context, address string, denom stri res, err := queryClient.Balance(ctx, params) if err != nil { - return 0, err + return math.Int{}, err } - return res.Balance.Amount.Int64(), nil + return res.Balance.Amount, nil } // AllBalances fetches an account address's balance for all denoms it holds @@ -483,21 +562,9 @@ func (c *CosmosChain) AllBalances(ctx context.Context, address string) (types.Co return res.GetBalances(), nil } -func (c *CosmosChain) getTransaction(txHash string) (*types.TxResponse, error) { - // Retry because sometimes the tx is not committed to state yet. - var txResp *types.TxResponse - err := retry.Do(func() error { - var err error - txResp, err = authTx.QueryTx(c.getFullNode().CliContext(), txHash) - return err - }, - // retry for total of 3 seconds - retry.Attempts(15), - retry.Delay(200*time.Millisecond), - retry.DelayType(retry.FixedDelay), - retry.LastErrorOnly(true), - ) - return txResp, err +func (c *CosmosChain) getTransaction(txhash string) (*types.TxResponse, error) { + fn := c.getFullNode() + return fn.getTransaction(fn.CliContext(), txhash) } func (c *CosmosChain) GetGasFeesInNativeDenom(gasPaid int64) int64 { @@ -553,7 +620,7 @@ func (c *CosmosChain) NewChainNode( // The ChainNode's VolumeName cannot be set until after we create the volume. tn := NewChainNode(c.log, validator, c, cli, networkID, testName, image, index) - v, err := cli.VolumeCreate(ctx, volumetypes.VolumeCreateBody{ + v, err := cli.VolumeCreate(ctx, volumetypes.CreateOptions{ Labels: map[string]string{ dockerutil.CleanupLabel: testName, @@ -577,9 +644,68 @@ func (c *CosmosChain) NewChainNode( }); err != nil { return nil, fmt.Errorf("set volume owner: %w", err) } + + for _, cfg := range c.cfg.SidecarConfigs { + if !cfg.ValidatorProcess { + continue + } + + err = tn.NewSidecarProcess(ctx, cfg.PreStart, cfg.ProcessName, cli, networkID, cfg.Image, cfg.HomeDir, cfg.Ports, cfg.StartCmd) + if err != nil { + return nil, err + } + } + return tn, nil } +// NewSidecarProcess constructs a new sidecar process with a docker volume. +func (c *CosmosChain) NewSidecarProcess( + ctx context.Context, + preStart bool, + processName string, + testName string, + cli *client.Client, + networkID string, + image ibc.DockerImage, + homeDir string, + index int, + ports []string, + startCmd []string, +) error { + // Construct the SidecarProcess first so we can access its name. + // The SidecarProcess's VolumeName cannot be set until after we create the volume. + s := NewSidecar(c.log, false, preStart, c, cli, networkID, processName, testName, image, homeDir, index, ports, startCmd) + + v, err := cli.VolumeCreate(ctx, volumetypes.CreateOptions{ + Labels: map[string]string{ + dockerutil.CleanupLabel: testName, + dockerutil.NodeOwnerLabel: s.Name(), + }, + }) + if err != nil { + return fmt.Errorf("creating volume for sidecar process: %w", err) + } + s.VolumeName = v.Name + + if err := dockerutil.SetVolumeOwner(ctx, dockerutil.VolumeOwnerOptions{ + Log: c.log, + + Client: cli, + + VolumeName: v.Name, + ImageRef: image.Ref(), + TestName: testName, + UidGid: image.UidGid, + }); err != nil { + return fmt.Errorf("set volume owner: %w", err) + } + + c.Sidecars = append(c.Sidecars, s) + + return nil +} + // creates the test node objects required for bootstrapping tests func (c *CosmosChain) initializeChainNodes( ctx context.Context, @@ -629,6 +755,37 @@ func (c *CosmosChain) initializeChainNodes( return nil } +// initializeSidecars creates the sidecar processes that exist at the chain level. +func (c *CosmosChain) initializeSidecars( + ctx context.Context, + testName string, + cli *client.Client, + networkID string, +) error { + eg, egCtx := errgroup.WithContext(ctx) + for i, cfg := range c.cfg.SidecarConfigs { + i := i + cfg := cfg + + if cfg.ValidatorProcess { + continue + } + + eg.Go(func() error { + err := c.NewSidecarProcess(egCtx, cfg.PreStart, cfg.ProcessName, testName, cli, networkID, cfg.Image, cfg.HomeDir, i, cfg.Ports, cfg.StartCmd) + if err != nil { + return err + } + return nil + }) + + } + if err := eg.Wait(); err != nil { + return err + } + return nil +} + type GenesisValidatorPubKey struct { Type string `json:"type"` Value string `json:"value"` @@ -693,7 +850,10 @@ func (c *CosmosChain) Start(testName string, ctx context.Context, additionalGene return err } } - return v.InitValidatorGenTx(ctx, &chainCfg, genesisAmounts, genesisSelfDelegation) + if !c.cfg.SkipGenTx { + return v.InitValidatorGenTx(ctx, &chainCfg, genesisAmounts, genesisSelfDelegation) + } + return nil }) } @@ -731,6 +891,13 @@ func (c *CosmosChain) Start(testName string, ctx context.Context, additionalGene return err } + if c.cfg.PreGenesis != nil { + err := c.cfg.PreGenesis(chainCfg) + if err != nil { + return err + } + } + // for the validators we need to collect the gentxs and the accounts // to the first node's genesis file validator0 := c.Validators[0] @@ -746,22 +913,26 @@ func (c *CosmosChain) Start(testName string, ctx context.Context, additionalGene return err } - if err := validatorN.copyGentx(ctx, validator0); err != nil { - return err + if !c.cfg.SkipGenTx { + if err := validatorN.copyGentx(ctx, validator0); err != nil { + return err + } } } for _, wallet := range additionalGenesisWallets { - if err := validator0.AddGenesisAccount(ctx, wallet.Address, []types.Coin{{Denom: wallet.Denom, Amount: types.NewInt(wallet.Amount)}}); err != nil { + if err := validator0.AddGenesisAccount(ctx, wallet.Address, []types.Coin{{Denom: wallet.Denom, Amount: wallet.Amount}}); err != nil { return err } } - if err := validator0.CollectGentxs(ctx); err != nil { - return err + if !c.cfg.SkipGenTx { + if err := validator0.CollectGentxs(ctx); err != nil { + return err + } } - genbz, err := validator0.genesisFileContent(ctx) + genbz, err := validator0.GenesisFileContent(ctx) if err != nil { return err } @@ -789,7 +960,7 @@ func (c *CosmosChain) Start(testName string, ctx context.Context, additionalGene chainNodes := c.Nodes() for _, cn := range chainNodes { - if err := cn.overwriteGenesisFile(ctx, genbz); err != nil { + if err := cn.OverwriteGenesisFile(ctx, genbz); err != nil { return err } } @@ -798,7 +969,31 @@ func (c *CosmosChain) Start(testName string, ctx context.Context, additionalGene return err } + // Start any sidecar processes that should be running before the chain starts eg, egCtx := errgroup.WithContext(ctx) + for _, s := range c.Sidecars { + s := s + + err = s.containerLifecycle.Running(ctx) + if s.preStart && err != nil { + eg.Go(func() error { + if err := s.CreateContainer(egCtx); err != nil { + return err + } + + if err := s.StartContainer(egCtx); err != nil { + return err + } + + return nil + }) + } + } + if err := eg.Wait(); err != nil { + return err + } + + eg, egCtx = errgroup.WithContext(ctx) for _, n := range chainNodes { n := n eg.Go(func() error { @@ -923,6 +1118,21 @@ func (c *CosmosChain) StopAllNodes(ctx context.Context) error { return eg.Wait() } +// StopAllSidecars stops and removes all long-running containers for sidecar processes. +func (c *CosmosChain) StopAllSidecars(ctx context.Context) error { + var eg errgroup.Group + for _, s := range c.Sidecars { + s := s + eg.Go(func() error { + if err := s.StopContainer(ctx); err != nil { + return err + } + return s.RemoveContainer(ctx) + }) + } + return eg.Wait() +} + // StartAllNodes creates and starts new containers for each node. // Should only be used if the chain has previously been started with .Start. func (c *CosmosChain) StartAllNodes(ctx context.Context) error { @@ -942,6 +1152,60 @@ func (c *CosmosChain) StartAllNodes(ctx context.Context) error { return eg.Wait() } +// StartAllSidecars creates and starts new containers for each sidecar process. +// Should only be used if the chain has previously been started with .Start. +func (c *CosmosChain) StartAllSidecars(ctx context.Context) error { + // prevent client calls during this time + c.findTxMu.Lock() + defer c.findTxMu.Unlock() + var eg errgroup.Group + for _, s := range c.Sidecars { + s := s + + err := s.containerLifecycle.Running(ctx) + if err == nil { + continue + } + + eg.Go(func() error { + if err := s.CreateContainer(ctx); err != nil { + return err + } + return s.StartContainer(ctx) + }) + } + return eg.Wait() +} + +// StartAllValSidecars creates and starts new containers for each validator sidecar process. +// Should only be used if the chain has previously been started with .Start. +func (c *CosmosChain) StartAllValSidecars(ctx context.Context) error { + // prevent client calls during this time + c.findTxMu.Lock() + defer c.findTxMu.Unlock() + var eg errgroup.Group + + for _, v := range c.Validators { + for _, s := range v.Sidecars { + s := s + + err := s.containerLifecycle.Running(ctx) + if err == nil { + continue + } + + eg.Go(func() error { + if err := s.CreateContainer(ctx); err != nil { + return err + } + return s.StartContainer(ctx) + }) + } + } + + return eg.Wait() +} + func (c *CosmosChain) VoteOnProposalAllValidators(ctx context.Context, proposalID string, vote string) error { var eg errgroup.Group for _, n := range c.Nodes() { diff --git a/chain/cosmos/genesis.go b/chain/cosmos/genesis.go new file mode 100644 index 000000000..75e13dcdb --- /dev/null +++ b/chain/cosmos/genesis.go @@ -0,0 +1,48 @@ +package cosmos + +import ( + "encoding/json" + "fmt" + "strconv" + "strings" + + "github.com/icza/dyno" + "github.com/strangelove-ventures/interchaintest/v7/ibc" +) + +type GenesisKV struct { + Key string `json:"key"` + Value interface{} `json:"value"` +} + +func ModifyGenesis(genesisKV []GenesisKV) func(ibc.ChainConfig, []byte) ([]byte, error) { + return func(chainConfig ibc.ChainConfig, genbz []byte) ([]byte, error) { + g := make(map[string]interface{}) + if err := json.Unmarshal(genbz, &g); err != nil { + return nil, fmt.Errorf("failed to unmarshal genesis file: %w", err) + } + + for idx, values := range genesisKV { + splitPath := strings.Split(values.Key, ".") + + path := make([]interface{}, len(splitPath)) + for i, component := range splitPath { + if v, err := strconv.Atoi(component); err == nil { + path[i] = v + } else { + path[i] = component + } + } + + if err := dyno.Set(g, values.Value, path...); err != nil { + return nil, fmt.Errorf("failed to set value (index:%d) in genesis json: %w", idx, err) + } + } + + out, err := json.Marshal(g) + if err != nil { + return nil, fmt.Errorf("failed to marshal genesis bytes to json: %w", err) + } + return out, nil + } +} diff --git a/chain/cosmos/poll.go b/chain/cosmos/poll.go index 9bd141ac7..a2caa59e7 100644 --- a/chain/cosmos/poll.go +++ b/chain/cosmos/poll.go @@ -71,8 +71,8 @@ func PollForBalance(ctx context.Context, chain *CosmosChain, deltaBlocks uint64, if err != nil { return nil, err } - if bal != balance.Amount { - return nil, fmt.Errorf("balance (%d) does not match expected: (%d)", bal, balance.Amount) + if !balance.Amount.Equal(bal) { + return nil, fmt.Errorf("balance (%s) does not match expected: (%s)", bal.String(), balance.Amount.String()) } return nil, nil } diff --git a/chain/cosmos/sidecar.go b/chain/cosmos/sidecar.go new file mode 100644 index 000000000..7ae7aaf46 --- /dev/null +++ b/chain/cosmos/sidecar.go @@ -0,0 +1,178 @@ +package cosmos + +import ( + "context" + "fmt" + "os" + + dockerclient "github.com/docker/docker/client" + "github.com/docker/go-connections/nat" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" + "go.uber.org/zap" +) + +type SidecarProcesses []*SidecarProcess + +// SidecarProcess represents a companion process that may be required on a per chain or per validator basis. +type SidecarProcess struct { + log *zap.Logger + + Index int + Chain ibc.Chain + + // If true this process is scoped to a specific validator, otherwise it is scoped at the chain level. + validatorProcess bool + + // If true this process should be started before the chain or validator, otherwise it should be explicitly started after. + preStart bool + + ProcessName string + TestName string + + VolumeName string + DockerClient *dockerclient.Client + NetworkID string + Image ibc.DockerImage + ports nat.PortSet + startCmd []string + homeDir string + + containerLifecycle *dockerutil.ContainerLifecycle +} + +// NewSidecar instantiates a new SidecarProcess. +func NewSidecar( + log *zap.Logger, + validatorProcess bool, + preStart bool, + chain ibc.Chain, + dockerClient *dockerclient.Client, + networkID, processName, testName string, + image ibc.DockerImage, + homeDir string, + index int, + ports []string, + startCmd []string, +) *SidecarProcess { + processPorts := nat.PortSet{} + + for _, port := range ports { + processPorts[nat.Port(port)] = struct{}{} + } + + if homeDir == "" { + homeDir = "/home/sidecar" + } + + s := &SidecarProcess{ + log: log, + Index: index, + Chain: chain, + preStart: preStart, + validatorProcess: validatorProcess, + ProcessName: processName, + TestName: testName, + DockerClient: dockerClient, + NetworkID: networkID, + Image: image, + homeDir: homeDir, + ports: processPorts, + startCmd: startCmd, + } + s.containerLifecycle = dockerutil.NewContainerLifecycle(log, dockerClient, s.Name()) + + return s +} + +// Name returns a string identifier based on if this process is configured to run on a chain level or +// on a per validator level. +func (s *SidecarProcess) Name() string { + if s.validatorProcess { + return fmt.Sprintf("%s-%s-val-%d-%s", s.Chain.Config().ChainID, s.ProcessName, s.Index, dockerutil.SanitizeContainerName(s.TestName)) + } + + return fmt.Sprintf("%s-%s-%d-%s", s.Chain.Config().ChainID, s.ProcessName, s.Index, dockerutil.SanitizeContainerName(s.TestName)) +} + +func (s *SidecarProcess) logger() *zap.Logger { + return s.log.With( + zap.String("process_name", s.ProcessName), + zap.String("test", s.TestName), + ) +} + +func (s *SidecarProcess) CreateContainer(ctx context.Context) error { + return s.containerLifecycle.CreateContainer(ctx, s.TestName, s.NetworkID, s.Image, s.ports, s.Bind(), s.HostName(), s.startCmd) +} + +func (s *SidecarProcess) StartContainer(ctx context.Context) error { + return s.containerLifecycle.StartContainer(ctx) +} + +func (s *SidecarProcess) StopContainer(ctx context.Context) error { + return s.containerLifecycle.StopContainer(ctx) +} + +func (s *SidecarProcess) RemoveContainer(ctx context.Context) error { + return s.containerLifecycle.RemoveContainer(ctx) +} + +// Bind returns the home folder bind point for running the process. +func (s *SidecarProcess) Bind() []string { + return []string{fmt.Sprintf("%s:%s", s.VolumeName, s.HomeDir())} +} + +// HomeDir returns the path name where any configuration files will be written to the Docker filesystem. +func (s *SidecarProcess) HomeDir() string { + return s.homeDir +} + +func (s *SidecarProcess) HostName() string { + return dockerutil.CondenseHostName(s.Name()) +} + +func (s *SidecarProcess) GetHostPorts(ctx context.Context, portIDs ...string) ([]string, error) { + return s.containerLifecycle.GetHostPorts(ctx, portIDs...) +} + +// WriteFile accepts file contents in a byte slice and writes the contents to +// the docker filesystem. relPath describes the location of the file in the +// docker volume relative to the home directory +func (s *SidecarProcess) WriteFile(ctx context.Context, content []byte, relPath string) error { + fw := dockerutil.NewFileWriter(s.logger(), s.DockerClient, s.TestName) + return fw.WriteFile(ctx, s.VolumeName, relPath, content) +} + +// CopyFile adds a file from the host filesystem to the docker filesystem +// relPath describes the location of the file in the docker volume relative to +// the home directory +func (s *SidecarProcess) CopyFile(ctx context.Context, srcPath, dstPath string) error { + content, err := os.ReadFile(srcPath) + if err != nil { + return err + } + return s.WriteFile(ctx, content, dstPath) +} + +// ReadFile reads the contents of a single file at the specified path in the docker filesystem. +// relPath describes the location of the file in the docker volume relative to the home directory. +func (s *SidecarProcess) ReadFile(ctx context.Context, relPath string) ([]byte, error) { + fr := dockerutil.NewFileRetriever(s.logger(), s.DockerClient, s.TestName) + gen, err := fr.SingleFileContent(ctx, s.VolumeName, relPath) + if err != nil { + return nil, fmt.Errorf("failed to read file at %s: %w", relPath, err) + } + return gen, nil +} + +// Exec enables the execution of arbitrary CLI cmds against the process. +func (s *SidecarProcess) Exec(ctx context.Context, cmd []string, env []string) ([]byte, []byte, error) { + job := dockerutil.NewImage(s.logger(), s.DockerClient, s.NetworkID, s.TestName, s.Image.Repository, s.Image.Version) + opts := dockerutil.ContainerOptions{ + Env: env, + Binds: s.Bind(), + } + res := job.Run(ctx, cmd, opts) + return res.Stdout, res.Stderr, res.Err +} diff --git a/chain/cosmos/types.go b/chain/cosmos/types.go index 32f5f5dfb..868b49035 100644 --- a/chain/cosmos/types.go +++ b/chain/cosmos/types.go @@ -1,5 +1,9 @@ package cosmos +import ( + "encoding/json" +) + const ( ProposalVoteYes = "yes" ProposalVoteNo = "no" @@ -14,6 +18,15 @@ const ( ProposalStatusDepositPeriod = "PROPOSAL_STATUS_DEPOSIT_PERIOD" ) +// TxProposalv1 contains chain proposal transaction detail for gov module v1 (sdk v0.46.0+) +type TxProposalv1 struct { + Messages []json.RawMessage `json:"messages"` + Metadata string `json:"metadata"` + Deposit string `json:"deposit"` + Title string `json:"title"` + Summary string `json:"summary"` +} + // TxProposal contains chain proposal transaction details. type TxProposal struct { // The block height. @@ -80,6 +93,12 @@ type ProposalDeposit struct { Amount string `json:"amount"` } +type ParamChange struct { + Subspace string `json:"subspace"` + Key string `json:"key"` + Value any `json:"value"` +} + type DumpContractStateResponse struct { Models []ContractStateModels `json:"models"` } diff --git a/chain/cosmos/wasm/wasm.go b/chain/cosmos/wasm/wasm.go new file mode 100644 index 000000000..94ed88544 --- /dev/null +++ b/chain/cosmos/wasm/wasm.go @@ -0,0 +1,17 @@ +package wasm + +import ( + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + "github.com/cosmos/cosmos-sdk/types/module/testutil" + + // simappparams "github.com/cosmos/cosmos-sdk/simapp/params" + "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" +) + +func WasmEncoding() *testutil.TestEncodingConfig { + cfg := cosmos.DefaultEncoding() + + wasmtypes.RegisterInterfaces(cfg.InterfaceRegistry) + + return &cfg +} diff --git a/chain/penumbra/penumbra_app_node.go b/chain/penumbra/penumbra_app_node.go index 5df73f30b..4d344366a 100644 --- a/chain/penumbra/penumbra_app_node.go +++ b/chain/penumbra/penumbra_app_node.go @@ -33,8 +33,6 @@ type PenumbraAppNode struct { // Set during StartContainer. hostRPCPort string hostGRPCPort string - - preStartListeners dockerutil.Listeners } func NewPenumbraAppNode( diff --git a/chain/penumbra/penumbra_chain.go b/chain/penumbra/penumbra_chain.go index a184f1b37..e5d1cd7e2 100644 --- a/chain/penumbra/penumbra_chain.go +++ b/chain/penumbra/penumbra_chain.go @@ -9,6 +9,7 @@ import ( "strconv" "strings" + "cosmossdk.io/math" "github.com/BurntSushi/toml" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -62,9 +63,9 @@ type PenumbraValidatorFundingStream struct { } type PenumbraGenesisAppStateAllocation struct { - Amount int64 `json:"amount"` - Denom string `json:"denom"` - Address string `json:"address"` + Amount math.Int `json:"amount"` + Denom string `json:"denom"` + Address string `json:"address"` } func NewPenumbraChain(log *zap.Logger, testName string, chainConfig ibc.ChainConfig, numValidators int, numFullNodes int) *PenumbraChain { @@ -239,7 +240,7 @@ func (c *PenumbraChain) Height(ctx context.Context) (uint64, error) { } // Implements Chain interface -func (c *PenumbraChain) GetBalance(ctx context.Context, keyName string, denom string) (int64, error) { +func (c *PenumbraChain) GetBalance(ctx context.Context, keyName string, denom string) (math.Int, error) { fn := c.getFullNode() if len(fn.PenumbraClientNodes) == 0 { return 0, fmt.Errorf("no pclientd nodes on the fullnode for balance check") @@ -268,6 +269,78 @@ func (c *PenumbraChain) GetGasFeesInNativeDenom(gasPaid int64) int64 { return int64(fees) } +// NewChainNode returns a penumbra chain node with tendermint and penumbra nodes +// with docker volumes created. +func (c *PenumbraChain) NewChainNode( + ctx context.Context, + i int, + dockerClient *dockerclient.Client, + networkID string, + testName string, + tendermintImage ibc.DockerImage, + penumbraImage ibc.DockerImage, +) (PenumbraNode, error) { + tn := tendermint.NewTendermintNode(c.log, i, c, dockerClient, networkID, testName, tendermintImage) + + tv, err := dockerClient.VolumeCreate(ctx, volumetypes.CreateOptions{ + Labels: map[string]string{ + dockerutil.CleanupLabel: testName, + + dockerutil.NodeOwnerLabel: tn.Name(), + }, + }) + if err != nil { + return PenumbraNode{}, fmt.Errorf("creating tendermint volume: %w", err) + } + tn.VolumeName = tv.Name + if err := dockerutil.SetVolumeOwner(ctx, dockerutil.VolumeOwnerOptions{ + Log: c.log, + + Client: dockerClient, + + VolumeName: tn.VolumeName, + ImageRef: tn.Image.Ref(), + TestName: tn.TestName, + UidGid: tn.Image.UidGid, + }); err != nil { + return PenumbraNode{}, fmt.Errorf("set tendermint volume owner: %w", err) + } + + pn := &PenumbraAppNode{log: c.log, Index: i, Chain: c, + DockerClient: dockerClient, NetworkID: networkID, TestName: testName, Image: penumbraImage} + + pn.containerLifecycle = dockerutil.NewContainerLifecycle(c.log, dockerClient, pn.Name()) + + pv, err := dockerClient.VolumeCreate(ctx, volumetypes.CreateOptions{ + Labels: map[string]string{ + dockerutil.CleanupLabel: testName, + + dockerutil.NodeOwnerLabel: pn.Name(), + }, + }) + if err != nil { + return PenumbraNode{}, fmt.Errorf("creating penumbra volume: %w", err) + } + pn.VolumeName = pv.Name + if err := dockerutil.SetVolumeOwner(ctx, dockerutil.VolumeOwnerOptions{ + Log: c.log, + + Client: dockerClient, + + VolumeName: pn.VolumeName, + ImageRef: pn.Image.Ref(), + TestName: pn.TestName, + UidGid: tn.Image.UidGid, + }); err != nil { + return PenumbraNode{}, fmt.Errorf("set penumbra volume owner: %w", err) + } + + return PenumbraNode{ + TendermintNode: tn, + PenumbraAppNode: pn, + }, nil +} + // creates the test node objects required for bootstrapping tests func (c *PenumbraChain) initializeChainNodes( ctx context.Context, @@ -389,7 +462,7 @@ func (c *PenumbraChain) Start(testName string, ctx context.Context, additionalGe // self delegation allocations = append(allocations, PenumbraGenesisAppStateAllocation{ - Amount: 100_000_000_000, + Amount: math.NewInt(100_000_000_000), Denom: fmt.Sprintf("udelegation_%s", validatorTemplateDefinition.IdentityKey), Address: fundingStream.Recipient, }, @@ -397,7 +470,7 @@ func (c *PenumbraChain) Start(testName string, ctx context.Context, additionalGe // liquid allocations = append(allocations, PenumbraGenesisAppStateAllocation{ - Amount: 1_000_000_000_000, + Amount: math.NewInt(1_000_000_000_000), Denom: chainCfg.Denom, Address: fundingStream.Recipient, }, diff --git a/chain/polkadot/keys.go b/chain/polkadot/keys.go index 1d1228e20..18489ff4c 100644 --- a/chain/polkadot/keys.go +++ b/chain/polkadot/keys.go @@ -9,7 +9,7 @@ import ( schnorrkel "github.com/ChainSafe/go-schnorrkel/1" "github.com/StirlingMarketingGroup/go-namecase" - p2pCrypto "github.com/libp2p/go-libp2p-core/crypto" + p2pCrypto "github.com/libp2p/go-libp2p/core/crypto" "golang.org/x/crypto/blake2b" ) diff --git a/chain/polkadot/keys_test.go b/chain/polkadot/keys_test.go index 392d714cd..f43b043b3 100644 --- a/chain/polkadot/keys_test.go +++ b/chain/polkadot/keys_test.go @@ -5,9 +5,9 @@ import ( "encoding/hex" "testing" - "github.com/centrifuge/go-substrate-rpc-client/v4/signature" - p2pCrypto "github.com/libp2p/go-libp2p-core/crypto" - "github.com/libp2p/go-libp2p-core/peer" + p2pCrypto "github.com/libp2p/go-libp2p/core/crypto" + "github.com/libp2p/go-libp2p/core/peer" + "github.com/misko9/go-substrate-rpc-client/v4/signature" "github.com/strangelove-ventures/interchaintest/v7/chain/polkadot" "github.com/stretchr/testify/require" ) @@ -22,7 +22,7 @@ func TestNodeKeyPeerID(t *testing.T) { id, err := peer.IDFromPrivateKey(privKey) require.NoError(t, err, "error getting peer id from private key") - peerId := peer.Encode(id) + peerId := id.String() require.Equal(t, "12D3KooWCqDbuUHRNWPAuHpVnzZGCkkMwgEx7Xd6xgszqtVpH56c", peerId) } @@ -36,7 +36,7 @@ func Test_DeriveEd25519FromName(t *testing.T) { pubKeyEncoded, err := polkadot.EncodeAddressSS58(pubKey) require.NoError(t, err, "error encoding ed25519 public key to ss58") - require.Equal(t, "5FA9nQDVg267DEd8m1ZypXLBnvN7SFxYwV7ndqSYGiN9TTpu", pubKeyEncoded) + require.Equal(t, "5wfmbM1KN4DCJeTP6jj9TqCAKKNApYNCG4zhwcweWhXZRo1j", pubKeyEncoded) } func Test_DeriveSr25519FromNameAccount(t *testing.T) { @@ -49,13 +49,12 @@ func Test_DeriveSr25519FromNameAccount(t *testing.T) { pubKeyEncoded, err := polkadot.EncodeAddressSS58(pubKeyAccount) require.NoError(t, err, "error encoding account public key to ss58") - kp, err := signature.KeyringPairFromSecret("//Alice", 42) + kp, err := signature.KeyringPairFromSecret("//Alice", polkadot.Ss58Format) require.NoError(t, err, "error signature KeyringPairFromSecret") pubKeyDecoded, err := polkadot.DecodeAddressSS58(pubKeyEncoded) require.NoError(t, err, "error decoding SS58 address to pub key") - require.Equal(t, "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", pubKeyEncoded) require.Equal(t, pubKeyDecoded, kp.PublicKey) } @@ -70,11 +69,10 @@ func Test_DeriveSr25519FromNameStash(t *testing.T) { pubKeyEncoded, err := polkadot.EncodeAddressSS58(pubKeyStash) require.NoError(t, err, "error encoding stash public key to ss58") - kp, err := signature.KeyringPairFromSecret("//Alice//stash", 42) + kp, err := signature.KeyringPairFromSecret("//Alice//stash", polkadot.Ss58Format) require.NoError(t, err, "error signature KeyringPairFromSecret") - require.Equal(t, "5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY", pubKeyEncoded) - require.Equal(t, "5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY", kp.Address) + require.Equal(t, kp.Address, pubKeyEncoded) } func Test_DeriveSecp256k1FromName(t *testing.T) { @@ -93,5 +91,5 @@ func Test_DeriveSecp256k1FromName(t *testing.T) { pubKeyEncoded, err := polkadot.EncodeAddressSS58(pubKey) require.NoError(t, err, "error encoding secp256k1 public key to ss58") - require.Equal(t, "KW39r9CJjAVzmkf9zQ4YDb2hqfAVGdRqn53eRqyruqpxAP5YL", pubKeyEncoded) + require.Equal(t, "NaqsuM2ZDssHFdr7HU8znFsHKpgkCyrCW6aPiLpLTa8Vxi3Q9", pubKeyEncoded) } diff --git a/chain/polkadot/parachain_node.go b/chain/polkadot/parachain_node.go index a70e29e91..9e15f437a 100644 --- a/chain/polkadot/parachain_node.go +++ b/chain/polkadot/parachain_node.go @@ -8,17 +8,22 @@ import ( "path/filepath" "strings" + "cosmossdk.io/math" "github.com/avast/retry-go/v4" - gsrpc "github.com/centrifuge/go-substrate-rpc-client/v4" + sdktypes "github.com/cosmos/cosmos-sdk/types" "github.com/docker/docker/client" "github.com/icza/dyno" - p2pcrypto "github.com/libp2p/go-libp2p-core/crypto" - "github.com/libp2p/go-libp2p-core/peer" + p2pcrypto "github.com/libp2p/go-libp2p/core/crypto" + "github.com/libp2p/go-libp2p/core/peer" + gsrpc "github.com/misko9/go-substrate-rpc-client/v4" "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" "go.uber.org/zap" ) +// Increase parachain wallet amount due to their additional precision +const parachainScaling = int64(1_000) + // ParachainNode defines the properties required for running a polkadot parachain node. type ParachainNode struct { log *zap.Logger @@ -41,8 +46,6 @@ type ParachainNode struct { api *gsrpc.SubstrateAPI hostWsPort string hostRpcPort string - - preStartListeners dockerutil.Listeners } type ParachainNodes []*ParachainNode @@ -98,7 +101,7 @@ func (pn *ParachainNode) PeerID() (string, error) { if err != nil { return "", err } - return peer.Encode(id), nil + return id.String(), nil } // MultiAddress returns the p2p multiaddr of the node. @@ -149,7 +152,7 @@ func (pn *ParachainNode) GenerateParachainGenesisFile(ctx context.Context, addit for _, wallet := range additionalGenesisWallets { balances = append(balances, - []interface{}{wallet.Address, wallet.Amount}, + []interface{}{wallet.Address, wallet.Amount.MulRaw(parachainScaling)}, ) } if err := dyno.Set(chainSpec, balances, "genesis", "runtime", "balances", "balances"); err != nil { @@ -236,6 +239,13 @@ func (pn *ParachainNode) CreateNodeContainer(ctx context.Context) error { "--unsafe-rpc-external", "--prometheus-external", "--rpc-cors=all", + "--ws-external", + "--rpc-external", + "--rpc-methods=unsafe", + "--log=ibc_transfer=trace,pallet_ibc=trace,grandpa-verifier=trace,runtime=trace", + "--force-authoring", + "--enable-offchain-indexing=true", + "--pruning=archive", fmt.Sprintf("--prometheus-port=%s", strings.Split(prometheusPort, "/")[0]), fmt.Sprintf("--listen-addr=/ip4/0.0.0.0/tcp/%s", strings.Split(nodePort, "/")[0]), fmt.Sprintf("--public-addr=%s", multiAddress), @@ -295,19 +305,18 @@ func (pn *ParachainNode) Exec(ctx context.Context, cmd []string, env []string) d return job.Run(ctx, cmd, opts) } -func (pn *ParachainNode) GetBalance(ctx context.Context, address string, denom string) (int64, error) { +func (pn *ParachainNode) GetBalance(ctx context.Context, address string, denom string) (math.Int, error) { return GetBalance(pn.api, address) } // GetIbcBalance returns the Coins type of ibc coins in account -// [Add back when we move from centrifuge -> ComposableFi's go-substrate-rpc-client (for ibc methods)] -/*func (pn *ParachainNode) GetIbcBalance(ctx context.Context, address []byte) (sdktypes.Coins, error) { - res, err := pn.api.RPC.IBC.QueryBalanceWithAddress(ctx, address) +func (pn *ParachainNode) GetIbcBalance(ctx context.Context, address string, denom uint64) (sdktypes.Coin, error) { + res, err := pn.api.RPC.IBC.QueryBalanceWithAddress(ctx, address, denom) if err != nil { - return nil, err + return sdktypes.Coin{}, err } return res, nil -}*/ +} // SendFunds sends funds to a wallet from a user account. // Implements Chain interface. @@ -316,7 +325,12 @@ func (pn *ParachainNode) SendFunds(ctx context.Context, keyName string, amount i if err != nil { return err } - + pn.log.Info( + "ParachainNode SendFunds", + zap.String("From", kp.Address), + zap.String("To", amount.Address), + zap.String("Amount", amount.Amount.String()), + ) hash, err := SendFundsTx(pn.api, kp, amount) if err != nil { return err @@ -325,3 +339,58 @@ func (pn *ParachainNode) SendFunds(ctx context.Context, keyName string, amount i pn.log.Info("Transfer sent", zap.String("hash", fmt.Sprintf("%#x", hash)), zap.String("container", pn.Name())) return nil } + +// SendIbcFunds sends funds to a wallet from a user account. +func (pn *ParachainNode) SendIbcFunds( + ctx context.Context, + channelID string, + keyName string, + amount ibc.WalletAmount, + options ibc.TransferOptions, +) error { + kp, err := pn.Chain.(*PolkadotChain).GetKeyringPair(keyName) + if err != nil { + return err + } + + pn.log.Info( + "ParachainNode SendIbcFunds", + zap.String("From", kp.Address), + zap.String("To", amount.Address), + zap.String("Amount", amount.Amount.String()), + ) + hash, err := SendIbcFundsTx(pn.api, kp, channelID, amount, options) + if err != nil { + pn.log.Info("IBC Transfer not sent", zap.String("hash", fmt.Sprintf("%#x", hash)), zap.String("container", pn.Name())) + return err + } + + pn.log.Info("IBC Transfer sent", zap.String("hash", fmt.Sprintf("%#x", hash)), zap.String("container", pn.Name())) + return nil +} + +// MintFunds mints an asset for a user on parachain, keyName must be the owner of the asset +func (pn *ParachainNode) MintFunds( + keyName string, + amount ibc.WalletAmount, +) error { + kp, err := pn.Chain.(*PolkadotChain).GetKeyringPair(keyName) + if err != nil { + return err + } + + pn.log.Info( + "ParachainNode MintFunds", + zap.String("From", kp.Address), + zap.String("To", amount.Address), + zap.String("Amount", amount.Amount.String()), + ) + hash, err := MintFundsTx(pn.api, kp, amount) + if err != nil { + pn.log.Info("MintFunds not sent", zap.String("hash", fmt.Sprintf("%#x", hash)), zap.String("container", pn.Name())) + return err + } + + pn.log.Info("MintFunds sent", zap.String("hash", fmt.Sprintf("%#x", hash)), zap.String("container", pn.Name())) + return nil +} diff --git a/chain/polkadot/polkadot_chain.go b/chain/polkadot/polkadot_chain.go index 2239ec98d..826c00235 100644 --- a/chain/polkadot/polkadot_chain.go +++ b/chain/polkadot/polkadot_chain.go @@ -9,23 +9,29 @@ import ( "io" "strings" + "cosmossdk.io/math" "github.com/99designs/keyring" "github.com/StirlingMarketingGroup/go-namecase" - "github.com/centrifuge/go-substrate-rpc-client/v4/signature" - gstypes "github.com/centrifuge/go-substrate-rpc-client/v4/types" + sdktypes "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/go-bip39" "github.com/docker/docker/api/types" volumetypes "github.com/docker/docker/api/types/volume" "github.com/docker/docker/client" dockerclient "github.com/docker/docker/client" "github.com/icza/dyno" - p2pcrypto "github.com/libp2p/go-libp2p-core/crypto" + p2pcrypto "github.com/libp2p/go-libp2p/core/crypto" + "github.com/misko9/go-substrate-rpc-client/v4/signature" + gstypes "github.com/misko9/go-substrate-rpc-client/v4/types" "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v7/internal/blockdb" "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" "go.uber.org/zap" "golang.org/x/sync/errgroup" ) +// Increase polkadot wallet amount due to their additional precision +const polkadotScaling = int64(1_000) + // PolkadotChain implements the ibc.Chain interface for substrate chains. type PolkadotChain struct { log *zap.Logger @@ -150,7 +156,7 @@ func (c *PolkadotChain) NewRelayChainNode( pn.containerLifecycle = dockerutil.NewContainerLifecycle(c.log, dockerClient, pn.Name()) - v, err := dockerClient.VolumeCreate(ctx, volumetypes.VolumeCreateBody{ + v, err := dockerClient.VolumeCreate(ctx, volumetypes.CreateOptions{ Labels: map[string]string{ dockerutil.CleanupLabel: testName, @@ -205,7 +211,7 @@ func (c *PolkadotChain) NewParachainNode( pn.containerLifecycle = dockerutil.NewContainerLifecycle(c.log, dockerClient, pn.Name()) - v, err := dockerClient.VolumeCreate(ctx, volumetypes.VolumeCreateBody{ + v, err := dockerClient.VolumeCreate(ctx, volumetypes.CreateOptions{ Labels: map[string]string{ dockerutil.CleanupLabel: testName, @@ -335,7 +341,7 @@ func (c *PolkadotChain) modifyRelayChainGenesis(ctx context.Context, chainSpec i } for _, wallet := range additionalGenesisWallets { balances = append(balances, - []interface{}{wallet.Address, wallet.Amount}, + []interface{}{wallet.Address, wallet.Amount.MulRaw(polkadotScaling)}, ) } @@ -395,7 +401,7 @@ func (c *PolkadotChain) modifyRelayChainGenesis(ctx context.Context, chainSpec i if err := dyno.Set(chainSpec, parachains, runtimeGenesisPath("paras", "paras")...); err != nil { return fmt.Errorf("error setting parachains: %w", err) } - if err := dyno.Set(chainSpec, 10, "genesis", "runtime", "session_length_in_blocks"); err != nil { + if err := dyno.Set(chainSpec, 20, "genesis", "runtime", "session_length_in_blocks"); err != nil { return fmt.Errorf("error setting session_length_in_blocks: %w", err) } return nil @@ -633,7 +639,7 @@ func (c *PolkadotChain) CreateKey(ctx context.Context, keyName string) error { return err } - kp, err := signature.KeyringPairFromSecret(mnemonic, ss58Format) + kp, err := signature.KeyringPairFromSecret(mnemonic, Ss58Format) if err != nil { return fmt.Errorf("failed to create keypair: %w", err) } @@ -658,7 +664,7 @@ func (c *PolkadotChain) RecoverKey(ctx context.Context, keyName, mnemonic string return fmt.Errorf("Key already exists: %s", keyName) } - kp, err := signature.KeyringPairFromSecret(mnemonic, ss58Format) + kp, err := signature.KeyringPairFromSecret(mnemonic, Ss58Format) if err != nil { return fmt.Errorf("failed to create keypair: %w", err) } @@ -675,7 +681,7 @@ func (c *PolkadotChain) RecoverKey(ctx context.Context, keyName, mnemonic string return err } -// GetAddress fetches the bech32 address for a test key on the "user" node (either the first fullnode or the first validator if no fullnodes). +// GetAddress fetches the address for a test key on the "user" node (either the first fullnode or the first validator if no fullnodes). // Implements Chain interface. func (c *PolkadotChain) GetAddress(ctx context.Context, keyName string) ([]byte, error) { krItem, err := c.keyring.Get(keyName) @@ -768,12 +774,12 @@ func (c *PolkadotChain) SendIBCTransfer( amount ibc.WalletAmount, options ibc.TransferOptions, ) (ibc.Tx, error) { - panic("[SendIBCTransfer] not implemented yet") + return ibc.Tx{}, c.ParachainNodes[0][0].SendIbcFunds(ctx, channelID, keyName, amount, options) } // GetBalance fetches the current balance for a specific account address and denom. // Implements Chain interface. -func (c *PolkadotChain) GetBalance(ctx context.Context, address string, denom string) (int64, error) { +func (c *PolkadotChain) GetBalance(ctx context.Context, address string, denom string) (math.Int, error) { // If denom == polkadot denom, it is a relay chain query, else parachain query if denom == c.cfg.Denom { return c.RelayChainNodes[0].GetBalance(ctx, address, denom) @@ -829,3 +835,18 @@ func (c *PolkadotChain) GetKeyringPair(keyName string) (signature.KeyringPair, e return kp, nil } + +// FindTxs implements blockdb.BlockSaver (Not implemented yet for polkadot, but we don't want to exit) +func (c *PolkadotChain) FindTxs(ctx context.Context, height uint64) ([]blockdb.Tx, error) { + return []blockdb.Tx{}, nil +} + +// GetIbcBalance returns the Coins type of ibc coins in account +func (c *PolkadotChain) GetIbcBalance(ctx context.Context, address string, denom uint64) (sdktypes.Coin, error) { + return c.ParachainNodes[0][0].GetIbcBalance(ctx, address, denom) +} + +// MintFunds mints an asset for a user on parachain, keyName must be the owner of the asset +func (c *PolkadotChain) MintFunds(keyName string, amount ibc.WalletAmount) error { + return c.ParachainNodes[0][0].MintFunds(keyName, amount) +} diff --git a/chain/polkadot/query.go b/chain/polkadot/query.go index 56eea38ce..8b0ca27db 100644 --- a/chain/polkadot/query.go +++ b/chain/polkadot/query.go @@ -1,33 +1,34 @@ package polkadot import ( - gsrpc "github.com/centrifuge/go-substrate-rpc-client/v4" - gstypes "github.com/centrifuge/go-substrate-rpc-client/v4/types" + "cosmossdk.io/math" + gsrpc "github.com/misko9/go-substrate-rpc-client/v4" + gstypes "github.com/misko9/go-substrate-rpc-client/v4/types" ) // GetBalance fetches the current balance for a specific account address using the SubstrateAPI -func GetBalance(api *gsrpc.SubstrateAPI, address string) (int64, error) { +func GetBalance(api *gsrpc.SubstrateAPI, address string) (math.Int, error) { meta, err := api.RPC.State.GetMetadataLatest() if err != nil { - return -1, err + return math.Int{}, err } pubKey, err := DecodeAddressSS58(address) if err != nil { - return -2, err + return math.Int{}, err } key, err := gstypes.CreateStorageKey(meta, "System", "Account", pubKey, nil) if err != nil { - return -3, err + return math.Int{}, err } var accountInfo AccountInfo ok, err := api.RPC.State.GetStorageLatest(key, &accountInfo) if err != nil { - return -4, err + return math.Int{}, err } if !ok { - return -5, nil + return math.Int{}, nil } - return accountInfo.Data.Free.Int64(), nil + return math.NewIntFromBigInt(accountInfo.Data.Free.Int), nil } diff --git a/chain/polkadot/relay_chain_node.go b/chain/polkadot/relay_chain_node.go index 3c8299a8b..fa03e6fe2 100644 --- a/chain/polkadot/relay_chain_node.go +++ b/chain/polkadot/relay_chain_node.go @@ -8,13 +8,14 @@ import ( "strings" "time" + "cosmossdk.io/math" "github.com/avast/retry-go/v4" - gsrpc "github.com/centrifuge/go-substrate-rpc-client/v4" "github.com/docker/docker/client" "github.com/docker/go-connections/nat" + gsrpc "github.com/misko9/go-substrate-rpc-client/v4" - p2pCrypto "github.com/libp2p/go-libp2p-core/crypto" - "github.com/libp2p/go-libp2p-core/peer" + p2pCrypto "github.com/libp2p/go-libp2p/core/crypto" + "github.com/libp2p/go-libp2p/core/peer" "go.uber.org/zap" "github.com/decred/dcrd/dcrec/secp256k1/v2" @@ -44,8 +45,6 @@ type RelayChainNode struct { api *gsrpc.SubstrateAPI hostWsPort string hostRpcPort string - - preStartListeners dockerutil.Listeners } type RelayChainNodes []*RelayChainNode @@ -98,7 +97,7 @@ func (p *RelayChainNode) PeerID() (string, error) { if err != nil { return "", err } - return peer.Encode(id), nil + return id.String(), nil } // GrandpaAddress returns the ss58 encoded grandpa (consensus) address. @@ -217,6 +216,9 @@ func (p *RelayChainNode) CreateNodeContainer(ctx context.Context) error { "--unsafe-ws-external", "--unsafe-rpc-external", "--prometheus-external", + "--enable-offchain-indexing=true", + "--rpc-methods=unsafe", + "--pruning=archive", fmt.Sprintf("--prometheus-port=%s", strings.Split(prometheusPort, "/")[0]), fmt.Sprintf("--listen-addr=/ip4/0.0.0.0/tcp/%s", strings.Split(nodePort, "/")[0]), fmt.Sprintf("--public-addr=%s", multiAddress), @@ -293,6 +295,6 @@ func (p *RelayChainNode) SendFunds(ctx context.Context, keyName string, amount i // GetBalance fetches the current balance for a specific account address and denom. // Implements Chain interface. -func (p *RelayChainNode) GetBalance(ctx context.Context, address string, denom string) (int64, error) { +func (p *RelayChainNode) GetBalance(ctx context.Context, address string, denom string) (math.Int, error) { return GetBalance(p.api, address) } diff --git a/chain/polkadot/ss58.go b/chain/polkadot/ss58.go index 89be9cd29..0abcb3e87 100644 --- a/chain/polkadot/ss58.go +++ b/chain/polkadot/ss58.go @@ -9,12 +9,12 @@ import ( ) const ( - ss58Format = 42 + Ss58Format = 49 ss58Prefix = "SS58PRE" ) func EncodeAddressSS58(key []byte) (string, error) { - input := []byte{ss58Format} + input := []byte{Ss58Format} input = append(input, key...) checksum, err := ss58Checksum(input) @@ -36,7 +36,7 @@ func EncodeAddressSS58(key []byte) (string, error) { func DecodeAddressSS58(address string) ([]byte, error) { checksumPrefix := []byte(ss58Prefix) ss58AddrDecoded, err := base58.Decode(address) - if len(ss58AddrDecoded) == 0 || ss58AddrDecoded[0] != byte(ss58Format) || err != nil { + if len(ss58AddrDecoded) == 0 || ss58AddrDecoded[0] != byte(Ss58Format) || err != nil { return nil, err } var checksumLength int diff --git a/chain/polkadot/tx.go b/chain/polkadot/tx.go index a0541b919..38895dcaf 100644 --- a/chain/polkadot/tx.go +++ b/chain/polkadot/tx.go @@ -2,10 +2,12 @@ package polkadot import ( "encoding/hex" + "math/big" + "strconv" - gsrpc "github.com/centrifuge/go-substrate-rpc-client/v4" - "github.com/centrifuge/go-substrate-rpc-client/v4/signature" - gstypes "github.com/centrifuge/go-substrate-rpc-client/v4/types" + gsrpc "github.com/misko9/go-substrate-rpc-client/v4" + "github.com/misko9/go-substrate-rpc-client/v4/signature" + gstypes "github.com/misko9/go-substrate-rpc-client/v4/types" "github.com/strangelove-ventures/interchaintest/v7/ibc" ) @@ -27,12 +29,119 @@ func SendFundsTx(api *gsrpc.SubstrateAPI, senderKeypair signature.KeyringPair, a return hash, err } - call, err := gstypes.NewCall(meta, "Balances.transfer", receiver, gstypes.NewUCompactFromUInt(uint64(amount.Amount))) + call, err := gstypes.NewCall(meta, "Balances.transfer", receiver, gstypes.NewUCompact(amount.Amount.BigInt())) if err != nil { return hash, err } - // Create the extrinsic + return CreateSignSubmitExt(api, meta, senderKeypair, call) +} + +// Turns on sending and receiving ibc transfers +func EnableIbc(api *gsrpc.SubstrateAPI, senderKeypair signature.KeyringPair) (gstypes.Hash, error) { + hash := gstypes.Hash{} + meta, err := api.RPC.State.GetMetadataLatest() + if err != nil { + return hash, err + } + + c, err := gstypes.NewCall(meta, "Ibc.set_params", gstypes.NewBool(true), gstypes.NewBool(true)) + if err != nil { + return hash, err + } + + sc, err := gstypes.NewCall(meta, "Sudo.sudo", c) + if err != nil { + return hash, err + } + + return CreateSignSubmitExt(api, meta, senderKeypair, sc) +} + +// SendIbcFundsTx sends funds to a wallet using the SubstrateAPI +func SendIbcFundsTx( + api *gsrpc.SubstrateAPI, + senderKeypair signature.KeyringPair, + channelID string, + amount ibc.WalletAmount, + options ibc.TransferOptions, +) (gstypes.Hash, error) { + hash := gstypes.Hash{} + meta, err := api.RPC.State.GetMetadataLatest() + if err != nil { + return hash, err + } + + assetNum, err := strconv.ParseInt(amount.Denom, 10, 64) + if err != nil { + return hash, err + } + + raw := gstypes.NewU8(1) + size := gstypes.NewU8(uint8(len(amount.Address) * 4)) + to := gstypes.NewStorageDataRaw([]byte(amount.Address)) + channel := gstypes.NewU64(0) // Parse channel number from string + timeout := gstypes.NewU8(1) + timestamp := gstypes.NewOptionU64(gstypes.NewU64(0)) + height := gstypes.NewOptionU64(gstypes.NewU64(3000)) // Must set timestamp or height + assetId := gstypes.NewU128(*big.NewInt(assetNum)) + amount2 := gstypes.NewU128(*amount.Amount.BigInt()) + memo := gstypes.NewU8(0) + + call, err := gstypes.NewCall(meta, "Ibc.transfer", raw, size, to, channel, timeout, timestamp, height, assetId, amount2, memo) + if err != nil { + return hash, err + } + + return CreateSignSubmitExt(api, meta, senderKeypair, call) +} + +// MintFunds mints an asset for a user on parachain, keyName must be the owner of the asset +func MintFundsTx( + api *gsrpc.SubstrateAPI, + senderKeypair signature.KeyringPair, + amount ibc.WalletAmount, +) (gstypes.Hash, error) { + hash := gstypes.Hash{} + meta, err := api.RPC.State.GetMetadataLatest() + if err != nil { + return hash, err + } + + assetNum, err := strconv.ParseInt(amount.Denom, 10, 64) + if err != nil { + return hash, err + } + + receiverPubKey, err := DecodeAddressSS58(amount.Address) + if err != nil { + return hash, err + } + + receiver, err := gstypes.NewMultiAddressFromHexAccountID(hex.EncodeToString(receiverPubKey)) + if err != nil { + return hash, err + } + + assetId := gstypes.NewU128(*big.NewInt(assetNum)) + amount2 := gstypes.NewUCompact(amount.Amount.BigInt()) + + call, err := gstypes.NewCall(meta, "Assets.mint", assetId, receiver, amount2) + if err != nil { + return hash, err + } + + return CreateSignSubmitExt(api, meta, senderKeypair, call) +} + +// Common tx function to create an extrinsic and sign/submit it +func CreateSignSubmitExt( + api *gsrpc.SubstrateAPI, + meta *gstypes.Metadata, + senderKeypair signature.KeyringPair, + call gstypes.Call, +) (gstypes.Hash, error) { + hash := gstypes.Hash{} ext := gstypes.NewExtrinsic(call) genesisHash, err := api.RPC.Chain.GetBlockHash(0) if err != nil { diff --git a/chainfactory.go b/chainfactory.go index 2f8fccacd..6a9a46adc 100644 --- a/chainfactory.go +++ b/chainfactory.go @@ -11,7 +11,6 @@ import ( "github.com/strangelove-ventures/interchaintest/v7/chain/penumbra" "github.com/strangelove-ventures/interchaintest/v7/chain/polkadot" "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/label" "go.uber.org/zap" "gopkg.in/yaml.v3" ) @@ -31,11 +30,6 @@ type ChainFactory interface { // Depending on how the factory was configured, // this may report more than two chains. Name() string - - // Labels are reported to allow simple filtering of tests depending on these Chains. - // While the Name should be fully descriptive, - // the Labels are intended to be short and fixed. - Labels() []label.Chain } // BuiltinChainFactory implements ChainFactory to return a fixed set of chains. @@ -180,17 +174,3 @@ func (f *BuiltinChainFactory) Name() string { } return strings.Join(parts, "+") } - -func (f *BuiltinChainFactory) Labels() []label.Chain { - labels := make([]label.Chain, len(f.specs)) - for i, s := range f.specs { - label := label.Chain(s.Name) - if !label.IsKnown() { - // The label must be known (i.e. registered), - // otherwise filtering from the command line will be broken. - panic(fmt.Errorf("chain name %s is not a known label", s.Name)) - } - labels[i] = label - } - return labels -} diff --git a/chainspec.go b/chainspec.go index d40beb214..61eef88a5 100644 --- a/chainspec.go +++ b/chainspec.go @@ -9,7 +9,6 @@ import ( "sync/atomic" "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/label" "go.uber.org/zap" ) @@ -94,10 +93,6 @@ func (s *ChainSpec) Config(log *zap.Logger) (*ibc.ChainConfig, error) { return nil, fmt.Errorf("no chain configuration for %s (available chains are: %s)", s.Name, strings.Join(availableChains, ", ")) } - chainLabel := label.Chain(s.Name) - if !chainLabel.IsKnown() { - label.RegisterChainLabel(chainLabel) - } cfg = ibc.ChainConfig{} } @@ -138,9 +133,15 @@ func (s *ChainSpec) applyConfigOverrides(cfg ibc.ChainConfig) (*ibc.ChainConfig, if s.NoHostMount != nil { cfg.NoHostMount = *s.NoHostMount } + if s.SkipGenTx { + cfg.SkipGenTx = true + } if s.ModifyGenesis != nil { cfg.ModifyGenesis = s.ModifyGenesis } + if s.PreGenesis != nil { + cfg.PreGenesis = s.PreGenesis + } cfg.UsingNewGenesisCommand = s.UsingNewGenesisCommand // Set the version depending on the chain type. diff --git a/configuredChains.yaml b/configuredChains.yaml index 3b3c45967..123f1978c 100644 --- a/configuredChains.yaml +++ b/configuredChains.yaml @@ -10,12 +10,168 @@ agoric: denom: urun gas-prices: 0.01urun gas-adjustment: 1.3 + coin-type: 564 trusting-period: 672h images: - repository: ghcr.io/strangelove-ventures/heighliner/agoric uid-gid: 1025:1025 no-host-mount: true +akash: + name: akash + type: cosmos + bin: akash + bech32-prefix: akash + denom: uakt + gas-prices: 0.01uakt + gas-adjustment: 1.3 + trusting-period: 504h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/akash + uid-gid: 1025:1025 + no-host-mount: true + +arkeo: + name: arkeo + type: cosmos + bin: arkeod + bech32-prefix: arkeo + denom: uarkeo + gas-prices: 0.01uarkeo + gas-adjustment: 1.3 + trusting-period: 504h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/arkeo + uid-gid: 1025:1025 + no-host-mount: true + +axelar: + name: axelar + type: cosmos + bin: axelard + bech32-prefix: axelar + denom: uaxl + gas-prices: 0.01uaxl + gas-adjustment: 1.3 + trusting-period: 168h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/axelar + uid-gid: 1025:1025 + no-host-mount: true + +bitcanna: + name: bitcanna + type: cosmos + bin: bcnad + bech32-prefix: bcna + denom: ubcna + gas-prices: 0.01ubcna + gas-adjustment: 1.3 + trusting-period: 336h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/bitcanna + uid-gid: 1025:1025 + no-host-mount: true + +bitsong: + name: bitsong + type: cosmos + bin: bitsongd + bech32-prefix: bitsong + denom: ubtsg + gas-prices: 0.01ubtsg + gas-adjustment: 1.3 + coin-type: 639 + trusting-period: 504h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/bitsong + uid-gid: 1025:1025 + no-host-mount: true + +bostrom: + name: bostrom + type: cosmos + bin: cyber + bech32-prefix: bostrom + denom: boot + gas-prices: 0.01boot + gas-adjustment: 1.3 + trusting-period: 192h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/bostrom + uid-gid: 1025:1025 + no-host-mount: true + +carbon: + name: carbon + type: cosmos + bin: carbond + bech32-prefix: swth + denom: swth + gas-prices: 0.01swth + gas-adjustment: 1.3 + trusting-period: 720h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/carbon + uid-gid: 1025:1025 + no-host-mount: true + +cerberus: + name: cerberus + type: cosmos + bin: cerberusd + bech32-prefix: cerberus + denom: ucrbrus + gas-prices: 0.01ucrbrus + gas-adjustment: 1.3 + trusting-period: 336.667h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/cerberus + uid-gid: 1025:1025 + no-host-mount: true + +cheqd: + name: cheqd + type: cosmos + bin: cheqd-noded + bech32-prefix: cheqd + denom: ncheq + gas-prices: 0.01ncheq + gas-adjustment: 1.3 + trusting-period: 336.111h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/cheqd + uid-gid: 1025:1025 + no-host-mount: true + +chihuahua: + name: chihuahua + type: cosmos + bin: chihuahuad + bech32-prefix: chihuahua + denom: uhuahua + gas-prices: 0.01uhuahua + gas-adjustment: 1.3 + trusting-period: 504h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/chihuahua + uid-gid: 1025:1025 + no-host-mount: true + +comdex: + name: comdex + type: cosmos + bin: chihuahuad + bech32-prefix: comdex + denom: ucmdx + gas-prices: 0.01ucmdx + gas-adjustment: 1.3 + trusting-period: 504h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/comdex + uid-gid: 1025:1025 + no-host-mount: true + composable: name: composable type: polkadot @@ -31,6 +187,151 @@ composable: - repository: ghcr.io/strangelove-ventures/heighliner/composable uid-gid: 1025:1025 +crescent: + name: crescent + type: cosmos + bin: crescentd + bech32-prefix: cre + denom: ucre + gas-prices: 0.01ucre + gas-adjustment: 1.3 + trusting-period: 336h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/crescent + uid-gid: 1025:1025 + no-host-mount: true + +cronos: + name: cronos + type: cosmos + bin: cronosd + bech32-prefix: crc + denom: stake + gas-prices: 0.01stake + gas-adjustment: 1.3 + coin-type: 60 + trusting-period: 672h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/cronos + uid-gid: 1025:1025 + no-host-mount: true + +cryptoorgchain: + name: cryptoorgchain + type: cosmos + bin: chain-maind + bech32-prefix: cro + denom: basecro + gas-prices: 0.01basecro + gas-adjustment: 1.3 + coin-type: 394 + trusting-period: 672h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/cryptoorgchain + uid-gid: 1025:1025 + no-host-mount: true + +decentr: + name: decentr + type: cosmos + bin: decentrd + bech32-prefix: decentr + denom: udec + gas-prices: 0.01udec + gas-adjustment: 1.3 + trusting-period: 504h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/decentr + uid-gid: 1025:1025 + no-host-mount: true + +desmos: + name: desmos + type: cosmos + bin: desmos + bech32-prefix: desmos + denom: udsm + gas-prices: 0.01udsm + gas-adjustment: 1.3 + coin-type: 852 + trusting-period: 336h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/desmos + uid-gid: 1025:1025 + no-host-mount: true + +dig: + name: dig + type: cosmos + bin: digg + bech32-prefix: dig + denom: udig + gas-prices: 0.01udig + gas-adjustment: 1.3 + trusting-period: 336h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/dig + uid-gid: 1025:1025 + no-host-mount: true + +emoney: + name: emoney + type: cosmos + bin: emoney + bech32-prefix: emoney + denom: ungm + gas-prices: 0.01ungm + gas-adjustment: 1.3 + trusting-period: 504h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/emoney + uid-gid: 1025:1025 + no-host-mount: true + +evmos: + name: evmos + type: cosmos + bin: evmosd + bech32-prefix: evmos + denom: aevmos + gas-prices: 0.01aevmos + gas-adjustment: 1.3 + coin-type: 60 + trusting-period: 336h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/evmos + uid-gid: 1025:1025 + no-host-mount: true + +fetchhub: + name: fetchhub + type: cosmos + bin: fetchd + bech32-prefix: fetch + denom: afet + gas-prices: 0.01afet + gas-adjustment: 1.3 + trusting-period: 504h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/fetchhub + uid-gid: 1025:1025 + no-host-mount: true + +firmachain: + name: firmachain + type: cosmos + bin: firmachaind + bech32-prefix: firma + denom: ufct + gas-prices: 0.01ufct + gas-adjustment: 1.3 + coin-type: 7777777 + trusting-period: 504h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/firmachain + uid-gid: 1025:1025 + no-host-mount: true + gaia: name: gaia type: cosmos @@ -45,17 +346,31 @@ gaia: uid-gid: 1025:1025 no-host-mount: false -icad: - name: icad +gravitybridge: + name: gravitybridge type: cosmos - bin: icad + bin: gravity + bech32-prefix: gravity + denom: ugraviton + gas-prices: 0.01ugraviton + gas-adjustment: 1.3 + trusting-period: 504h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/gravitybridge + uid-gid: 1025:1025 + no-host-mount: true + +hyperlane-simd: + name: hyperlane-simd + type: cosmos + bin: simd bech32-prefix: cosmos - denom: photon - gas-prices: 0.0photon + denom: stake + gas-prices: 0.0stake gas-adjustment: 1.2 trusting-period: 504h images: - - repository: ghcr.io/strangelove-ventures/heighliner/icad + - repository: ghcr.io/strangelove-ventures/heighliner/hyperlane-simd uid-gid: 1025:1025 no-host-mount: false @@ -73,6 +388,63 @@ ibc-go-simd: uid-gid: 1025:1025 no-host-mount: false +icad: + name: icad + type: cosmos + bin: icad + bech32-prefix: cosmos + denom: photon + gas-prices: 0.0photon + gas-adjustment: 1.2 + trusting-period: 504h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/icad + uid-gid: 1025:1025 + no-host-mount: false + +impacthub: + name: impacthub + type: cosmos + bin: ixod + bech32-prefix: ixo + denom: uixo + gas-prices: 0.01uixo + gas-adjustment: 1.3 + trusting-period: 504h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/impacthub + uid-gid: 1025:1025 + no-host-mount: true + +injective: + name: injective + type: cosmos + bin: injectived + bech32-prefix: inj + denom: inj + gas-prices: 0.01inj + gas-adjustment: 1.3 + coin-type: 60 + trusting-period: 504h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/injective + uid-gid: 1025:1025 + no-host-mount: true + +irisnet: + name: irisnet + type: cosmos + bin: iris + bech32-prefix: iaa + denom: uiris + gas-prices: 0.01uiris + gas-adjustment: 1.3 + trusting-period: 504h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/irisnet + uid-gid: 1025:1025 + no-host-mount: true + juno: name: juno type: cosmos @@ -87,13 +459,97 @@ juno: uid-gid: 1025:1025 no-host-mount: false +kichain: + name: kichain + type: cosmos + bin: kid + bech32-prefix: ki + denom: uxki + gas-prices: 0.01uxki + gas-adjustment: 1.3 + trusting-period: 672h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/kichain + uid-gid: 1025:1025 + no-host-mount: false + +konstellation: + name: konstellation + type: cosmos + bin: knstld + bech32-prefix: darc + denom: udarc + gas-prices: 0.01udarc + gas-adjustment: 1.3 + trusting-period: 672h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/konstellation + uid-gid: 1025:1025 + no-host-mount: false + +kujira: + name: kujira + type: cosmos + bin: kujirad + bech32-prefix: kujira + denom: ukuji + gas-prices: 0.01ukuji + gas-adjustment: 1.3 + trusting-period: 336h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/kujira + uid-gid: 1025:1025 + no-host-mount: false + +likecoin: + name: likecoin + type: cosmos + bin: liked + bech32-prefix: like + denom: nanolike + gas-prices: 0.01nanolike + gas-adjustment: 1.3 + trusting-period: 504h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/likecoin + uid-gid: 1025:1025 + no-host-mount: false + +lumnetwork: + name: lumnetwork + type: cosmos + bin: lumd + bech32-prefix: lum + denom: ulum + gas-prices: 0.01ulum + gas-adjustment: 1.3 + trusting-period: 504h + images: + - repository: ghcr.io/strangelove-ventures/heighliner/lum + uid-gid: 1025:1025 + no-host-mount: false + +omniflixhub: + name: omniflixhub + type: cosmos + bin: omniflixhubd + bech32-prefix: omniflix + denom: uflix + gas-prices: 0.01uflix + gas-adjustment: 1.3 + trusting-period: "504h" + images: + - repository: ghcr.io/strangelove-ventures/heighliner/omniflix + uid-gid: 1025:1025 + no-host-mount: false + osmosis: name: osmosis type: cosmos bin: osmosisd bech32-prefix: osmo denom: uosmo - gas-prices: 0.0uosmo + gas-prices: 0.0025uosmo gas-adjustment: 1.3 trusting-period: 336h images: @@ -101,6 +557,21 @@ osmosis: uid-gid: 1025:1025 no-host-mount: false +panacea: + name: panacea + type: cosmos + bin: panacead + bech32-prefix: panacea + denom: umed + gas-prices: 0.01umed + gas-adjustment: 1.3 + coin-type: 371 + trusting-period: "504h" + images: + - repository: ghcr.io/strangelove-ventures/heighliner/panacea + uid-gid: 1025:1025 + no-host-mount: false + penumbra: name: penumbra type: penumbra @@ -114,4 +585,234 @@ penumbra: - repository: ghcr.io/strangelove-ventures/heighliner/tendermint uid-gid: 1025:1025 - repository: ghcr.io/strangelove-ventures/heighliner/penumbra - uid-gid: 1025:1025 \ No newline at end of file + uid-gid: 1025:1025 + +persistence: + name: persistence + type: cosmos + bin: persistenceCore + bech32-prefix: persistence + denom: uxprt + gas-prices: 0.01uxprt + gas-adjustment: 1.3 + coin-type: 750 + trusting-period: "504h" + images: + - repository: ghcr.io/strangelove-ventures/heighliner/persistence + uid-gid: 1025:1025 + no-host-mount: false + +provenance: + name: provenance + type: cosmos + bin: provenanced + bech32-prefix: pb + denom: nhash + gas-prices: 0.01nhash + gas-adjustment: 1.3 + coin-type: 505 + trusting-period: "504h" + images: + - repository: ghcr.io/strangelove-ventures/heighliner/provenance + uid-gid: 1025:1025 + no-host-mount: false + +regen: + name: regen + type: cosmos + bin: regen + bech32-prefix: regen + denom: uregen + gas-prices: 0.01uregen + gas-adjustment: 1.3 + trusting-period: "504h" + images: + - repository: ghcr.io/strangelove-ventures/heighliner/regen + uid-gid: 1025:1025 + no-host-mount: false + +rizon: + name: rizon + type: cosmos + bin: rizond + bech32-prefix: rizon + denom: uatolo + gas-prices: 0.01uatolo + gas-adjustment: 1.3 + trusting-period: "504h" + images: + - repository: ghcr.io/strangelove-ventures/heighliner/rizon + uid-gid: 1025:1025 + no-host-mount: false + +secretnetwork: + name: secretnetwork + type: cosmos + bin: secret-network-node + bech32-prefix: secret + denom: uscrt + gas-prices: 0.01uscrt + gas-adjustment: 1.3 + coin-type: 529 + trusting-period: "504h" + images: + - repository: ghcr.io/strangelove-ventures/heighliner/secretnetwork + uid-gid: 1025:1025 + no-host-mount: false + +sentinel: + name: sentinel + type: cosmos + bin: sentinelhub + bech32-prefix: sent + denom: udvpn + gas-prices: 0.01udvpn + gas-adjustment: 1.3 + trusting-period: "672h" + images: + - repository: ghcr.io/strangelove-ventures/heighliner/sentinel + uid-gid: 1025:1025 + no-host-mount: false + +shentu: + name: shentu + type: cosmos + bin: certik + bech32-prefix: certik + denom: uctk + gas-prices: 0.01uctk + gas-adjustment: 1.3 + trusting-period: "504h" + images: + - repository: ghcr.io/strangelove-ventures/heighliner/shentu + uid-gid: 1025:1025 + no-host-mount: false + +sifchain: + name: sifchain + type: cosmos + bin: sifnoded + bech32-prefix: sif + denom: rowan + gas-prices: 0.01rowan + gas-adjustment: 1.3 + trusting-period: "504h" + images: + - repository: ghcr.io/strangelove-ventures/heighliner/sifchain + uid-gid: 1025:1025 + no-host-mount: false + +sommelier: + name: sommelier + type: cosmos + bin: sommelier + bech32-prefix: somm + denom: usomm + gas-prices: 0.01usomm + gas-adjustment: 1.3 + trusting-period: "672h" + images: + - repository: ghcr.io/strangelove-ventures/heighliner/sommelier + uid-gid: 1025:1025 + no-host-mount: false + +stargaze: + name: stargaze + type: cosmos + bin: starsd + bech32-prefix: stars + denom: ustars + gas-prices: 0.01ustars + gas-adjustment: 1.3 + trusting-period: "336h" + images: + - repository: ghcr.io/strangelove-ventures/heighliner/stargaze + uid-gid: 1025:1025 + no-host-mount: false + +starname: + name: starname + type: cosmos + bin: starnamed + bech32-prefix: star + denom: uiov + gas-prices: 0.01uiov + gas-adjustment: 1.3 + coin-type: 234 + trusting-period: "504h" + images: + - repository: ghcr.io/strangelove-ventures/heighliner/starname + uid-gid: 1025:1025 + no-host-mount: false + +stride: + name: stride + type: cosmos + bin: strided + bech32-prefix: stride + denom: ustrd + gas-prices: 0.01ustrd + gas-adjustment: 1.3 + trusting-period: "336h" + images: + - repository: ghcr.io/strangelove-ventures/heighliner/stride + uid-gid: 1025:1025 + no-host-mount: false + +terpnetwork: + name: terpnetwork + type: cosmos + bin: terpd + bech32-prefix: terp + denom: uterp + gas-prices: 0.01uterp + gas-adjustment: 1.3 + trusting-period: "504h" + images: + - repository: ghcr.io/strangelove-ventures/heighliner/terpnetwork + uid-gid: 1025:1025 + no-host-mount: false + +terra: + name: terra + type: cosmos + bin: terrad + bech32-prefix: terra + denom: uluna + gas-prices: 0.01uluna + gas-adjustment: 1.3 + coin-type: 330 + trusting-period: "336h" + images: + - repository: ghcr.io/strangelove-ventures/heighliner/terra + uid-gid: 1025:1025 + no-host-mount: false + +umee: + name: umee + type: cosmos + bin: umeed + bech32-prefix: umee + denom: uumee + gas-prices: 0.01uumee + gas-adjustment: 1.3 + trusting-period: "336h" + images: + - repository: ghcr.io/strangelove-ventures/heighliner/umee + uid-gid: 1025:1025 + no-host-mount: false + +vidulum: + name: vidulum + type: cosmos + bin: vidulumd + bech32-prefix: vdl + denom: uvdl + gas-prices: 0.01uvdl + gas-adjustment: 1.3 + coin-type: 370 + trusting-period: "504h" + images: + - repository: ghcr.io/strangelove-ventures/heighliner/vidulum + uid-gid: 1025:1025 + no-host-mount: false diff --git a/conformance/flush.go b/conformance/flush.go index b03f6eb4f..556442aa2 100644 --- a/conformance/flush.go +++ b/conformance/flush.go @@ -5,8 +5,9 @@ import ( "fmt" "testing" + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/types" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/strangelove-ventures/interchaintest/v7/relayer" "github.com/strangelove-ventures/interchaintest/v7/testreporter" @@ -77,7 +78,7 @@ func TestRelayerFlushing(t *testing.T, ctx context.Context, cf interchaintest.Ch tx, err := c0.SendIBCTransfer(ctx, c0ChannelID, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ Address: c1FaucetAddr, Denom: c0.Config().Denom, - Amount: txAmount, + Amount: math.NewInt(txAmount), }, ibc.TransferOptions{}) req.NoError(err) req.NoError(tx.Validate()) diff --git a/conformance/relayersetup.go b/conformance/relayersetup.go index 75d0427fb..68619d6a2 100644 --- a/conformance/relayersetup.go +++ b/conformance/relayersetup.go @@ -5,14 +5,13 @@ import ( "fmt" "testing" + conntypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" interchaintest "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/strangelove-ventures/interchaintest/v7/testreporter" "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/require" "golang.org/x/sync/errgroup" - - conntypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" ) // TestRelayerSetup contains a series of subtests that configure a relayer step-by-step. diff --git a/conformance/test.go b/conformance/test.go index a9d470396..bf8b1f668 100644 --- a/conformance/test.go +++ b/conformance/test.go @@ -35,19 +35,18 @@ import ( "testing" "time" + "cosmossdk.io/math" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" "github.com/docker/docker/client" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" - "github.com/strangelove-ventures/interchaintest/v7/label" "github.com/strangelove-ventures/interchaintest/v7/relayer" "github.com/strangelove-ventures/interchaintest/v7/testreporter" "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/require" "golang.org/x/sync/errgroup" - - transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" ) const ( @@ -78,9 +77,6 @@ type RelayerTestCaseConfig struct { PreRelayerStart func(context.Context, *testing.T, *RelayerTestCase, ibc.Chain, ibc.Chain, []ibc.ChannelOutput) // test after chains and relayers are started Test func(context.Context, *testing.T, *RelayerTestCase, *testreporter.Reporter, ibc.Chain, ibc.Chain, []ibc.ChannelOutput) - - // Test-specific labels. - TestLabels []label.Test } var relayerTestCaseConfigs = [...]RelayerTestCaseConfig{ @@ -93,21 +89,18 @@ var relayerTestCaseConfigs = [...]RelayerTestCaseConfig{ Name: "no timeout", PreRelayerStart: preRelayerStart_NoTimeout, Test: testPacketRelaySuccess, - TestLabels: []label.Test{label.Timeout}, }, { Name: "height timeout", RequiredRelayerCapabilities: []relayer.Capability{relayer.HeightTimeout}, PreRelayerStart: preRelayerStart_HeightTimeout, Test: testPacketRelayFail, - TestLabels: []label.Test{label.Timeout, label.HeightTimeout}, }, { Name: "timestamp timeout", RequiredRelayerCapabilities: []relayer.Capability{relayer.TimestampTimeout}, PreRelayerStart: preRelayerStart_TimestampTimeout, Test: testPacketRelayFail, - TestLabels: []label.Test{label.Timeout, label.TimestampTimeout}, }, } @@ -153,12 +146,12 @@ func sendIBCTransfersFromBothChainsWithTimeout( testCoinSrcToDst := ibc.WalletAmount{ Address: srcUser.(*cosmos.CosmosWallet).FormattedAddressWithPrefix(dstChainCfg.Bech32Prefix), Denom: srcChainCfg.Denom, - Amount: testCoinAmount, + Amount: math.NewInt(testCoinAmount), } testCoinDstToSrc := ibc.WalletAmount{ Address: dstUser.(*cosmos.CosmosWallet).FormattedAddressWithPrefix(srcChainCfg.Bech32Prefix), Denom: dstChainCfg.Denom, - Amount: testCoinAmount, + Amount: math.NewInt(testCoinAmount), } var eg errgroup.Group @@ -241,7 +234,7 @@ func Test(t *testing.T, ctx context.Context, cfs []interchaintest.ChainFactory, t.Run(rf.Name(), func(t *testing.T) { // Record the labels for this nested test. - rep.TrackParameters(t, rf.Labels(), cf.Labels()) + rep.TrackTest(t) rep.TrackParallel(t) t.Run("relayer setup", func(t *testing.T) { @@ -355,7 +348,7 @@ func TestChainPair( for _, testCase := range testCases { testCase := testCase t.Run(testCase.Config.Name, func(t *testing.T) { - rep.TrackTest(t, testCase.Config.TestLabels...) + rep.TrackTest(t) requireCapabilities(t, rep, rf, testCase.Config.RequiredRelayerCapabilities...) rep.TrackParallel(t) testCase.Config.Test(ctx, t, testCase, rep, srcChain, dstChain, channels) @@ -413,8 +406,8 @@ func testPacketRelaySuccess( for i, srcTx := range testCase.TxCache.Src { t.Logf("Asserting %s to %s transfer", srcChainCfg.ChainID, dstChainCfg.ChainID) // Assuming these values since the ibc transfers were sent in PreRelayerStart, so balances may have already changed by now - srcInitialBalance := userFaucetFund - dstInitialBalance := int64(0) + srcInitialBalance := math.NewInt(userFaucetFund) + dstInitialBalance := math.ZeroInt() srcAck, err := testutil.PollForAck(ctx, srcChain, srcTx.Height, srcTx.Height+pollHeightMax, srcTx.Packet) req.NoError(err, "failed to get acknowledgement on source chain") @@ -433,8 +426,8 @@ func testPacketRelaySuccess( totalFees := srcChain.GetGasFeesInNativeDenom(srcTx.GasSpent) expectedDifference := testCoinAmount + totalFees - req.Equal(srcInitialBalance-expectedDifference, srcFinalBalance) - req.Equal(dstInitialBalance+testCoinAmount, dstFinalBalance) + req.True(srcFinalBalance.Equal(srcInitialBalance.SubRaw(expectedDifference))) + req.True(dstFinalBalance.Equal(dstInitialBalance.AddRaw(testCoinAmount))) } // [END] assert on source to destination transfer @@ -445,8 +438,8 @@ func testPacketRelaySuccess( dstUser := testCase.Users[1] dstDenom := dstChainCfg.Denom // Assuming these values since the ibc transfers were sent in PreRelayerStart, so balances may have already changed by now - srcInitialBalance := int64(0) - dstInitialBalance := userFaucetFund + srcInitialBalance := math.ZeroInt() + dstInitialBalance := math.NewInt(userFaucetFund) dstAck, err := testutil.PollForAck(ctx, dstChain, dstTx.Height, dstTx.Height+pollHeightMax, dstTx.Packet) req.NoError(err, "failed to get acknowledgement on destination chain") @@ -465,8 +458,8 @@ func testPacketRelaySuccess( totalFees := dstChain.GetGasFeesInNativeDenom(dstTx.GasSpent) expectedDifference := testCoinAmount + totalFees - req.Equal(srcInitialBalance+testCoinAmount, srcFinalBalance) - req.Equal(dstInitialBalance-expectedDifference, dstFinalBalance) + req.True(srcFinalBalance.Equal(srcInitialBalance.AddRaw(testCoinAmount))) + req.True(dstFinalBalance.Equal(dstInitialBalance.SubRaw(expectedDifference))) } //[END] assert on destination to source transfer } @@ -494,8 +487,8 @@ func testPacketRelayFail( // [BEGIN] assert on source to destination transfer for i, srcTx := range testCase.TxCache.Src { // Assuming these values since the ibc transfers were sent in PreRelayerStart, so balances may have already changed by now - srcInitialBalance := userFaucetFund - dstInitialBalance := int64(0) + srcInitialBalance := math.NewInt(userFaucetFund) + dstInitialBalance := math.ZeroInt() timeout, err := testutil.PollForTimeout(ctx, srcChain, srcTx.Height, srcTx.Height+pollHeightMax, srcTx.Packet) req.NoError(err, "failed to get timeout packet on source chain") @@ -517,16 +510,16 @@ func testPacketRelayFail( totalFees := srcChain.GetGasFeesInNativeDenom(srcTx.GasSpent) - req.Equal(srcInitialBalance-totalFees, srcFinalBalance) - req.Equal(dstInitialBalance, dstFinalBalance) + req.True(srcFinalBalance.Equal(srcInitialBalance.SubRaw(totalFees))) + req.True(dstFinalBalance.Equal(dstInitialBalance)) } // [END] assert on source to destination transfer // [BEGIN] assert on destination to source transfer for i, dstTx := range testCase.TxCache.Dst { // Assuming these values since the ibc transfers were sent in PreRelayerStart, so balances may have already changed by now - srcInitialBalance := int64(0) - dstInitialBalance := userFaucetFund + srcInitialBalance := math.ZeroInt() + dstInitialBalance := math.NewInt(userFaucetFund) timeout, err := testutil.PollForTimeout(ctx, dstChain, dstTx.Height, dstTx.Height+pollHeightMax, dstTx.Packet) req.NoError(err, "failed to get timeout packet on destination chain") @@ -544,8 +537,8 @@ func testPacketRelayFail( totalFees := dstChain.GetGasFeesInNativeDenom(dstTx.GasSpent) - req.Equal(srcInitialBalance, srcFinalBalance) - req.Equal(dstInitialBalance-totalFees, dstFinalBalance) + req.True(srcFinalBalance.Equal(srcInitialBalance)) + req.True(dstFinalBalance.Equal(dstInitialBalance.SubRaw(totalFees))) } // [END] assert on destination to source transfer } diff --git a/examples/cosmos/chain_param_change_test.go b/examples/cosmos/chain_param_change_test.go new file mode 100644 index 000000000..930319821 --- /dev/null +++ b/examples/cosmos/chain_param_change_test.go @@ -0,0 +1,117 @@ +package cosmos_test + +import ( + "context" + "encoding/json" + "testing" + + paramsutils "github.com/cosmos/cosmos-sdk/x/params/client/utils" + "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" +) + +func TestJunoParamChange(t *testing.T) { + CosmosChainParamChangeTest(t, "juno", "v13.0.1") +} + +func CosmosChainParamChangeTest(t *testing.T, name, version string) { + if testing.Short() { + t.Skip("skipping in short mode") + } + + t.Parallel() + + numVals := 1 + numFullNodes := 1 + + // SDK v45 params for Juno genesis + shortVoteGenesis := []cosmos.GenesisKV{ + { + Key: "app_state.gov.voting_params.voting_period", + Value: votingPeriod, + }, + { + Key: "app_state.gov.deposit_params.max_deposit_period", + Value: maxDepositPeriod, + }, + { + Key: "app_state.gov.deposit_params.min_deposit.0.denom", + Value: "ujuno", + }, + } + + cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ + { + Name: name, + ChainName: name, + Version: version, + ChainConfig: ibc.ChainConfig{ + Denom: "ujuno", + ModifyGenesis: cosmos.ModifyGenesis(shortVoteGenesis), + }, + NumValidators: &numVals, + NumFullNodes: &numFullNodes, + }, + }) + + chains, err := cf.Chains(t.Name()) + require.NoError(t, err) + + chain := chains[0].(*cosmos.CosmosChain) + + ic := interchaintest.NewInterchain(). + AddChain(chain) + + ctx := context.Background() + client, network := interchaintest.DockerSetup(t) + + require.NoError(t, ic.Build(ctx, nil, interchaintest.InterchainBuildOptions{ + TestName: t.Name(), + Client: client, + NetworkID: network, + SkipPathCreation: true, + })) + t.Cleanup(func() { + _ = ic.Close() + }) + + const userFunds = int64(10_000_000_000) + users := interchaintest.GetAndFundTestUsers(t, ctx, t.Name(), userFunds, chain) + chainUser := users[0] + + param, _ := chain.QueryParam(ctx, "staking", "MaxValidators") + require.Equal(t, "100", param.Value, "MaxValidators value is not 100") + + paramChangeValue := 110 + rawValue, err := json.Marshal(paramChangeValue) + require.NoError(t, err) + + param_change := paramsutils.ParamChangeProposalJSON{ + Title: "Increase validator set to 110", + Description: ".", + Changes: paramsutils.ParamChangesJSON{ + paramsutils.ParamChangeJSON{ + Subspace: "staking", + Key: "MaxValidators", + Value: rawValue, + }, + }, + Deposit: "10000000ujuno", + } + + paramTx, err := chain.ParamChangeProposal(ctx, chainUser.KeyName(), ¶m_change) + require.NoError(t, err, "error submitting param change proposal tx") + + err = chain.VoteOnProposalAllValidators(ctx, paramTx.ProposalID, cosmos.ProposalVoteYes) + require.NoError(t, err, "failed to submit votes") + + height, _ := chain.Height(ctx) + _, err = cosmos.PollForProposalStatus(ctx, chain, height, height+10, paramTx.ProposalID, cosmos.ProposalStatusPassed) + require.NoError(t, err, "proposal status did not change to passed in expected number of blocks") + + param, _ = chain.QueryParam(ctx, "staking", "MaxValidators") + require.Equal(t, "110", param.Value, "MaxValidators value is not 110") +} diff --git a/examples/cosmos/chain_upgrade_ibc_test.go b/examples/cosmos/chain_upgrade_ibc_test.go index 0903b6c86..2a97aef1e 100644 --- a/examples/cosmos/chain_upgrade_ibc_test.go +++ b/examples/cosmos/chain_upgrade_ibc_test.go @@ -16,6 +16,13 @@ import ( "go.uber.org/zap/zaptest" ) +const ( + haltHeightDelta = uint64(10) // will propose upgrade this many blocks in the future + blocksAfterUpgrade = uint64(10) + votingPeriod = "10s" + maxDepositPeriod = "10s" +) + func TestJunoUpgradeIBC(t *testing.T) { CosmosChainUpgradeIBCTest(t, "juno", "v6.0.0", "ghcr.io/strangelove-ventures/heighliner/juno", "v8.0.0", "multiverse") } @@ -27,13 +34,29 @@ func CosmosChainUpgradeIBCTest(t *testing.T, chainName, initialVersion, upgradeC t.Parallel() + // SDK v45 params for Juno genesis + shortVoteGenesis := []cosmos.GenesisKV{ + { + Key: "app_state.gov.voting_params.voting_period", + Value: votingPeriod, + }, + { + Key: "app_state.gov.deposit_params.max_deposit_period", + Value: maxDepositPeriod, + }, + { + Key: "app_state.gov.deposit_params.min_deposit.0.denom", + Value: "ujuno", + }, + } + cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ { Name: chainName, ChainName: chainName, Version: initialVersion, ChainConfig: ibc.ChainConfig{ - ModifyGenesis: modifyGenesisShortProposals(votingPeriod, maxDepositPeriod), + ModifyGenesis: cosmos.ModifyGenesis(shortVoteGenesis), }, }, { @@ -80,11 +103,11 @@ func CosmosChainUpgradeIBCTest(t *testing.T, chainName, initialVersion, upgradeC rep := testreporter.NewNopReporter() require.NoError(t, ic.Build(ctx, rep.RelayerExecReporter(t), interchaintest.InterchainBuildOptions{ - TestName: t.Name(), - Client: client, - NetworkID: network, - BlockDatabaseFile: interchaintest.DefaultBlockDatabaseFilepath(), - SkipPathCreation: false, + TestName: t.Name(), + Client: client, + NetworkID: network, + // BlockDatabaseFile: interchaintest.DefaultBlockDatabaseFilepath(), + SkipPathCreation: false, })) t.Cleanup(func() { _ = ic.Close() diff --git a/examples/cosmos/chain_upgrade_test.go b/examples/cosmos/chain_upgrade_test.go deleted file mode 100644 index 45fcfb93d..000000000 --- a/examples/cosmos/chain_upgrade_test.go +++ /dev/null @@ -1,157 +0,0 @@ -package cosmos_test - -import ( - "context" - "encoding/json" - "fmt" - "testing" - "time" - - "github.com/icza/dyno" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/testutil" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" -) - -const ( - haltHeightDelta = uint64(10) // will propose upgrade this many blocks in the future - blocksAfterUpgrade = uint64(10) - votingPeriod = "10s" - maxDepositPeriod = "10s" -) - -func TestJunoUpgrade(t *testing.T) { - CosmosChainUpgradeTest(t, "juno", "v6.0.0", "ghcr.io/strangelove-ventures/heighliner/juno", "v8.0.0", "multiverse") -} - -func CosmosChainUpgradeTest(t *testing.T, chainName, initialVersion, upgradeContainerRepo, upgradeVersion, upgradeName string) { - if testing.Short() { - t.Skip("skipping in short mode") - } - - t.Parallel() - - cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ - { - Name: chainName, - ChainName: chainName, - Version: initialVersion, - ChainConfig: ibc.ChainConfig{ - ModifyGenesis: modifyGenesisShortProposals(votingPeriod, maxDepositPeriod), - }, - }, - }) - - chains, err := cf.Chains(t.Name()) - require.NoError(t, err) - - chain := chains[0].(*cosmos.CosmosChain) - - ic := interchaintest.NewInterchain(). - AddChain(chain) - - ctx := context.Background() - client, network := interchaintest.DockerSetup(t) - - require.NoError(t, ic.Build(ctx, nil, interchaintest.InterchainBuildOptions{ - TestName: t.Name(), - Client: client, - NetworkID: network, - BlockDatabaseFile: interchaintest.DefaultBlockDatabaseFilepath(), - SkipPathCreation: true, - })) - t.Cleanup(func() { - _ = ic.Close() - }) - - const userFunds = int64(10_000_000_000) - users := interchaintest.GetAndFundTestUsers(t, ctx, t.Name(), userFunds, chain) - chainUser := users[0] - - height, err := chain.Height(ctx) - require.NoError(t, err, "error fetching height before submit upgrade proposal") - - haltHeight := height + haltHeightDelta - - proposal := cosmos.SoftwareUpgradeProposal{ - Deposit: "500000000" + chain.Config().Denom, // greater than min deposit - Title: "Chain Upgrade 1", - Name: upgradeName, - Description: "First chain software upgrade", - Height: haltHeight, - } - - upgradeTx, err := chain.UpgradeProposal(ctx, chainUser.KeyName(), proposal) - require.NoError(t, err, "error submitting software upgrade proposal tx") - - err = chain.VoteOnProposalAllValidators(ctx, upgradeTx.ProposalID, cosmos.ProposalVoteYes) - require.NoError(t, err, "failed to submit votes") - - _, err = cosmos.PollForProposalStatus(ctx, chain, height, height+haltHeightDelta, upgradeTx.ProposalID, cosmos.ProposalStatusPassed) - require.NoError(t, err, "proposal status did not change to passed in expected number of blocks") - - timeoutCtx, timeoutCtxCancel := context.WithTimeout(ctx, time.Second*45) - defer timeoutCtxCancel() - - height, err = chain.Height(ctx) - require.NoError(t, err, "error fetching height before upgrade") - - // this should timeout due to chain halt at upgrade height. - _ = testutil.WaitForBlocks(timeoutCtx, int(haltHeight-height)+1, chain) - - height, err = chain.Height(ctx) - require.NoError(t, err, "error fetching height after chain should have halted") - - // make sure that chain is halted - require.Equal(t, haltHeight, height, "height is not equal to halt height") - - // bring down nodes to prepare for upgrade - err = chain.StopAllNodes(ctx) - require.NoError(t, err, "error stopping node(s)") - - // upgrade version on all nodes - chain.UpgradeVersion(ctx, client, upgradeContainerRepo, upgradeVersion) - - // start all nodes back up. - // validators reach consensus on first block after upgrade height - // and chain block production resumes. - err = chain.StartAllNodes(ctx) - require.NoError(t, err, "error starting upgraded node(s)") - - timeoutCtx, timeoutCtxCancel = context.WithTimeout(ctx, time.Second*45) - defer timeoutCtxCancel() - - err = testutil.WaitForBlocks(timeoutCtx, int(blocksAfterUpgrade), chain) - require.NoError(t, err, "chain did not produce blocks after upgrade") - - height, err = chain.Height(ctx) - require.NoError(t, err, "error fetching height after upgrade") - - require.GreaterOrEqual(t, height, haltHeight+blocksAfterUpgrade, "height did not increment enough after upgrade") -} - -func modifyGenesisShortProposals(votingPeriod string, maxDepositPeriod string) func(ibc.ChainConfig, []byte) ([]byte, error) { - return func(chainConfig ibc.ChainConfig, genbz []byte) ([]byte, error) { - g := make(map[string]interface{}) - if err := json.Unmarshal(genbz, &g); err != nil { - return nil, fmt.Errorf("failed to unmarshal genesis file: %w", err) - } - if err := dyno.Set(g, votingPeriod, "app_state", "gov", "voting_params", "voting_period"); err != nil { - return nil, fmt.Errorf("failed to set voting period in genesis json: %w", err) - } - if err := dyno.Set(g, maxDepositPeriod, "app_state", "gov", "deposit_params", "max_deposit_period"); err != nil { - return nil, fmt.Errorf("failed to set voting period in genesis json: %w", err) - } - if err := dyno.Set(g, chainConfig.Denom, "app_state", "gov", "deposit_params", "min_deposit", 0, "denom"); err != nil { - return nil, fmt.Errorf("failed to set voting period in genesis json: %w", err) - } - out, err := json.Marshal(g) - if err != nil { - return nil, fmt.Errorf("failed to marshal genesis bytes to json: %w", err) - } - return out, nil - } -} diff --git a/examples/cosmos/light_client_test.go b/examples/cosmos/light_client_test.go index feb8ddeaa..89cd6f59d 100644 --- a/examples/cosmos/light_client_test.go +++ b/examples/cosmos/light_client_test.go @@ -4,8 +4,9 @@ import ( "context" "testing" + "cosmossdk.io/math" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/strangelove-ventures/interchaintest/v7/testreporter" @@ -83,7 +84,7 @@ func TestUpdateLightClients(t *testing.T) { transfer := ibc.WalletAmount{ Address: dstAddress, Denom: gaia.Config().Denom, - Amount: amountToSend, + Amount: math.NewInt(amountToSend), } tx, err := gaia.SendIBCTransfer(ctx, chanID, gaiaUser.KeyName(), transfer, ibc.TransferOptions{}) require.NoError(t, err) diff --git a/examples/cosmos/sdk_47_boundary_test.go b/examples/cosmos/sdk_47_boundary_test.go index 2071b94da..b35e80585 100644 --- a/examples/cosmos/sdk_47_boundary_test.go +++ b/examples/cosmos/sdk_47_boundary_test.go @@ -8,8 +8,6 @@ import ( "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v7/conformance" "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/relayer" - "github.com/strangelove-ventures/interchaintest/v7/relayer/rly" "github.com/strangelove-ventures/interchaintest/v7/testreporter" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" @@ -51,9 +49,6 @@ func TestSDK47Boundary(t *testing.T) { rf := interchaintest.NewBuiltinRelayerFactory( ibc.CosmosRly, zaptest.NewLogger(t), - relayer.StartupFlags("-b", "100"), - relayer.CustomDockerImage("ghcr.io/cosmos/relayer", "andrew-tendermint_v0.37", rly.RlyDefaultUidGid), - relayer.ImagePull(false), ) r := rf.Build(t, client, network) diff --git a/examples/cosmos/state_sync_test.go b/examples/cosmos/state_sync_test.go index c880f3572..8e7db028c 100644 --- a/examples/cosmos/state_sync_test.go +++ b/examples/cosmos/state_sync_test.go @@ -70,11 +70,11 @@ func CosmosChainStateSyncTest(t *testing.T, chainName, version string) { client, network := interchaintest.DockerSetup(t) require.NoError(t, ic.Build(ctx, nil, interchaintest.InterchainBuildOptions{ - TestName: t.Name(), - Client: client, - NetworkID: network, - BlockDatabaseFile: interchaintest.DefaultBlockDatabaseFilepath(), - SkipPathCreation: true, + TestName: t.Name(), + Client: client, + NetworkID: network, + // BlockDatabaseFile: interchaintest.DefaultBlockDatabaseFilepath(), + SkipPathCreation: true, })) t.Cleanup(func() { _ = ic.Close() diff --git a/examples/hyperspace/hyperspace_test.go b/examples/hyperspace/hyperspace_test.go new file mode 100644 index 000000000..7e9a4b7e4 --- /dev/null +++ b/examples/hyperspace/hyperspace_test.go @@ -0,0 +1,402 @@ +package hyperspace_test + +import ( + "context" + "crypto/sha256" + "encoding/hex" + "encoding/json" + "fmt" + "testing" + "time" + + "cosmossdk.io/math" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + "github.com/icza/dyno" + "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v7/chain/polkadot" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v7/relayer" + "github.com/strangelove-ventures/interchaintest/v7/testreporter" + "github.com/strangelove-ventures/interchaintest/v7/testutil" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" +) + +// TestHyperspace setup +// Must build local docker images of hyperspace, parachain, and polkadot +// ###### hyperspace ###### +// * Repo: ComposableFi/centauri +// * Branch: vmarkushin/wasm +// * Commit: 00ee58381df66b035be75721e6e16c2bbf82f076 +// * Build local Hyperspace docker from centauri repo: +// amd64: "docker build -f scripts/hyperspace.Dockerfile -t hyperspace:local ." +// arm64: "docker build -f scripts/hyperspace.aarch64.Dockerfile -t hyperspace:latest --platform=linux/arm64/v8 . +// ###### parachain ###### +// * Repo: ComposableFi/centauri +// * Branch: vmarkushin/wasm +// * Commit: 00ee58381df66b035be75721e6e16c2bbf82f076 +// * Build local parachain docker from centauri repo: +// ./scripts/build-parachain-node-docker.sh (you can change the script to compile for ARM arch if needed) +// ###### polkadot ###### +// * Repo: paritytech/polkadot +// * Branch: release-v0.9.36 +// * Commit: dc25abc712e42b9b51d87ad1168e453a42b5f0bc +// * Build local polkadot docker from polkadot repo +// amd64: docker build -f scripts/ci/dockerfiles/polkadot/polkadot_builder.Dockerfile . -t polkadot-node:local +// arm64: docker build --platform linux/arm64 -f scripts/ci/dockerfiles/polkadot/polkadot_builder.aarch64.Dockerfile . -t polkadot-node:local + +const ( + heightDelta = uint64(20) + votingPeriod = "30s" + maxDepositPeriod = "10s" + aliceAddress = "5yNZjX24n2eg7W6EVamaTXNQbWCwchhThEaSWB7V3GRjtHeL" +) + +// TestHyperspace features +// * sets up a Polkadot parachain +// * sets up a Cosmos chain +// * sets up the Hyperspace relayer +// * Funds a user wallet on both chains +// * Pushes a wasm client contract to the Cosmos chain +// * create client, connection, and channel in relayer +// * start relayer +// * send transfer over ibc +func TestHyperspace(t *testing.T) { + if testing.Short() { + t.Skip() + } + + t.Parallel() + + client, network := interchaintest.DockerSetup(t) + + rep := testreporter.NewNopReporter() + eRep := rep.RelayerExecReporter(t) + + ctx := context.Background() + + nv := 5 // Number of validators + nf := 3 // Number of full nodes + + consensusOverrides := make(testutil.Toml) + blockTime := 5 // seconds, parachain is 12 second blocks, don't make relayer work harder than needed + blockT := (time.Duration(blockTime) * time.Second).String() + consensusOverrides["timeout_commit"] = blockT + consensusOverrides["timeout_propose"] = blockT + + configTomlOverrides := make(testutil.Toml) + configTomlOverrides["consensus"] = consensusOverrides + + configFileOverrides := make(map[string]any) + configFileOverrides["config/config.toml"] = configTomlOverrides + + // Get both chains + cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ + { + ChainName: "composable", // Set ChainName so that a suffix with a "dash" is not appended (required for hyperspace) + ChainConfig: ibc.ChainConfig{ + Type: "polkadot", + Name: "composable", + ChainID: "rococo-local", + Images: []ibc.DockerImage{ + { + Repository: "polkadot-node", + Version: "local", + UidGid: "1000:1000", + }, + { + Repository: "parachain-node", + Version: "latest", + //UidGid: "1025:1025", + }, + }, + Bin: "polkadot", + Bech32Prefix: "composable", + Denom: "uDOT", + GasPrices: "", + GasAdjustment: 0, + TrustingPeriod: "", + CoinType: "354", + }, + NumValidators: &nv, + NumFullNodes: &nf, + }, + { + ChainName: "simd", // Set chain name so that a suffix with a "dash" is not appended (required for hyperspace) + ChainConfig: ibc.ChainConfig{ + Type: "cosmos", + Name: "simd", + ChainID: "simd", + Images: []ibc.DockerImage{ + { + Repository: "ghcr.io/strangelove-ventures/heighliner/ibc-go-simd", + Version: "feat-wasm-clients", + UidGid: "1025:1025", + }, + }, + Bin: "simd", + Bech32Prefix: "cosmos", + Denom: "stake", + GasPrices: "0.00stake", + GasAdjustment: 1.3, + TrustingPeriod: "504h", + CoinType: "118", + //EncodingConfig: WasmClientEncoding(), + NoHostMount: true, + ConfigFileOverrides: configFileOverrides, + ModifyGenesis: modifyGenesisShortProposals(votingPeriod, maxDepositPeriod), + }, + }, + }) + + chains, err := cf.Chains(t.Name()) + require.NoError(t, err) + + polkadotChain := chains[0].(*polkadot.PolkadotChain) + cosmosChain := chains[1].(*cosmos.CosmosChain) + + // Get a relayer instance + r := interchaintest.NewBuiltinRelayerFactory( + ibc.Hyperspace, + zaptest.NewLogger(t), + // These two fields are used to pass in a custom Docker image built locally + relayer.ImagePull(false), + relayer.CustomDockerImage("hyperspace", "local", "1000:1000"), + ).Build(t, client, network) + + // Build the network; spin up the chains and configure the relayer + const pathName = "composable-simd" + const relayerName = "hyperspace" + + ic := interchaintest.NewInterchain(). + AddChain(polkadotChain). + AddChain(cosmosChain). + AddRelayer(r, relayerName). + AddLink(interchaintest.InterchainLink{ + Chain1: polkadotChain, + Chain2: cosmosChain, + Relayer: r, + Path: pathName, + }) + + require.NoError(t, ic.Build(ctx, eRep, interchaintest.InterchainBuildOptions{ + TestName: t.Name(), + Client: client, + NetworkID: network, + BlockDatabaseFile: interchaintest.DefaultBlockDatabaseFilepath(), + SkipPathCreation: true, // Skip path creation, so we can have granular control over the process + })) + fmt.Println("Interchain built") + + t.Cleanup(func() { + _ = ic.Close() + }) + + // Create a proposal, vote, and wait for it to pass. Return code hash for relayer. + codeHash := pushWasmContractViaGov(t, ctx, cosmosChain) + + // Set client contract hash in cosmos chain config + err = r.SetClientContractHash(ctx, eRep, cosmosChain.Config(), codeHash) + require.NoError(t, err) + + // Ensure parachain has started (starts 1 session/epoch after relay chain) + err = testutil.WaitForBlocks(ctx, 1, polkadotChain) + require.NoError(t, err, "polkadot chain failed to make blocks") + + // Fund users on both cosmos and parachain, mints Asset 1 for Alice + fundAmount := int64(12_333_000_000_000) + polkadotUser, cosmosUser := fundUsers(t, ctx, fundAmount, polkadotChain, cosmosChain) + + err = r.GeneratePath(ctx, eRep, cosmosChain.Config().ChainID, polkadotChain.Config().ChainID, pathName) + require.NoError(t, err) + + // Create new clients + err = r.CreateClients(ctx, eRep, pathName, ibc.DefaultClientOpts()) + require.NoError(t, err) + err = testutil.WaitForBlocks(ctx, 1, cosmosChain, polkadotChain) // these 1 block waits seem to be needed to reduce flakiness + require.NoError(t, err) + + // Create a new connection + err = r.CreateConnections(ctx, eRep, pathName) + require.NoError(t, err) + err = testutil.WaitForBlocks(ctx, 1, cosmosChain, polkadotChain) + require.NoError(t, err) + + // Create a new channel & get channels from each chain + err = r.CreateChannel(ctx, eRep, pathName, ibc.DefaultChannelOpts()) + require.NoError(t, err) + err = testutil.WaitForBlocks(ctx, 1, cosmosChain, polkadotChain) + require.NoError(t, err) + + // Start relayer + r.StartRelayer(ctx, eRep, pathName) + require.NoError(t, err) + t.Cleanup(func() { + err = r.StopRelayer(ctx, eRep) + if err != nil { + panic(err) + } + }) + + // Send 1.77 stake from cosmosUser to parachainUser + amountToSend := int64(1_770_000) + transfer := ibc.WalletAmount{ + Address: polkadotUser.FormattedAddress(), + Denom: cosmosChain.Config().Denom, + Amount: math.NewInt(amountToSend), + } + tx, err := cosmosChain.SendIBCTransfer(ctx, "channel-0", cosmosUser.KeyName(), transfer, ibc.TransferOptions{}) + require.NoError(t, err) + require.NoError(t, tx.Validate()) // test source wallet has decreased funds + err = testutil.WaitForBlocks(ctx, 5, cosmosChain, polkadotChain) + require.NoError(t, err) + + // Verify tokens arrived on parachain user + parachainUserStake, err := polkadotChain.GetIbcBalance(ctx, string(polkadotUser.Address()), 2) + require.NoError(t, err) + require.Equal(t, amountToSend, parachainUserStake.Amount.Int64(), "parachain user's stake amount not expected after first tx") + + // Send 1.16 stake from parachainUser to cosmosUser + amountToReflect := int64(1_160_000) + reflectTransfer := ibc.WalletAmount{ + Address: cosmosUser.FormattedAddress(), + Denom: "2", // stake + Amount: math.NewInt(amountToReflect), + } + _, err = polkadotChain.SendIBCTransfer(ctx, "channel-0", polkadotUser.KeyName(), reflectTransfer, ibc.TransferOptions{}) + require.NoError(t, err) + + // Send 1.88 "UNIT" from Alice to cosmosUser + amountUnits := math.NewInt(1_880_000_000_000) + unitTransfer := ibc.WalletAmount{ + Address: cosmosUser.FormattedAddress(), + Denom: "1", // UNIT + Amount: amountUnits, + } + _, err = polkadotChain.SendIBCTransfer(ctx, "channel-0", "alice", unitTransfer, ibc.TransferOptions{}) + require.NoError(t, err) + + // Wait for MsgRecvPacket on cosmos chain + finalStakeBal := math.NewInt(fundAmount - amountToSend + amountToReflect) + err = cosmos.PollForBalance(ctx, cosmosChain, 20, ibc.WalletAmount{ + Address: cosmosUser.FormattedAddress(), + Denom: cosmosChain.Config().Denom, + Amount: finalStakeBal, + }) + require.NoError(t, err) + + // Verify cosmos user's final "stake" balance + cosmosUserStakeBal, err := cosmosChain.GetBalance(ctx, cosmosUser.FormattedAddress(), cosmosChain.Config().Denom) + require.NoError(t, err) + require.True(t, cosmosUserStakeBal.Equal(finalStakeBal)) + + // Verify cosmos user's final "unit" balance + unitDenomTrace := transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom("transfer", "channel-0", "UNIT")) + cosmosUserUnitBal, err := cosmosChain.GetBalance(ctx, cosmosUser.FormattedAddress(), unitDenomTrace.IBCDenom()) + require.NoError(t, err) + require.True(t, cosmosUserUnitBal.Equal(amountUnits)) + + // Verify parachain user's final "unit" balance (will be less than expected due gas costs for stake tx) + parachainUserUnits, err := polkadotChain.GetIbcBalance(ctx, string(polkadotUser.Address()), 1) + require.NoError(t, err) + require.True(t, parachainUserUnits.Amount.LTE(math.NewInt(fundAmount)), "parachain user's final unit amount not expected") + + // Verify parachain user's final "stake" balance + parachainUserStake, err = polkadotChain.GetIbcBalance(ctx, string(polkadotUser.Address()), 2) + require.NoError(t, err) + require.True(t, parachainUserStake.Equal(math.NewInt(amountToSend-amountToReflect)), "parachain user's final stake amount not expected") +} + +type GetCodeQueryMsgResponse struct { + Code []byte `json:"code"` +} + +func pushWasmContractViaGov(t *testing.T, ctx context.Context, cosmosChain *cosmos.CosmosChain) string { + // Set up cosmos user for pushing new wasm code msg via governance + fundAmountForGov := int64(10_000_000_000) + contractUsers := interchaintest.GetAndFundTestUsers(t, ctx, "default", int64(fundAmountForGov), cosmosChain) + contractUser := contractUsers[0] + + contractUserBalInitial, err := cosmosChain.GetBalance(ctx, contractUser.FormattedAddress(), cosmosChain.Config().Denom) + require.NoError(t, err) + require.True(t, contractUserBalInitial.Equal(math.NewInt(fundAmountForGov))) + + proposal := cosmos.TxProposalv1{ + Metadata: "none", + Deposit: "500000000" + cosmosChain.Config().Denom, // greater than min deposit + Title: "Grandpa Contract", + Summary: "new grandpa contract", + } + + proposalTx, codeHash, err := cosmosChain.PushNewWasmClientProposal(ctx, contractUser.KeyName(), "../polkadot/ics10_grandpa_cw.wasm", proposal) + require.NoError(t, err, "error submitting new wasm contract proposal tx") + + height, err := cosmosChain.Height(ctx) + require.NoError(t, err, "error fetching height before submit upgrade proposal") + + err = cosmosChain.VoteOnProposalAllValidators(ctx, proposalTx.ProposalID, cosmos.ProposalVoteYes) + require.NoError(t, err, "failed to submit votes") + + _, err = cosmos.PollForProposalStatus(ctx, cosmosChain, height, height+heightDelta, proposalTx.ProposalID, cosmos.ProposalStatusPassed) + require.NoError(t, err, "proposal status did not change to passed in expected number of blocks") + + err = testutil.WaitForBlocks(ctx, 1, cosmosChain) + require.NoError(t, err) + + var getCodeQueryMsgRsp GetCodeQueryMsgResponse + err = cosmosChain.QueryClientContractCode(ctx, codeHash, &getCodeQueryMsgRsp) + codeHashByte32 := sha256.Sum256(getCodeQueryMsgRsp.Code) + codeHash2 := hex.EncodeToString(codeHashByte32[:]) + require.NoError(t, err) + require.NotEmpty(t, getCodeQueryMsgRsp.Code) + require.Equal(t, codeHash, codeHash2) + + return codeHash +} + +func fundUsers(t *testing.T, ctx context.Context, fundAmount int64, polkadotChain ibc.Chain, cosmosChain ibc.Chain) (ibc.Wallet, ibc.Wallet) { + users := interchaintest.GetAndFundTestUsers(t, ctx, "user", fundAmount, polkadotChain, cosmosChain) + polkadotUser, cosmosUser := users[0], users[1] + err := testutil.WaitForBlocks(ctx, 2, polkadotChain, cosmosChain) // Only waiting 1 block is flaky for parachain + require.NoError(t, err, "cosmos or polkadot chain failed to make blocks") + + // Check balances are correct + amount := math.NewInt(fundAmount) + polkadotUserAmount, err := polkadotChain.GetBalance(ctx, polkadotUser.FormattedAddress(), polkadotChain.Config().Denom) + require.NoError(t, err) + require.True(t, polkadotUserAmount.Equal(amount), "Initial polkadot user amount not expected") + + parachainUserAmount, err := polkadotChain.GetBalance(ctx, polkadotUser.FormattedAddress(), "") + require.NoError(t, err) + require.True(t, parachainUserAmount.Equal(amount), "Initial parachain user amount not expected") + + cosmosUserAmount, err := cosmosChain.GetBalance(ctx, cosmosUser.FormattedAddress(), cosmosChain.Config().Denom) + require.NoError(t, err) + require.True(t, cosmosUserAmount.Equal(amount), "Initial cosmos user amount not expected") + + return polkadotUser, cosmosUser +} + +func modifyGenesisShortProposals(votingPeriod string, maxDepositPeriod string) func(ibc.ChainConfig, []byte) ([]byte, error) { + return func(chainConfig ibc.ChainConfig, genbz []byte) ([]byte, error) { + g := make(map[string]interface{}) + if err := json.Unmarshal(genbz, &g); err != nil { + return nil, fmt.Errorf("failed to unmarshal genesis file: %w", err) + } + if err := dyno.Set(g, votingPeriod, "app_state", "gov", "params", "voting_period"); err != nil { + return nil, fmt.Errorf("failed to set voting period in genesis json: %w", err) + } + if err := dyno.Set(g, maxDepositPeriod, "app_state", "gov", "params", "max_deposit_period"); err != nil { + return nil, fmt.Errorf("failed to set max deposit period in genesis json: %w", err) + } + if err := dyno.Set(g, chainConfig.Denom, "app_state", "gov", "params", "min_deposit", 0, "denom"); err != nil { + return nil, fmt.Errorf("failed to set min deposit in genesis json: %w", err) + } + out, err := json.Marshal(g) + if err != nil { + return nil, fmt.Errorf("failed to marshal genesis bytes to json: %w", err) + } + return out, nil + } +} diff --git a/examples/ibc/interchain_accounts_test.go b/examples/ibc/interchain_accounts_test.go index 3eafd56cf..2ce1796fb 100644 --- a/examples/ibc/interchain_accounts_test.go +++ b/examples/ibc/interchain_accounts_test.go @@ -3,14 +3,14 @@ package ibc import ( "context" "encoding/json" - "strconv" "strings" "testing" "time" + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/crypto/keyring" chantypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/strangelove-ventures/interchaintest/v7/relayer" @@ -183,7 +183,7 @@ func TestInterchainAccounts(t *testing.T) { require.NoError(t, err) // Send funds to ICA from user account on chain2 - const transferAmount = 10000 + transferAmount := math.NewInt(1000) transfer := ibc.WalletAmount{ Address: icaAddr, Denom: chain2.Config().Denom, @@ -194,11 +194,11 @@ func TestInterchainAccounts(t *testing.T) { chain2Bal, err := chain2.GetBalance(ctx, chain2Addr, chain2.Config().Denom) require.NoError(t, err) - require.Equal(t, chain2OrigBal-transferAmount, chain2Bal) + require.True(t, chain2Bal.Equal(chain2OrigBal.Sub(transferAmount))) icaBal, err := chain2.GetBalance(ctx, icaAddr, chain2.Config().Denom) require.NoError(t, err) - require.Equal(t, icaOrigBal+transferAmount, icaBal) + require.True(t, icaBal.Equal(icaOrigBal.Add(transferAmount))) // Build bank transfer msg rawMsg, err := json.Marshal(map[string]any{ @@ -208,7 +208,7 @@ func TestInterchainAccounts(t *testing.T) { "amount": []map[string]any{ { "denom": chain2.Config().Denom, - "amount": strconv.Itoa(transferAmount), + "amount": transferAmount.String(), }, }, }) @@ -245,12 +245,12 @@ func TestInterchainAccounts(t *testing.T) { // Assert that the funds have been received by the user account on chain2 chain2Bal, err = chain2.GetBalance(ctx, chain2Addr, chain2.Config().Denom) require.NoError(t, err) - require.Equal(t, chain2OrigBal, chain2Bal) + require.True(t, chain2Bal.Equal(chain2OrigBal)) // Assert that the funds have been removed from the ICA on chain2 icaBal, err = chain2.GetBalance(ctx, icaAddr, chain2.Config().Denom) require.NoError(t, err) - require.Equal(t, icaOrigBal, icaBal) + require.True(t, icaBal.Equal(icaOrigBal)) // Stop the relayer and wait for the process to terminate err = r.StopRelayer(ctx, eRep) @@ -282,11 +282,11 @@ func TestInterchainAccounts(t *testing.T) { // Assert that the packet timed out and that the acc balances are correct chain2Bal, err = chain2.GetBalance(ctx, chain2Addr, chain2.Config().Denom) require.NoError(t, err) - require.Equal(t, chain2OrigBal, chain2Bal) + require.True(t, chain2Bal.Equal(chain2OrigBal)) icaBal, err = chain2.GetBalance(ctx, icaAddr, chain2.Config().Denom) require.NoError(t, err) - require.Equal(t, icaOrigBal, icaBal) + require.True(t, icaBal.Equal(icaOrigBal)) // Assert that the channel ends are both closed chain1Chans, err := r.GetChannels(ctx, eRep, chain1.Config().ChainID) diff --git a/examples/ibc/learn_ibc_test.go b/examples/ibc/learn_ibc_test.go index 029a8427e..e96403c7a 100644 --- a/examples/ibc/learn_ibc_test.go +++ b/examples/ibc/learn_ibc_test.go @@ -6,8 +6,9 @@ import ( "testing" "time" + "cosmossdk.io/math" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/strangelove-ventures/interchaintest/v7/testreporter" "github.com/stretchr/testify/require" @@ -64,24 +65,24 @@ func TestLearn(t *testing.T) { // Build interchain require.NoError(t, ic.Build(ctx, eRep, interchaintest.InterchainBuildOptions{ - TestName: t.Name(), - Client: client, - NetworkID: network, - BlockDatabaseFile: interchaintest.DefaultBlockDatabaseFilepath(), + TestName: t.Name(), + Client: client, + NetworkID: network, + // BlockDatabaseFile: interchaintest.DefaultBlockDatabaseFilepath(), SkipPathCreation: false}, ), ) // Create and Fund User Wallets - fundAmount := int64(10_000_000) - users := interchaintest.GetAndFundTestUsers(t, ctx, "default", fundAmount, gaia, osmosis) + fundAmount := math.NewInt(10_000_000) + users := interchaintest.GetAndFundTestUsers(t, ctx, "default", fundAmount.Int64(), gaia, osmosis) gaiaUser := users[0] osmosisUser := users[1] gaiaUserBalInitial, err := gaia.GetBalance(ctx, gaiaUser.FormattedAddress(), gaia.Config().Denom) require.NoError(t, err) - require.Equal(t, fundAmount, gaiaUserBalInitial) + require.True(t, gaiaUserBalInitial.Equal(fundAmount)) // Get Channel ID gaiaChannelInfo, err := r.GetChannels(ctx, eRep, gaia.Config().ChainID) @@ -93,7 +94,7 @@ func TestLearn(t *testing.T) { osmoChannelID := osmoChannelInfo[0].ChannelID // Send Transaction - amountToSend := int64(1_000_000) + amountToSend := math.NewInt(1_000_000) dstAddress := osmosisUser.FormattedAddress() transfer := ibc.WalletAmount{ Address: dstAddress, @@ -108,10 +109,10 @@ func TestLearn(t *testing.T) { require.NoError(t, r.Flush(ctx, eRep, ibcPath, gaiaChannelID)) // test source wallet has decreased funds - expectedBal := gaiaUserBalInitial - amountToSend + expectedBal := gaiaUserBalInitial.Sub(amountToSend) gaiaUserBalNew, err := gaia.GetBalance(ctx, gaiaUser.FormattedAddress(), gaia.Config().Denom) require.NoError(t, err) - require.Equal(t, expectedBal, gaiaUserBalNew) + require.True(t, gaiaUserBalNew.Equal(expectedBal)) // Trace IBC Denom srcDenomTrace := transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom("transfer", osmoChannelID, gaia.Config().Denom)) @@ -120,5 +121,5 @@ func TestLearn(t *testing.T) { // Test destination wallet has increased funds osmosUserBalNew, err := osmosis.GetBalance(ctx, osmosisUser.FormattedAddress(), dstIbcDenom) require.NoError(t, err) - require.Equal(t, amountToSend, osmosUserBalNew) + require.True(t, osmosUserBalNew.Equal(amountToSend)) } diff --git a/examples/ibc/packet_forward_test.go b/examples/ibc/packet_forward_test.go index 6538639de..396741328 100644 --- a/examples/ibc/packet_forward_test.go +++ b/examples/ibc/packet_forward_test.go @@ -6,8 +6,9 @@ import ( "testing" "time" + "cosmossdk.io/math" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/strangelove-ventures/interchaintest/v7/testreporter" @@ -102,8 +103,8 @@ func TestPacketForwardMiddleware(t *testing.T) { _ = ic.Close() }) - const userFunds = int64(10_000_000_000) - users := interchaintest.GetAndFundTestUsers(t, ctx, t.Name(), userFunds, chainA, chainB, chainC, chainD) + initBal := math.NewInt(10_000_000_000) + users := interchaintest.GetAndFundTestUsers(t, ctx, t.Name(), initBal.Int64(), chainA, chainB, chainC, chainD) abChan, err := ibc.GetTransferChannel(ctx, r, eRep, chainID_A, chainID_B) require.NoError(t, err) @@ -136,8 +137,6 @@ func TestPacketForwardMiddleware(t *testing.T) { // Get original account balances userA, userB, userC, userD := users[0], users[1], users[2], users[3] - const transferAmount int64 = 100000 - // Compose the prefixed denoms and ibc denom for asserting balances firstHopDenom := transfertypes.GetPrefixedDenom(baChan.PortID, baChan.ChannelID, chainA.Config().Denom) secondHopDenom := transfertypes.GetPrefixedDenom(cbChan.PortID, cbChan.ChannelID, firstHopDenom) @@ -155,9 +154,11 @@ func TestPacketForwardMiddleware(t *testing.T) { secondHopEscrowAccount := transfertypes.GetEscrowAddress(bcChan.PortID, bcChan.ChannelID).String() thirdHopEscrowAccount := transfertypes.GetEscrowAddress(cdChan.PortID, abChan.ChannelID).String() + zeroBal := math.ZeroInt() + transferAmount := math.NewInt(100_000) + t.Run("multi-hop a->b->c->d", func(t *testing.T) { // Send packet from Chain A->Chain B->Chain C->Chain D - transfer := ibc.WalletAmount{ Address: userB.FormattedAddress(), Denom: chainA.Config().Denom, @@ -209,10 +210,10 @@ func TestPacketForwardMiddleware(t *testing.T) { chainDBalance, err := chainD.GetBalance(ctx, userD.FormattedAddress(), thirdHopIBCDenom) require.NoError(t, err) - require.Equal(t, userFunds-transferAmount, chainABalance) - require.Equal(t, int64(0), chainBBalance) - require.Equal(t, int64(0), chainCBalance) - require.Equal(t, transferAmount, chainDBalance) + require.True(t, chainABalance.Equal(initBal.Sub(transferAmount))) + require.True(t, chainBBalance.Equal(zeroBal)) + require.True(t, chainCBalance.Equal(zeroBal)) + require.True(t, chainDBalance.Equal(transferAmount)) firstHopEscrowBalance, err := chainA.GetBalance(ctx, firstHopEscrowAccount, chainA.Config().Denom) require.NoError(t, err) @@ -223,9 +224,9 @@ func TestPacketForwardMiddleware(t *testing.T) { thirdHopEscrowBalance, err := chainC.GetBalance(ctx, thirdHopEscrowAccount, secondHopIBCDenom) require.NoError(t, err) - require.Equal(t, transferAmount, firstHopEscrowBalance) - require.Equal(t, transferAmount, secondHopEscrowBalance) - require.Equal(t, transferAmount, thirdHopEscrowBalance) + require.True(t, firstHopEscrowBalance.Equal(transferAmount)) + require.True(t, secondHopEscrowBalance.Equal(transferAmount)) + require.True(t, thirdHopEscrowBalance.Equal(transferAmount)) }) t.Run("multi-hop denom unwind d->c->b->a", func(t *testing.T) { @@ -284,10 +285,10 @@ func TestPacketForwardMiddleware(t *testing.T) { chainABalance, err := chainA.GetBalance(ctx, userA.FormattedAddress(), chainA.Config().Denom) require.NoError(t, err) - require.Equal(t, int64(0), chainDBalance) - require.Equal(t, int64(0), chainCBalance) - require.Equal(t, int64(0), chainBBalance) - require.Equal(t, userFunds, chainABalance) + require.True(t, chainDBalance.Equal(zeroBal)) + require.True(t, chainCBalance.Equal(zeroBal)) + require.True(t, chainBBalance.Equal(zeroBal)) + require.True(t, chainABalance.Equal(initBal)) // assert balances for IBC escrow accounts firstHopEscrowBalance, err := chainA.GetBalance(ctx, firstHopEscrowAccount, chainA.Config().Denom) @@ -299,9 +300,9 @@ func TestPacketForwardMiddleware(t *testing.T) { thirdHopEscrowBalance, err := chainC.GetBalance(ctx, thirdHopEscrowAccount, secondHopIBCDenom) require.NoError(t, err) - require.Equal(t, int64(0), firstHopEscrowBalance) - require.Equal(t, int64(0), secondHopEscrowBalance) - require.Equal(t, int64(0), thirdHopEscrowBalance) + require.True(t, firstHopEscrowBalance.Equal(zeroBal)) + require.True(t, secondHopEscrowBalance.Equal(zeroBal)) + require.True(t, thirdHopEscrowBalance.Equal(zeroBal)) }) t.Run("forward ack error refund", func(t *testing.T) { @@ -344,9 +345,9 @@ func TestPacketForwardMiddleware(t *testing.T) { chainCBalance, err := chainC.GetBalance(ctx, userC.FormattedAddress(), secondHopIBCDenom) require.NoError(t, err) - require.Equal(t, userFunds, chainABalance) - require.Equal(t, int64(0), chainBBalance) - require.Equal(t, int64(0), chainCBalance) + require.True(t, chainABalance.Equal(initBal)) + require.True(t, chainBBalance.Equal(zeroBal)) + require.True(t, chainCBalance.Equal(zeroBal)) // assert balances for IBC escrow accounts firstHopEscrowBalance, err := chainA.GetBalance(ctx, firstHopEscrowAccount, chainA.Config().Denom) @@ -355,8 +356,8 @@ func TestPacketForwardMiddleware(t *testing.T) { secondHopEscrowBalance, err := chainB.GetBalance(ctx, secondHopEscrowAccount, firstHopIBCDenom) require.NoError(t, err) - require.Equal(t, int64(0), firstHopEscrowBalance) - require.Equal(t, int64(0), secondHopEscrowBalance) + require.True(t, firstHopEscrowBalance.Equal(zeroBal)) + require.True(t, secondHopEscrowBalance.Equal(zeroBal)) }) t.Run("forward timeout refund", func(t *testing.T) { @@ -401,9 +402,9 @@ func TestPacketForwardMiddleware(t *testing.T) { chainCBalance, err := chainC.GetBalance(ctx, userC.FormattedAddress(), secondHopIBCDenom) require.NoError(t, err) - require.Equal(t, userFunds, chainABalance) - require.Equal(t, int64(0), chainBBalance) - require.Equal(t, int64(0), chainCBalance) + require.True(t, chainABalance.Equal(initBal)) + require.True(t, chainBBalance.Equal(zeroBal)) + require.True(t, chainCBalance.Equal(zeroBal)) firstHopEscrowBalance, err := chainA.GetBalance(ctx, firstHopEscrowAccount, chainA.Config().Denom) require.NoError(t, err) @@ -411,8 +412,8 @@ func TestPacketForwardMiddleware(t *testing.T) { secondHopEscrowBalance, err := chainB.GetBalance(ctx, secondHopEscrowAccount, firstHopIBCDenom) require.NoError(t, err) - require.Equal(t, int64(0), firstHopEscrowBalance) - require.Equal(t, int64(0), secondHopEscrowBalance) + require.True(t, firstHopEscrowBalance.Equal(zeroBal)) + require.True(t, secondHopEscrowBalance.Equal(zeroBal)) }) t.Run("multi-hop ack error refund", func(t *testing.T) { @@ -473,10 +474,10 @@ func TestPacketForwardMiddleware(t *testing.T) { chainABalance, err := chainA.GetBalance(ctx, userA.FormattedAddress(), chainA.Config().Denom) require.NoError(t, err) - require.Equal(t, userFunds, chainABalance) - require.Equal(t, int64(0), chainBBalance) - require.Equal(t, int64(0), chainCBalance) - require.Equal(t, int64(0), chainDBalance) + require.True(t, chainABalance.Equal(initBal)) + require.True(t, chainBBalance.Equal(zeroBal)) + require.True(t, chainCBalance.Equal(zeroBal)) + require.True(t, chainDBalance.Equal(zeroBal)) // assert balances for IBC escrow accounts firstHopEscrowBalance, err := chainA.GetBalance(ctx, firstHopEscrowAccount, chainA.Config().Denom) @@ -488,9 +489,9 @@ func TestPacketForwardMiddleware(t *testing.T) { thirdHopEscrowBalance, err := chainC.GetBalance(ctx, thirdHopEscrowAccount, secondHopIBCDenom) require.NoError(t, err) - require.Equal(t, int64(0), firstHopEscrowBalance) - require.Equal(t, int64(0), secondHopEscrowBalance) - require.Equal(t, int64(0), thirdHopEscrowBalance) + require.True(t, firstHopEscrowBalance.Equal(zeroBal)) + require.True(t, secondHopEscrowBalance.Equal(zeroBal)) + require.True(t, thirdHopEscrowBalance.Equal(zeroBal)) }) t.Run("multi-hop through native chain ack error refund", func(t *testing.T) { @@ -533,8 +534,8 @@ func TestPacketForwardMiddleware(t *testing.T) { baEscrowBalance, err := chainB.GetBalance(ctx, transfertypes.GetEscrowAddress(baChan.PortID, baChan.ChannelID).String(), chainB.Config().Denom) require.NoError(t, err) - require.Equal(t, transferAmount, chainABalance) - require.Equal(t, transferAmount, baEscrowBalance) + require.True(t, chainABalance.Equal(transferAmount)) + require.True(t, baEscrowBalance.Equal(transferAmount)) // Send a malformed packet with invalid receiver address from Chain A->Chain B->Chain C->Chain D // This should succeed in the first hop and second hop, then fail to make the third hop. @@ -593,10 +594,10 @@ func TestPacketForwardMiddleware(t *testing.T) { chainABalance, err = chainA.GetBalance(ctx, userA.FormattedAddress(), baIBCDenom) require.NoError(t, err) - require.Equal(t, transferAmount, chainABalance) - require.Equal(t, userFunds-transferAmount, chainBBalance) - require.Equal(t, int64(0), chainCBalance) - require.Equal(t, int64(0), chainDBalance) + require.True(t, chainABalance.Equal(transferAmount)) + require.True(t, chainBBalance.Equal(initBal.Sub(transferAmount))) + require.True(t, chainCBalance.Equal(zeroBal)) + require.True(t, chainDBalance.Equal(zeroBal)) // assert balances for IBC escrow accounts cdEscrowBalance, err := chainC.GetBalance(ctx, transfertypes.GetEscrowAddress(cdChan.PortID, cdChan.ChannelID).String(), bcIBCDenom) @@ -608,14 +609,13 @@ func TestPacketForwardMiddleware(t *testing.T) { baEscrowBalance, err = chainB.GetBalance(ctx, transfertypes.GetEscrowAddress(baChan.PortID, baChan.ChannelID).String(), chainB.Config().Denom) require.NoError(t, err) - require.Equal(t, transferAmount, baEscrowBalance) - require.Equal(t, int64(0), bcEscrowBalance) - require.Equal(t, int64(0), cdEscrowBalance) + require.True(t, baEscrowBalance.Equal(transferAmount)) + require.True(t, bcEscrowBalance.Equal(zeroBal)) + require.True(t, cdEscrowBalance.Equal(zeroBal)) }) t.Run("forward a->b->a", func(t *testing.T) { // Send packet from Chain A->Chain B->Chain A - userABalance, err := chainA.GetBalance(ctx, userA.FormattedAddress(), chainA.Config().Denom) require.NoError(t, err, "failed to get user a balance") @@ -655,7 +655,7 @@ func TestPacketForwardMiddleware(t *testing.T) { chainBBalance, err := chainB.GetBalance(ctx, userB.FormattedAddress(), firstHopIBCDenom) require.NoError(t, err) - require.Equal(t, userABalance, chainABalance) - require.Equal(t, userBBalance, chainBBalance) + require.True(t, chainABalance.Equal(userABalance)) + require.True(t, chainBBalance.Equal(userBBalance)) }) } diff --git a/examples/ibc/wasm/sample_contracts/ibc_reflect.wasm b/examples/ibc/wasm/sample_contracts/ibc_reflect.wasm new file mode 100644 index 000000000..9c715dba0 Binary files /dev/null and b/examples/ibc/wasm/sample_contracts/ibc_reflect.wasm differ diff --git a/examples/ibc/wasm/sample_contracts/ibc_reflect_send.wasm b/examples/ibc/wasm/sample_contracts/ibc_reflect_send.wasm new file mode 100644 index 000000000..0bc7112b3 Binary files /dev/null and b/examples/ibc/wasm/sample_contracts/ibc_reflect_send.wasm differ diff --git a/examples/ibc/wasm/sample_contracts/icq.wasm b/examples/ibc/wasm/sample_contracts/icq.wasm new file mode 100644 index 000000000..3721d42af Binary files /dev/null and b/examples/ibc/wasm/sample_contracts/icq.wasm differ diff --git a/examples/ibc/wasm/sample_contracts/reflect.wasm b/examples/ibc/wasm/sample_contracts/reflect.wasm new file mode 100644 index 000000000..4e8057737 Binary files /dev/null and b/examples/ibc/wasm/sample_contracts/reflect.wasm differ diff --git a/examples/ibc/wasm/wasm_ibc_test.go b/examples/ibc/wasm/wasm_ibc_test.go new file mode 100644 index 000000000..5bd2c034c --- /dev/null +++ b/examples/ibc/wasm/wasm_ibc_test.go @@ -0,0 +1,221 @@ +package wasm_test + +import ( + "context" + "fmt" + "testing" + "time" + + "cosmossdk.io/math" + "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos/wasm" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v7/testreporter" + "github.com/strangelove-ventures/interchaintest/v7/testutil" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" +) + +func TestWasmIbc(t *testing.T) { + if testing.Short() { + t.Skip("skipping in short mode") + } + + ctx := context.Background() + + // Chain Factory + cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ + {Name: "juno", ChainName: "juno1", Version: "latest", ChainConfig: ibc.ChainConfig{ + GasPrices: "0.00ujuno", + EncodingConfig: wasm.WasmEncoding(), + }}, + {Name: "juno", ChainName: "juno2", Version: "latest", ChainConfig: ibc.ChainConfig{ + GasPrices: "0.00ujuno", + EncodingConfig: wasm.WasmEncoding(), + }}, + }) + + chains, err := cf.Chains(t.Name()) + require.NoError(t, err) + juno1, juno2 := chains[0], chains[1] + + // Relayer Factory + client, network := interchaintest.DockerSetup(t) + r := interchaintest.NewBuiltinRelayerFactory(ibc.CosmosRly, zaptest.NewLogger(t)).Build( + t, client, network) + + // Prep Interchain + const ibcPath = "wasmpath" + ic := interchaintest.NewInterchain(). + AddChain(juno1). + AddChain(juno2). + AddRelayer(r, "relayer"). + AddLink(interchaintest.InterchainLink{ + Chain1: juno1, + Chain2: juno2, + Relayer: r, + Path: ibcPath, + }) + + // Log location + f, err := interchaintest.CreateLogFile(fmt.Sprintf("wasm_ibc_test_%d.json", time.Now().Unix())) + require.NoError(t, err) + // Reporter/logs + rep := testreporter.NewReporter(f) + eRep := rep.RelayerExecReporter(t) + + // Build interchain + require.NoError(t, ic.Build(ctx, eRep, interchaintest.InterchainBuildOptions{ + TestName: t.Name(), + Client: client, + NetworkID: network, + BlockDatabaseFile: interchaintest.DefaultBlockDatabaseFilepath(), + SkipPathCreation: false, + })) + t.Cleanup(func() { + _ = ic.Close() + }) + + // Create and Fund User Wallets + initBal := math.NewInt(100_000_000) + users := interchaintest.GetAndFundTestUsers(t, ctx, "default", initBal.Int64(), juno1, juno2) + juno1User := users[0] + juno2User := users[1] + + err = testutil.WaitForBlocks(ctx, 2, juno1, juno2) + require.NoError(t, err) + + juno1UserBalInitial, err := juno1.GetBalance(ctx, juno1User.FormattedAddress(), juno1.Config().Denom) + require.NoError(t, err) + require.True(t, juno1UserBalInitial.Equal(initBal)) + + juno2UserBalInitial, err := juno2.GetBalance(ctx, juno2User.FormattedAddress(), juno2.Config().Denom) + require.NoError(t, err) + require.True(t, juno2UserBalInitial.Equal(initBal)) + + // Start the relayer + err = r.StartRelayer(ctx, eRep, ibcPath) + require.NoError(t, err) + + t.Cleanup( + func() { + err := r.StopRelayer(ctx, eRep) + if err != nil { + t.Logf("an error occured while stopping the relayer: %s", err) + } + }, + ) + + juno1Chain := juno1.(*cosmos.CosmosChain) + juno2Chain := juno2.(*cosmos.CosmosChain) + + // Store ibc_reflect_send.wasm contract + ibcReflectSendCodeId, err := juno1Chain.StoreContract( + ctx, juno1User.KeyName(), "sample_contracts/ibc_reflect_send.wasm") + require.NoError(t, err) + + // Instantiate ibc_reflect_send.wasm contract + ibcReflectSendContractAddr, err := juno1Chain.InstantiateContract( + ctx, juno1User.KeyName(), ibcReflectSendCodeId, "{}", true) + require.NoError(t, err) + + // Store reflect.wasm contract + reflectCodeId, err := juno2Chain.StoreContract( + ctx, juno2User.KeyName(), "sample_contracts/reflect.wasm") + require.NoError(t, err) + + // Instantiate reflect.wasm contract + _, err = juno2Chain.InstantiateContract( + ctx, juno2User.KeyName(), reflectCodeId, "{}", true) + require.NoError(t, err) + + // Store ibc_reflect.wasm contract + ibcReflectCodeId, err := juno2Chain.StoreContract( + ctx, juno2User.KeyName(), "sample_contracts/ibc_reflect.wasm") + require.NoError(t, err) + + // Instantiate ibc_reflect_send.wasm contract + initMsg := "{\"reflect_code_id\":" + reflectCodeId + "}" + ibcReflectContractAddr, err := juno2Chain.InstantiateContract( + ctx, juno2User.KeyName(), ibcReflectCodeId, initMsg, true) + require.NoError(t, err) + + err = testutil.WaitForBlocks(ctx, 2, juno1, juno2) + require.NoError(t, err) + + // Set up channel + ibcReflectSendPortId := "wasm." + ibcReflectSendContractAddr + ibcReflectPortId := "wasm." + ibcReflectContractAddr + err = r.CreateChannel(ctx, eRep, ibcPath, ibc.CreateChannelOptions{ + SourcePortName: ibcReflectSendPortId, + DestPortName: ibcReflectPortId, + Order: ibc.Ordered, + Version: "ibc-reflect-v1", + }) + require.NoError(t, err) + + // Wait for the channel to get set up and whoami message to exchange + err = testutil.WaitForBlocks(ctx, 10, juno1, juno2) + require.NoError(t, err) + + // Get contract channel + juno1ChannelInfo, err := r.GetChannels(ctx, eRep, juno1.Config().ChainID) + require.NoError(t, err) + juno1ChannelID := juno1ChannelInfo[len(juno1ChannelInfo)-1].ChannelID + + // Query ibc_reflect_send contract on Juno1 for remote address (populated via ibc) + queryMsg := ReflectSendQueryMsg{Account: &AccountQuery{ChannelID: juno1ChannelID}} + var ibcReflectSendResponse IbcReflectSendResponseData + err = juno1Chain.QueryContract(ctx, ibcReflectSendContractAddr, queryMsg, &ibcReflectSendResponse) + require.NoError(t, err) + require.NotEmpty(t, ibcReflectSendResponse.Data.RemoteAddr) + + // Query ibc_reflect contract on Juno2 for local account address + var ibcReflectResponse IbcReflectResponseData + err = juno2Chain.QueryContract(ctx, ibcReflectContractAddr, queryMsg, &ibcReflectResponse) + require.NoError(t, err) + require.NotEmpty(t, ibcReflectResponse.Data.Account) + + // Verify that these addresses match, a match is a successful test run + // - ibc_reflect_send contract (Juno1) remote address (retrieved via ibc) + // - ibc_reflect contract (Juno2) account address populated locally + require.Equal(t, ibcReflectSendResponse.Data.RemoteAddr, ibcReflectResponse.Data.Account) +} + +type ReflectSendQueryMsg struct { + Admin *struct{} `json:"admin,omitempty"` + ListAccounts *struct{} `json:"list_accounts,omitempty"` + Account *AccountQuery `json:"account,omitempty"` +} + +type AccountQuery struct { + ChannelID string `json:"channel_id"` +} + +type Coin struct { + Denom string `json:"denom"` // type, eg. "ATOM" + Amount string `json:"amount"` // string encoing of decimal value, eg. "12.3456" +} + +type Coins []Coin + +type IbcReflectSendAccountResponse struct { + LastUpdateTime uint64 `json:"last_update_time,string"` + RemoteAddr string `json:"remote_addr"` + RemoteBalance Coins `json:"remote_balance"` +} + +// ibc_reflect_send response data +type IbcReflectSendResponseData struct { + Data IbcReflectSendAccountResponse `json:"data"` +} + +type IbcReflectAccountResponse struct { + Account string `json:"account"` +} + +// ibc_reflect response data +type IbcReflectResponseData struct { + Data IbcReflectAccountResponse `json:"data"` +} diff --git a/examples/ibc/wasm/wasm_icq_test.go b/examples/ibc/wasm/wasm_icq_test.go new file mode 100644 index 000000000..ebc90eabb --- /dev/null +++ b/examples/ibc/wasm/wasm_icq_test.go @@ -0,0 +1,406 @@ +package wasm + +import ( + "context" + "encoding/base64" + "encoding/hex" + "encoding/json" + "fmt" + "strconv" + "testing" + "time" + + "cosmossdk.io/math" + "github.com/strangelove-ventures/interchaintest/v7" + cosmosChain "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos/wasm" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" + "github.com/strangelove-ventures/interchaintest/v7/relayer" + "github.com/strangelove-ventures/interchaintest/v7/testreporter" + "github.com/strangelove-ventures/interchaintest/v7/testutil" + "github.com/stretchr/testify/require" + "go.uber.org/zap" + "go.uber.org/zap/zaptest" +) + +// TestInterchainQueriesWASM is a test case that performs a round trip query from an ICQ wasm contract <> ICQ module. +// On the sender chain, CosmWasm capability is required to instantiate/execute the smart contract. On the receiver chain, +// the ICQ module is required to be present in order to receive interchain queries. +func TestInterchainQueriesWASM(t *testing.T) { + //TODO (1): force relayer to use specific versions of the chains configured in the file. + //os.Setenv("IBCTEST_CONFIGURED_CHAINS", "./icq_wasm_configured_chains.yaml") + + //TODO (2): use Juno as sender "ghcr.io/strangelove-ventures/heighliner/juno:v10.1.0" + //and Strangelove's icqd (or another chain with ICQ module present) as receiver. + + logger := zaptest.NewLogger(t) + + if testing.Short() { + t.Skip() + } + + client, network := interchaintest.DockerSetup(t) + f, err := interchaintest.CreateLogFile(fmt.Sprintf("wasm_ibc_test_%d.json", time.Now().Unix())) + require.NoError(t, err) + rep := testreporter.NewReporter(f) + eRep := rep.RelayerExecReporter(t) + ctx := context.Background() + contractFilePath := "sample_contracts/icq.wasm" //Contract that will be initialized on chain + + wasmImage := ibc.DockerImage{ + Repository: "ghcr.io/strangelove-ventures/heighliner/wasmd", + Version: "v0.0.1", + UidGid: dockerutil.GetHeighlinerUserString(), + } + + genesisAllowICQ := map[string]interface{}{ + "interchainquery": map[string]interface{}{ + "host_port": "icqhost", + "params": map[string]interface{}{ + "host_enabled": true, + "allow_queries": []interface{}{"/cosmos.bank.v1beta1.Query/AllBalances"}, + }, + }, + } + + minVal := 1 + cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ + { + ChainName: "sender", + NumValidators: &minVal, + ChainConfig: ibc.ChainConfig{ + Type: "cosmos", + Name: "sender", + ChainID: "sender", + Images: []ibc.DockerImage{wasmImage}, + Bin: "wasmd", + Bech32Prefix: "wasm", + Denom: "uatom", + GasPrices: "0.00uatom", + TrustingPeriod: "300h", + GasAdjustment: 1.1, + EncodingConfig: wasm.WasmEncoding(), + ModifyGenesis: modifyGenesisAtPath(genesisAllowICQ, "app_state"), + }}, + { + ChainName: "receiver", + NumValidators: &minVal, + ChainConfig: ibc.ChainConfig{ + Type: "cosmos", + Name: "receiver", + ChainID: "receiver", + Images: []ibc.DockerImage{wasmImage}, + Bin: "wasmd", + Bech32Prefix: "wasm", + Denom: "uatom", + GasPrices: "0.00uatom", + TrustingPeriod: "300h", + GasAdjustment: 1.1, + EncodingConfig: wasm.WasmEncoding(), + ModifyGenesis: modifyGenesisAtPath(genesisAllowICQ, "app_state"), + }}, + }) + + chains, err := cf.Chains(t.Name()) + require.NoError(t, err) + chain1, chain2 := chains[0], chains[1] + + // Get a relayer instance + r := interchaintest.NewBuiltinRelayerFactory( + ibc.CosmosRly, + logger, + relayer.RelayerOptionExtraStartFlags{Flags: []string{"-p", "events", "-b", "100"}}, + ).Build(t, client, network) + + // Build the network; spin up the chains and configure the relayer + const pathName = "test1-test2" + const relayerName = "relayer" + + ic := interchaintest.NewInterchain(). + AddChain(chain1). + AddChain(chain2). + AddRelayer(r, relayerName). + AddLink(interchaintest.InterchainLink{ + Chain1: chain1, + Chain2: chain2, + Relayer: r, + Path: pathName, + }) + + logger.Info("ic.Build()") + require.NoError(t, ic.Build(ctx, eRep, interchaintest.InterchainBuildOptions{ + TestName: t.Name(), + Client: client, + NetworkID: network, + // BlockDatabaseFile: interchaintest.DefaultBlockDatabaseFilepath(), + SkipPathCreation: false, + })) + + // Wait a few blocks for user accounts to be created on chain + logger.Info("wait for user accounts") + err = testutil.WaitForBlocks(ctx, 5, chain1, chain2) + require.NoError(t, err) + + // Fund user accounts so we can query balances + chain1UserAmt := math.NewInt(10_000_000_000) + chain2UserAmt := math.NewInt(99_999_999_999) + chain1User := interchaintest.GetAndFundTestUsers(t, ctx, t.Name(), chain1UserAmt.Int64(), chain1)[0] + chain2User := interchaintest.GetAndFundTestUsers(t, ctx, t.Name(), chain2UserAmt.Int64(), chain2)[0] + + err = testutil.WaitForBlocks(ctx, 5, chain1, chain2) + require.NoError(t, err) + + chain1UserAddress := chain1User.FormattedAddress() + require.NotEmpty(t, chain1UserAddress) + + chain2UserAddress := chain2User.FormattedAddress() + logger.Info("Address", zap.String("chain 2 user", chain2UserAddress)) + require.NotEmpty(t, chain2UserAddress) + + chain1UserBalInitial, err := chain1.GetBalance(ctx, chain1UserAddress, chain1.Config().Denom) + require.NoError(t, err) + require.True(t, chain1UserBalInitial.Equal(chain1UserAmt)) + + chain2UserBalInitial, err := chain2.GetBalance(ctx, chain2UserAddress, chain2.Config().Denom) + require.NoError(t, err) + require.True(t, chain2UserBalInitial.Equal(chain2UserAmt)) + + logger.Info("instantiating contract") + initMessage := "{\"default_timeout\": 1000}" + chain1CChain := chain1.(*cosmosChain.CosmosChain) + + wasmIcqCodeId, err := chain1CChain.StoreContract(ctx, chain1User.KeyName(), contractFilePath) + require.NoError(t, err) + err = testutil.WaitForBlocks(ctx, 5, chain1, chain2) + require.NoError(t, err) + + //Instantiate the smart contract on the test chain, facilitating testing of ICQ WASM functionality + contractAddr, err := chain1CChain.InstantiateContract(ctx, chain1User.KeyName(), wasmIcqCodeId, initMessage, true) + require.NoError(t, err) + logger.Info("icq contract deployed", zap.String("contractAddr", contractAddr)) + + err = testutil.WaitForBlocks(ctx, 5, chain1, chain2) + require.NoError(t, err) + + icqWasmPortId := "wasm." + contractAddr + destPort := "icqhost" + // Create channel between icq wasm contract <> icq module. + err = r.CreateChannel(ctx, eRep, pathName, ibc.CreateChannelOptions{ + SourcePortName: icqWasmPortId, + DestPortName: destPort, + Order: ibc.Unordered, + Version: "icq-1", + }) + require.NoError(t, err) + err = testutil.WaitForBlocks(ctx, 5, chain1, chain2) + require.NoError(t, err) + + // Query for the recently created channel-id. + chain2Channels, err := r.GetChannels(ctx, eRep, chain2.Config().ChainID) + require.NoError(t, err) + + for _, c1 := range chain2Channels { + logger.Info("Channel", zap.String("Info", fmt.Sprintf("Channel ID: %s, Port ID: %s, Version: %s, Counterparty Channel ID: %s, Counterparty Port ID: %s", c1.ChannelID, c1.PortID, c1.Version, c1.Counterparty.ChannelID, c1.Counterparty.PortID))) + } + + require.NoError(t, err) + channel := FirstWithPort(chain2Channels, destPort) + require.NotNil(t, channel) + require.NotEmpty(t, channel.Counterparty.ChannelID) + + // Start the relayer and set the cleanup function. + err = r.StartRelayer(ctx, eRep, pathName) + require.NoError(t, err) + + t.Cleanup( + func() { + err := r.StopRelayer(ctx, eRep) + if err != nil { + t.Logf("an error occured while stopping the relayer: %s", err) + } + }, + ) + + // Wait a few blocks for the relayer to start. + err = testutil.WaitForBlocks(ctx, 5, chain1, chain2) + require.NoError(t, err) + logger.Info("channel", zap.String("info", fmt.Sprintf("Channel Port: %s, Channel ID: %s, Counterparty Channel ID: %s", channel.PortID, channel.ChannelID, channel.Counterparty.ChannelID))) + + //Query for the balances of an account on the counterparty chain using interchain queries. + //Get the base64 encoded chain2 user address in the format required by the AllBalances query + chain2UserAddrQuery := fmt.Sprintf(`{"address":"%s"}`, chain2UserAddress) + chain2UserAddrQueryB64 := base64.StdEncoding.EncodeToString([]byte(chain2UserAddrQuery)) + + // Get current block height for chain 2 + cmd := []string{chain2.Config().Bin, "status", + "--node", chain2.GetRPCAddress(), + "--home", chain2.HomeDir(), + } + stdout, _, err := chain2.Exec(ctx, cmd, nil) + require.NoError(t, err) + blockHeightC2 := &statusResults{} + err = json.Unmarshal(stdout, blockHeightC2) + require.NoError(t, err) + + //and chain 1 + // Get current block height + cmd = []string{chain1.Config().Bin, "status", + "--node", chain1.GetRPCAddress(), + "--home", chain1.HomeDir(), + } + stdout, _, err = chain1.Exec(ctx, cmd, nil) + require.NoError(t, err) + blockHeightC1 := &statusResults{} + err = json.Unmarshal(stdout, blockHeightC1) + require.NoError(t, err) + + logger.Info("Chain height", zap.String("Chain 1", blockHeightC1.SyncInfo.Height), zap.String("Chain 2", blockHeightC2.SyncInfo.Height)) + + query := executeQuery{ + Query: msgQuery{ + Timeout: 1000, + Channel: channel.ChannelID, + Requests: []RequestQuery{ //can't use abci.RequestQuery since Height/Prove JSON fields are omitted which causes contract errors + { + Height: 0, + Prove: false, + Path: "/cosmos.bank.v1beta1.Query/AllBalances", + Data: []byte(chain2UserAddrQueryB64), + }, + }, + }, + } + + b, err := json.Marshal(query) + require.NoError(t, err) + msg := string(b) + logger.Info("Executing msg ->", zap.String("msg", msg)) + + //Query the contract on chain 1. The contract makes an interchain query to chain 2 to get the chain 2 user's balance. + hash, err := chain1CChain.ExecuteContract(ctx, chain1User.KeyName(), contractAddr, msg) + + require.NoError(t, err) + + // Check the results from the interchain query above. + cmd = []string{chain1.Config().Bin, "query", "tx", hash, + "--node", chain1.GetRPCAddress(), + "--home", chain1.HomeDir(), + "--chain-id", chain1.Config().ChainID, + "--output", "json", + } + _, _, err = chain1.Exec(ctx, cmd, nil) + require.NoError(t, err) + + // Wait a few blocks for query to be sent to counterparty. + err = testutil.WaitForBlocks(ctx, 5, chain1, chain2) + require.NoError(t, err) + + // Check the results from the interchain query above. + cmd = []string{chain1.Config().Bin, "query", "wasm", "contract-state", "all", contractAddr, + "--node", chain1.GetRPCAddress(), + "--home", chain1.HomeDir(), + "--chain-id", chain1.Config().ChainID, + "--output", "json", + } + + stdout, _, err = chain1.Exec(ctx, cmd, nil) + require.NoError(t, err) + results := &contractStateResp{} + err = json.Unmarshal(stdout, results) + require.NoError(t, err) + hasIcqQuery := false + + for _, kv := range results.Models { + keyBytes, _ := hex.DecodeString(kv.Key) + valueBytes, err := base64.StdEncoding.DecodeString(kv.Value) + require.NoError(t, err) + if string(keyBytes) == "query_result_counter" { + res, err := strconv.Atoi(string(valueBytes)) + require.NoError(t, err) + if res > 0 { + hasIcqQuery = true + logger.Info("ICQ query result counter", zap.Int("counter", res)) + } + } + } + require.Equal(t, hasIcqQuery, true) +} + +func FirstWithPort(channels []ibc.ChannelOutput, port string) *ibc.ChannelOutput { + for _, channel := range channels { + if channel.PortID == port { + return &channel + } + } + return nil +} + +type RequestQuery struct { + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height"` //do NOT 'omitempty' for JSON field or contract queries will error + Prove bool `protobuf:"varint,4,opt,name=prove,proto3" json:"prove"` //do NOT 'omitempty' for JSON field or contract queries will error +} + +type msgQuery struct { + Channel string `json:"channel"` + Requests []RequestQuery `json:"requests"` + Timeout uint64 `json:"timeout"` +} + +type executeQuery struct { + Query msgQuery `json:"query"` +} + +type kvPair struct { + Key string // hex encoded string + Value string // b64 encoded json +} + +type contractStateResp struct { + Models []kvPair +} + +type statusResults struct { + SyncInfo struct { + Height string `json:"latest_block_height"` + } `json:"SyncInfo"` +} + +func modifyGenesisAtPath(insertedBlock map[string]interface{}, key string) func(ibc.ChainConfig, []byte) ([]byte, error) { + return func(chainConfig ibc.ChainConfig, genbz []byte) ([]byte, error) { + g := make(map[string]interface{}) + if err := json.Unmarshal(genbz, &g); err != nil { + return nil, fmt.Errorf("failed to unmarshal genesis file: %w", err) + } + + //Get the section of the genesis file under the given key (e.g. "app_state") + genesisBlockI, ok := g[key] + if !ok { + return nil, fmt.Errorf("genesis json does not have top level key: %s", key) + } + + blockBytes, mErr := json.Marshal(genesisBlockI) + if mErr != nil { + return nil, fmt.Errorf("genesis json marshal error for block with key: %s", key) + } + + genesisBlock := make(map[string]interface{}) + mErr = json.Unmarshal(blockBytes, &genesisBlock) + if mErr != nil { + return nil, fmt.Errorf("genesis json unmarshal error for block with key: %s", key) + } + + for k, v := range insertedBlock { + genesisBlock[k] = v + } + + g[key] = genesisBlock + out, err := json.Marshal(g) + if err != nil { + return nil, fmt.Errorf("failed to marshal genesis bytes to json: %w", err) + } + return out, nil + } +} diff --git a/examples/polkadot/ics10_grandpa_cw.wasm b/examples/polkadot/ics10_grandpa_cw.wasm index eb4bf8a37..4d921948a 100644 Binary files a/examples/polkadot/ics10_grandpa_cw.wasm and b/examples/polkadot/ics10_grandpa_cw.wasm differ diff --git a/examples/polkadot/polkadot_chain_test.go b/examples/polkadot/polkadot_chain_test.go index 2670ed2f4..2ac8a673b 100644 --- a/examples/polkadot/polkadot_chain_test.go +++ b/examples/polkadot/polkadot_chain_test.go @@ -5,7 +5,8 @@ import ( "fmt" "testing" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "cosmossdk.io/math" + "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/chain/polkadot" "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/strangelove-ventures/interchaintest/v7/testreporter" @@ -41,7 +42,7 @@ func TestPolkadotComposableChainStart(t *testing.T) { { Repository: "seunlanlege/centauri-polkadot", Version: "v0.9.27", - UidGid: "1025:1025", + UidGid: "1000:1000", }, { Repository: "seunlanlege/centauri-parachain", @@ -83,22 +84,24 @@ func TestPolkadotComposableChainStart(t *testing.T) { err = testutil.WaitForBlocks(ctx, 2, chain) require.NoError(t, err, "polkadot chain failed to make blocks") - PARACHAIN_DEFAULT_AMOUNT := 1_152_921_504_606_847_000 - RELAYCHAIN_DEFAULT_AMOUNT := 1_100_000_000_000_000_000 - FAUCET_AMOUNT := 100_000_000_000_000 // set in interchain.go/global + PARACHAIN_DEFAULT_AMOUNT := math.NewInt(1_152_921_504_606_847_000) + RELAYCHAIN_DEFAULT_AMOUNT := math.NewInt(1_100_000_000_000_000_000) + FAUCET_AMOUNT := math.NewInt(100_000_000_000_000_000) // set in interchain.go/global //RELAYER_AMOUNT := 1_000_000_000_000 // set in interchain.go/global // Check the faucet amounts polkadotFaucetAddress, err := polkadotChain.GetAddress(ctx, "faucet") require.NoError(t, err) + polkadotFaucetAmount, err := polkadotChain.GetBalance(ctx, string(polkadotFaucetAddress), polkadotChain.Config().Denom) require.NoError(t, err) fmt.Println("Polkadot faucet amount: ", polkadotFaucetAmount) - require.Equal(t, int64(FAUCET_AMOUNT), polkadotFaucetAmount, "Polkadot faucet amount not expected") + require.True(t, polkadotFaucetAmount.Equal(FAUCET_AMOUNT), "Polkadot faucet amount not expected") + parachainFaucetAmount, err := polkadotChain.GetBalance(ctx, string(polkadotFaucetAddress), "") require.NoError(t, err) fmt.Println("Parachain faucet amount: ", parachainFaucetAmount) - require.Equal(t, int64(FAUCET_AMOUNT), parachainFaucetAmount, "Parachain faucet amount not expected") + require.True(t, parachainFaucetAmount.Equal(FAUCET_AMOUNT), "Parachain faucet amount not expected") // Check alice polkadotAliceAddress, err := polkadotChain.GetAddress(ctx, "alice") @@ -106,11 +109,12 @@ func TestPolkadotComposableChainStart(t *testing.T) { polkadotAliceAmount, err := polkadotChain.GetBalance(ctx, string(polkadotAliceAddress), polkadotChain.Config().Denom) require.NoError(t, err) fmt.Println("Polkadot alice amount: ", polkadotAliceAmount) - require.Equal(t, int64(RELAYCHAIN_DEFAULT_AMOUNT), polkadotAliceAmount, "Relaychain alice amount not expected") + require.True(t, polkadotAliceAmount.Equal(RELAYCHAIN_DEFAULT_AMOUNT), "Relaychain alice amount not expected") + parachainAliceAmount, err := polkadotChain.GetBalance(ctx, string(polkadotAliceAddress), "") require.NoError(t, err) fmt.Println("Parachain alice amount: ", parachainAliceAmount) - require.Equal(t, int64(PARACHAIN_DEFAULT_AMOUNT), parachainAliceAmount, "Parachain alice amount not expected") + require.True(t, parachainAliceAmount.Equal(PARACHAIN_DEFAULT_AMOUNT), "Parachain alice amount not expected") // Check alice stash polkadotAliceStashAddress, err := polkadotChain.GetAddress(ctx, "alicestash") @@ -118,11 +122,12 @@ func TestPolkadotComposableChainStart(t *testing.T) { polkadotAliceStashAmount, err := polkadotChain.GetBalance(ctx, string(polkadotAliceStashAddress), polkadotChain.Config().Denom) require.NoError(t, err) fmt.Println("Polkadot alice stash amount: ", polkadotAliceStashAmount) - require.Equal(t, int64(RELAYCHAIN_DEFAULT_AMOUNT), polkadotAliceStashAmount, "Relaychain alice stash amount not expected") + require.True(t, polkadotAliceStashAmount.Equal(RELAYCHAIN_DEFAULT_AMOUNT), "Relaychain alice stash amount not expected") + parachainAliceStashAmount, err := polkadotChain.GetBalance(ctx, string(polkadotAliceStashAddress), "") require.NoError(t, err) fmt.Println("Parachain alice stash amount: ", parachainAliceStashAmount) - require.Equal(t, int64(PARACHAIN_DEFAULT_AMOUNT), parachainAliceStashAmount, "Parachain alice stash amount not expected") + require.True(t, parachainAliceStashAmount.Equal(PARACHAIN_DEFAULT_AMOUNT), "Parachain alice stash amount not expected") // Check bob polkadotBobAddress, err := polkadotChain.GetAddress(ctx, "bob") @@ -130,11 +135,12 @@ func TestPolkadotComposableChainStart(t *testing.T) { polkadotBobAmount, err := polkadotChain.GetBalance(ctx, string(polkadotBobAddress), polkadotChain.Config().Denom) require.NoError(t, err) fmt.Println("Polkadot bob amount: ", polkadotBobAmount) - require.Equal(t, int64(RELAYCHAIN_DEFAULT_AMOUNT), polkadotBobAmount, "Relaychain bob amount not expected") + require.True(t, polkadotBobAmount.Equal(RELAYCHAIN_DEFAULT_AMOUNT), "Relaychain bob amount not expected") + parachainBobAmount, err := polkadotChain.GetBalance(ctx, string(polkadotBobAddress), "") require.NoError(t, err) fmt.Println("Parachain bob amount: ", parachainBobAmount) - require.Equal(t, int64(PARACHAIN_DEFAULT_AMOUNT), parachainBobAmount, "Parachain bob amount not expected") + require.True(t, parachainBobAmount.Equal(PARACHAIN_DEFAULT_AMOUNT), "Parachain bob amount not expected") // Check bob stash polkadotBobStashAddress, err := polkadotChain.GetAddress(ctx, "bobstash") @@ -142,30 +148,33 @@ func TestPolkadotComposableChainStart(t *testing.T) { polkadotBobStashAmount, err := polkadotChain.GetBalance(ctx, string(polkadotBobStashAddress), polkadotChain.Config().Denom) require.NoError(t, err) fmt.Println("Polkadot bob stash amount: ", polkadotBobStashAmount) - require.Equal(t, int64(RELAYCHAIN_DEFAULT_AMOUNT), polkadotBobStashAmount, "Relaychain bob stash amount not expected") + require.True(t, polkadotBobStashAmount.Equal(RELAYCHAIN_DEFAULT_AMOUNT), "Relaychain bob stash amount not expected") + parachainBobStashAmount, err := polkadotChain.GetBalance(ctx, string(polkadotBobStashAddress), "") require.NoError(t, err) fmt.Println("Parachain bob stash amount: ", parachainBobStashAmount) - require.Equal(t, int64(PARACHAIN_DEFAULT_AMOUNT), parachainBobStashAmount, "Parachain bob stash amount not expected") + require.True(t, parachainBobStashAmount.Equal(PARACHAIN_DEFAULT_AMOUNT), "Parachain bob stash amount not expected") // Fund user1 on both relay and parachain, must wait a block to fund user2 due to same faucet address - fundAmount := int64(12_333_000_000_000) - users1 := interchaintest.GetAndFundTestUsers(t, ctx, "user1", fundAmount, polkadotChain) + fundAmount := math.NewInt(12_333_000_000_000) + users1 := interchaintest.GetAndFundTestUsers(t, ctx, "user1", fundAmount.Int64(), polkadotChain) user1 := users1[0] err = testutil.WaitForBlocks(ctx, 2, chain) require.NoError(t, err, "polkadot chain failed to make blocks") // Fund user2 on both relay and parachain, check that user1 was funded properly - users2 := interchaintest.GetAndFundTestUsers(t, ctx, "user2", fundAmount, polkadotChain) + users2 := interchaintest.GetAndFundTestUsers(t, ctx, "user2", fundAmount.Int64(), polkadotChain) user2 := users2[0] polkadotUser1Amount, err := polkadotChain.GetBalance(ctx, user1.FormattedAddress(), polkadotChain.Config().Denom) require.NoError(t, err) fmt.Println("Polkadot user1 amount: ", polkadotUser1Amount) - require.Equal(t, fundAmount, polkadotUser1Amount, "Initial polkadot user1 amount not expected") + require.True(t, polkadotUser1Amount.Equal(fundAmount), "Initial polkadot user1 amount not expected") + parachainUser1Amount, err := polkadotChain.GetBalance(ctx, user1.FormattedAddress(), "") require.NoError(t, err) fmt.Println("Parachain user1 amount: ", parachainUser1Amount) - require.Equal(t, fundAmount, parachainUser1Amount, "Initial parachain user1 amount not expected") + require.True(t, parachainUser1Amount.Equal(fundAmount), "Initial parachain user1 amount not expected") + err = testutil.WaitForBlocks(ctx, 2, chain) require.NoError(t, err, "polkadot chain failed to make blocks") @@ -173,14 +182,15 @@ func TestPolkadotComposableChainStart(t *testing.T) { polkadotUser2Amount, err := polkadotChain.GetBalance(ctx, user2.FormattedAddress(), polkadotChain.Config().Denom) require.NoError(t, err) fmt.Println("Polkadot user2 amount: ", polkadotUser2Amount) - require.Equal(t, fundAmount, polkadotUser2Amount, "Initial polkadot user2 amount not expected") + require.True(t, polkadotUser2Amount.Equal(fundAmount), "Initial polkadot user2 amount not expected") + parachainUser2Amount, err := polkadotChain.GetBalance(ctx, user2.FormattedAddress(), "") require.NoError(t, err) fmt.Println("Parachain user2 amount: ", parachainUser2Amount) - require.Equal(t, fundAmount, parachainUser2Amount, "Initial parachain user2 amount not expected") + require.True(t, parachainUser2Amount.Equal(fundAmount), "Initial parachain user2 amount not expected") // Transfer 1T units from user1 to user2 on both chains - txAmount := int64(1_000_000_000_000) + txAmount := math.NewInt(1_000_000_000_000) polkadotTxUser1ToUser2 := ibc.WalletAmount{ Address: user2.FormattedAddress(), Amount: txAmount, @@ -203,18 +213,20 @@ func TestPolkadotComposableChainStart(t *testing.T) { polkadotUser1Amount, err = polkadotChain.GetBalance(ctx, user1.FormattedAddress(), polkadotChain.Config().Denom) require.NoError(t, err) fmt.Println("Polkadot user1 amount: ", polkadotUser1Amount) - require.LessOrEqual(t, polkadotUser1Amount, fundAmount-txAmount, "Final polkadot user1 amount not expected") + require.True(t, polkadotUser1Amount.LTE(fundAmount.Sub(txAmount)), "Final polkadot user1 amount not expected") + polkadotUser2Amount, err = polkadotChain.GetBalance(ctx, user2.FormattedAddress(), polkadotChain.Config().Denom) require.NoError(t, err) fmt.Println("Polkadot user2 amount: ", polkadotUser2Amount) - require.Equal(t, fundAmount+txAmount, polkadotUser2Amount, "Final polkadot user2 amount not expected") + require.True(t, fundAmount.Add(txAmount).Equal(polkadotUser2Amount), "Final polkadot user2 amount not expected") + parachainUser1Amount, err = polkadotChain.GetBalance(ctx, user1.FormattedAddress(), "") require.NoError(t, err) fmt.Println("Parachain user1 amount: ", parachainUser1Amount) - require.LessOrEqual(t, parachainUser1Amount, fundAmount-txAmount, "Final parachain user1 amount not expected") + require.True(t, parachainUser1Amount.LTE(fundAmount.Sub(txAmount)), "Final parachain user1 amount not expected") + parachainUser2Amount, err = polkadotChain.GetBalance(ctx, user2.FormattedAddress(), "") require.NoError(t, err) fmt.Println("Parachain user2 amount: ", parachainUser2Amount) - require.Equal(t, fundAmount+txAmount, parachainUser2Amount, "Final parachain user2 amount not expected") - + require.True(t, fundAmount.Add(txAmount).Equal(parachainUser2Amount), "Final parachain user2 amount not expected") } diff --git a/examples/polkadot/push_wasm_client_code_test.go b/examples/polkadot/push_wasm_client_code_test.go index 8ce830174..2f55ae5b7 100644 --- a/examples/polkadot/push_wasm_client_code_test.go +++ b/examples/polkadot/push_wasm_client_code_test.go @@ -4,8 +4,12 @@ import ( "context" "crypto/sha256" "encoding/hex" + "encoding/json" + "fmt" "testing" + "cosmossdk.io/math" + "github.com/icza/dyno" "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v7/ibc" @@ -13,17 +17,13 @@ import ( "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" - //simappparams "github.com/cosmos/cosmos-sdk/simapp/params" ) -// Re-add once feat/wasm-client branch is on ibc-go v6 -/*func WasmClientEncoding() *simappparams.EncodingConfig { - cfg := cosmos.DefaultEncoding() - - wasmclient.RegisterInterfaces(cfg.InterfaceRegistry) - - return &cfg -}*/ +const ( + heightDelta = uint64(20) + votingPeriod = "30s" + maxDepositPeriod = "10s" +) // Spin up a simd chain, push a contract, and get that contract code from chain func TestPushWasmClientCode(t *testing.T) { @@ -47,12 +47,12 @@ func TestPushWasmClientCode(t *testing.T) { configTomlOverrides := make(testutil.Toml) apiOverrides := make(testutil.Toml) - apiOverrides["rpc-max-body-bytes"] = 1350000 + apiOverrides["rpc-max-body-bytes"] = 2_000_000 appTomlOverrides["api"] = apiOverrides rpcOverrides := make(testutil.Toml) - rpcOverrides["max_body_bytes"] = 1350000 - rpcOverrides["max_header_bytes"] = 1400000 + rpcOverrides["max_body_bytes"] = 2_000_000 + rpcOverrides["max_header_bytes"] = 2_100_000 configTomlOverrides["rpc"] = rpcOverrides //mempoolOverrides := make(testutil.Toml) @@ -63,22 +63,14 @@ func TestPushWasmClientCode(t *testing.T) { configFileOverrides["config/config.toml"] = configTomlOverrides cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ - /*{ - Name: "ibc-go-simd", - Version: "feat/wasm-client", - ChainConfig: ibc.ChainConfig{ - GasPrices: "0.00stake", - EncodingConfig: WasmClientEncoding(), - } - },*/ {ChainConfig: ibc.ChainConfig{ Type: "cosmos", Name: "ibc-go-simd", ChainID: "simd", Images: []ibc.DockerImage{ { - Repository: "ibc-go-simd", - Version: "feat-wasm-client", + Repository: "ghcr.io/strangelove-ventures/heighliner/ibc-go-simd", + Version: "feat-wasm-clients", UidGid: "1025:1025", }, }, @@ -91,21 +83,19 @@ func TestPushWasmClientCode(t *testing.T) { //EncodingConfig: WasmClientEncoding(), NoHostMount: true, ConfigFileOverrides: configFileOverrides, + ModifyGenesis: modifyGenesisShortProposals(votingPeriod, maxDepositPeriod), }, }, }) - t.Logf("Calling cf.Chains") chains, err := cf.Chains(t.Name()) require.NoError(t, err) simd := chains[0] - t.Logf("NewInterchain") ic := interchaintest.NewInterchain(). AddChain(simd) - t.Logf("Interchain build options") require.NoError(t, ic.Build(ctx, eRep, interchaintest.InterchainBuildOptions{ TestName: t.Name(), Client: client, @@ -119,27 +109,40 @@ func TestPushWasmClientCode(t *testing.T) { }) // Create and Fund User Wallets - fundAmount := int64(100_000_000) - users := interchaintest.GetAndFundTestUsers(t, ctx, "default", int64(fundAmount), simd) + fundAmount := math.NewInt(10_000_000_000) + users := interchaintest.GetAndFundTestUsers(t, ctx, "default", fundAmount.Int64(), simd) simd1User := users[0] - err = testutil.WaitForBlocks(ctx, 2, simd) - require.NoError(t, err) - simd1UserBalInitial, err := simd.GetBalance(ctx, simd1User.FormattedAddress(), simd.Config().Denom) require.NoError(t, err) - require.Equal(t, fundAmount, simd1UserBalInitial) - - err = testutil.WaitForBlocks(ctx, 2, simd) - require.NoError(t, err) + require.True(t, simd1UserBalInitial.Equal(fundAmount)) simdChain := simd.(*cosmos.CosmosChain) - codeHash, err := simdChain.StoreClientContract(ctx, simd1User.KeyName(), "ics10_grandpa_cw.wasm") - t.Logf("Contract codeHash: %s", codeHash) - require.NoError(t, err) + // Verify a normal user cannot push a wasm light client contract + _, err = simdChain.StoreClientContract(ctx, simd1User.KeyName(), "ics10_grandpa_cw.wasm") + require.ErrorContains(t, err, "invalid authority") - err = testutil.WaitForBlocks(ctx, 5, simd) + proposal := cosmos.TxProposalv1{ + Metadata: "none", + Deposit: "500000000" + simdChain.Config().Denom, // greater than min deposit + Title: "Grandpa Contract", + Summary: "new grandpa contract", + } + + proposalTx, codeHash, err := simdChain.PushNewWasmClientProposal(ctx, simd1User.KeyName(), "ics10_grandpa_cw.wasm", proposal) + require.NoError(t, err, "error submitting new wasm contract proposal tx") + + height, err := simdChain.Height(ctx) + require.NoError(t, err, "error fetching height before submit upgrade proposal") + + err = simdChain.VoteOnProposalAllValidators(ctx, proposalTx.ProposalID, cosmos.ProposalVoteYes) + require.NoError(t, err, "failed to submit votes") + + _, err = cosmos.PollForProposalStatus(ctx, simdChain, height, height+heightDelta, proposalTx.ProposalID, cosmos.ProposalStatusPassed) + require.NoError(t, err, "proposal status did not change to passed in expected number of blocks") + + err = testutil.WaitForBlocks(ctx, 2, simd) require.NoError(t, err) var getCodeQueryMsgRsp GetCodeQueryMsgResponse @@ -155,3 +158,26 @@ func TestPushWasmClientCode(t *testing.T) { type GetCodeQueryMsgResponse struct { Code []byte `json:"code"` } + +func modifyGenesisShortProposals(votingPeriod string, maxDepositPeriod string) func(ibc.ChainConfig, []byte) ([]byte, error) { + return func(chainConfig ibc.ChainConfig, genbz []byte) ([]byte, error) { + g := make(map[string]interface{}) + if err := json.Unmarshal(genbz, &g); err != nil { + return nil, fmt.Errorf("failed to unmarshal genesis file: %w", err) + } + if err := dyno.Set(g, votingPeriod, "app_state", "gov", "params", "voting_period"); err != nil { + return nil, fmt.Errorf("failed to set voting period in genesis json: %w", err) + } + if err := dyno.Set(g, maxDepositPeriod, "app_state", "gov", "params", "max_deposit_period"); err != nil { + return nil, fmt.Errorf("failed to set voting period in genesis json: %w", err) + } + if err := dyno.Set(g, chainConfig.Denom, "app_state", "gov", "params", "min_deposit", 0, "denom"); err != nil { + return nil, fmt.Errorf("failed to set voting period in genesis json: %w", err) + } + out, err := json.Marshal(g) + if err != nil { + return nil, fmt.Errorf("failed to marshal genesis bytes to json: %w", err) + } + return out, nil + } +} diff --git a/go.mod b/go.mod index 550bb66ff..61f53ac67 100644 --- a/go.mod +++ b/go.mod @@ -3,57 +3,68 @@ module github.com/strangelove-ventures/interchaintest/v7 go 1.19 require ( + cosmossdk.io/math v1.0.1 github.com/99designs/keyring v1.2.2 - github.com/BurntSushi/toml v1.2.1 + github.com/BurntSushi/toml v1.3.2 github.com/ChainSafe/go-schnorrkel/1 v0.0.0-00010101000000-000000000000 + github.com/CosmWasm/wasmd v0.40.0-rc.1 github.com/StirlingMarketingGroup/go-namecase v1.0.0 github.com/atotto/clipboard v0.1.4 - github.com/avast/retry-go/v4 v4.3.3 - github.com/centrifuge/go-substrate-rpc-client/v4 v4.0.12 - github.com/cometbft/cometbft v0.37.0 - github.com/cosmos/cosmos-sdk v0.47.1 + github.com/avast/retry-go/v4 v4.3.4 + github.com/cometbft/cometbft v0.37.2 + github.com/cosmos/cosmos-sdk v0.47.4 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/gogoproto v1.4.6 - github.com/cosmos/ibc-go/v7 v7.0.0 + github.com/cosmos/gogoproto v1.4.10 + github.com/cosmos/ibc-go/v7 v7.2.0 github.com/davecgh/go-spew v1.1.1 - github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.0 - github.com/docker/docker v20.10.19+incompatible + github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.1 + github.com/docker/docker v24.0.5+incompatible github.com/docker/go-connections v0.4.0 github.com/gdamore/tcell/v2 v2.6.0 github.com/google/go-cmp v0.5.9 + github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/hashicorp/go-version v1.6.0 github.com/icza/dyno v0.0.0-20220812133438-f0b6f8a18845 - github.com/libp2p/go-libp2p-core v0.20.1 + github.com/libp2p/go-libp2p v0.22.0 + github.com/misko9/go-substrate-rpc-client/v4 v4.0.0-20230413215336-5bd2aea337ae github.com/mr-tron/base58 v1.2.0 github.com/pactus-project/pactus v0.11.0 github.com/pelletier/go-toml v1.9.5 + github.com/pelletier/go-toml/v2 v2.0.9 github.com/rivo/tview v0.0.0-20220307222120-9994674d60a8 - github.com/stretchr/testify v1.8.2 + github.com/spf13/cobra v1.7.0 + github.com/stretchr/testify v1.8.4 + github.com/tyler-smith/go-bip32 v1.0.0 + github.com/tyler-smith/go-bip39 v1.1.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.24.0 - golang.org/x/crypto v0.7.0 - golang.org/x/sync v0.1.0 - golang.org/x/tools v0.7.0 - google.golang.org/grpc v1.54.0 + golang.org/x/crypto v0.11.0 + golang.org/x/sync v0.3.0 + golang.org/x/tools v0.11.0 + google.golang.org/grpc v1.57.0 gopkg.in/yaml.v3 v3.0.1 - modernc.org/sqlite v1.21.1 + modernc.org/sqlite v1.24.0 ) require ( - cloud.google.com/go v0.110.0 // indirect - cloud.google.com/go/compute v1.18.0 // indirect + cloud.google.com/go v0.110.4 // indirect + cloud.google.com/go/compute v1.20.1 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v0.12.0 // indirect - cloud.google.com/go/storage v1.29.0 // indirect + cloud.google.com/go/iam v1.1.0 // indirect + cloud.google.com/go/storage v1.30.1 // indirect cosmossdk.io/api v0.3.1 // indirect cosmossdk.io/core v0.5.1 // indirect cosmossdk.io/depinject v1.0.0-alpha.3 // indirect - cosmossdk.io/errors v1.0.0-beta.7 // indirect - cosmossdk.io/math v1.0.0 // indirect + cosmossdk.io/errors v1.0.0 // indirect + cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca // indirect cosmossdk.io/tools/rosetta v0.2.1 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect + github.com/ComposableFi/go-subkey/v2 v2.0.0-tm03420 // indirect + github.com/CosmWasm/wasmvm v1.2.3 // indirect + github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e // indirect + github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec // indirect github.com/Microsoft/go-winio v0.6.0 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/aws/aws-sdk-go v1.44.203 // indirect @@ -67,13 +78,13 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect - github.com/cometbft/cometbft-db v0.7.0 // indirect + github.com/cometbft/cometbft-db v0.8.0 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/iavl v0.20.0 // indirect - github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab // indirect + github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.12.1 // indirect github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect github.com/creachadair/taskgroup v0.4.2 // indirect @@ -86,11 +97,11 @@ require ( github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect - github.com/docker/distribution v2.8.1+incompatible // indirect + github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/ethereum/go-ethereum v1.10.17 // indirect + github.com/ethereum/go-ethereum v1.10.20 // indirect github.com/felixge/httpsnoop v1.0.2 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gdamore/encoding v1.0.0 // indirect @@ -108,40 +119,43 @@ require ( github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/orderedcode v0.0.1 // indirect + github.com/google/s2a-go v0.1.4 // indirect github.com/google/uuid v1.3.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.7.0 // indirect + github.com/googleapis/gax-go/v2 v2.11.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect - github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.0 // indirect + github.com/hashicorp/go-getter v1.7.1 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect - github.com/hashicorp/golang-lru v0.6.0 // indirect + github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/huandu/skiplist v1.2.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/ipfs/go-cid v0.4.1 // indirect + github.com/ipfs/go-cid v0.2.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect - github.com/klauspost/compress v1.16.4 // indirect - github.com/klauspost/cpuid/v2 v2.2.4 // indirect + github.com/klauspost/compress v1.16.3 // indirect + github.com/klauspost/cpuid/v2 v2.2.3 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/libp2p/go-libp2p v0.27.3 // indirect + github.com/libp2p/go-openssl v0.1.0 // indirect + github.com/linxGnu/grocksdb v1.7.16 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect - github.com/mattn/go-isatty v0.0.18 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mattn/go-pointer v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b // indirect @@ -151,21 +165,20 @@ require ( github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/multiformats/go-base32 v0.1.0 // indirect - github.com/multiformats/go-base36 v0.2.0 // indirect - github.com/multiformats/go-multiaddr v0.9.0 // indirect - github.com/multiformats/go-multibase v0.2.0 // indirect - github.com/multiformats/go-multicodec v0.8.1 // indirect + github.com/multiformats/go-base32 v0.0.4 // indirect + github.com/multiformats/go-base36 v0.1.0 // indirect + github.com/multiformats/go-multiaddr v0.6.0 // indirect + github.com/multiformats/go-multibase v0.1.1 // indirect + github.com/multiformats/go-multicodec v0.5.0 // indirect github.com/multiformats/go-multihash v0.2.1 // indirect - github.com/multiformats/go-varint v0.0.7 // indirect + github.com/multiformats/go-varint v0.0.6 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc2 // indirect - github.com/pelletier/go-toml/v2 v2.0.6 // indirect - github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d // indirect + github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect github.com/pierrec/xxHash v0.1.5 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.14.0 // indirect + github.com/prometheus/client_golang v1.15.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect @@ -174,39 +187,39 @@ require ( github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/rivo/uniseg v0.4.3 // indirect github.com/rs/cors v1.8.3 // indirect + github.com/rs/zerolog v1.29.1 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/sirupsen/logrus v1.9.0 // indirect + github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/spf13/afero v1.9.3 // indirect - github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/cobra v1.6.1 // indirect + github.com/spf13/afero v1.9.5 // indirect + github.com/spf13/cast v1.5.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.15.0 // indirect + github.com/spf13/viper v1.16.0 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tidwall/btree v1.6.0 // indirect github.com/ulikunitz/xz v0.5.11 // indirect - github.com/vedhavyas/go-subkey v1.0.3 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect go.uber.org/atomic v1.10.0 // indirect - golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect - golang.org/x/mod v0.10.0 // indirect - golang.org/x/net v0.8.0 // indirect - golang.org/x/oauth2 v0.5.0 // indirect - golang.org/x/sys v0.7.0 // indirect - golang.org/x/term v0.6.0 // indirect - golang.org/x/text v0.8.0 // indirect + golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.12.0 // indirect + golang.org/x/oauth2 v0.8.0 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/term v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/api v0.110.0 // indirect + google.golang.org/api v0.126.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v2 v2.4.0 // indirect @@ -214,7 +227,7 @@ require ( lukechampine.com/uint128 v1.2.0 // indirect modernc.org/cc/v3 v3.40.0 // indirect modernc.org/ccgo/v3 v3.16.13 // indirect - modernc.org/libc v1.22.3 // indirect + modernc.org/libc v1.22.5 // indirect modernc.org/mathutil v1.5.0 // indirect modernc.org/memory v1.5.0 // indirect modernc.org/opt v0.1.3 // indirect diff --git a/go.sum b/go.sum index cda8312f3..a5f09407d 100644 --- a/go.sum +++ b/go.sum @@ -1,14 +1,12 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= @@ -34,8 +32,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= -cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= +cloud.google.com/go v0.110.4 h1:1JYyxKMN9hd5dR2MYTPWkGUgcoxVVhg0LKNKEo0qvmk= +cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -59,7 +57,6 @@ cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUM cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= -cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= @@ -73,8 +70,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.18.0 h1:FEigFqoDbys2cvFkZ9Fjq4gnHBP55anJ0yQyau2f9oY= -cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= +cloud.google.com/go/compute v1.20.1 h1:6aKEtlUiwEpJzM001l0yFkpXmUVXaN8W+fbkb2AZNbg= +cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= @@ -114,13 +111,12 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v0.12.0 h1:DRtTY29b75ciH6Ov1PHb4/iat2CLCvrOm40Q0a6DFpE= -cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= +cloud.google.com/go/iam v1.1.0 h1:67gSqaPukx7O8WLLHMa0PNs3EBGd2eE4d+psbO/CO94= +cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/longrunning v0.3.0 h1:NjljC+FYPV3uh5/OwWT6pVU+doBqMg2x/rZlE+CamDs= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= @@ -178,8 +174,8 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.29.0 h1:6weCgzRvMg7lzuUurI4697AqIRPU1SvzHhynwpW31jI= -cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= +cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= +cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -191,17 +187,18 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= -cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= -cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= -cosmossdk.io/math v1.0.0 h1:ro9w7eKx23om2tZz/VM2Pf+z2WAbGX1yDQQOJ6iGeJw= -cosmossdk.io/math v1.0.0/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= +cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= +cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= +cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca h1:msenprh2BLLRwNT7zN56TbBHOGk/7ARQckXHxXyvjoQ= +cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca/go.mod h1:PkIAKXZvaxrTRc++z53XMRvFk8AcGGWYHcMIPzVYX9c= +cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= +cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -211,20 +208,26 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMb github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.2 h1:pZd3neh/EmUzWONb35LxQfvuY7kiSXAq3HQd97+XBn0= github.com/99designs/keyring v1.2.2/go.mod h1:wes/FrByc8j7lFOAGLGSNEg8f/PaI3cgTBqhFkHUrPk= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= -github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= -github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/ComposableFi/go-subkey/v2 v2.0.0-tm03420 h1:oknQF/iIhf5lVjbwjsVDzDByupRhga8nhA3NAmwyHDA= +github.com/ComposableFi/go-subkey/v2 v2.0.0-tm03420/go.mod h1:KYkiMX5AbOlXXYfxkrYPrRPV6EbVUALTQh5ptUOJzu8= +github.com/CosmWasm/wasmd v0.40.0-rc.1 h1:prIM2vP1jNh0zgs9seua5BgKdayBgp3FiHtwxFcZSGs= +github.com/CosmWasm/wasmd v0.40.0-rc.1/go.mod h1:uacdue6EGn9JA1TqBNHB3iCe4PCIChuFT23AzIl2VME= +github.com/CosmWasm/wasmvm v1.2.3 h1:OKYlobwmVGbl0eSn0mXoAAjE5hIuXnQCLPjbNd91sVY= +github.com/CosmWasm/wasmvm v1.2.3/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8J7KFtkc= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e h1:ahyvB3q25YnZWly5Gq1ekg6jcmWaGj/vG/MhF4aisoc= +github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:kGUqhHd//musdITWjFvNTHn90WG9bMLBEPQZ17Cmlpw= +github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec h1:1Qb69mGp/UtRPn422BH4/Y4Q3SLUrD9KHuDkm8iodFc= +github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec/go.mod h1:CD8UlnlLDiqb36L110uqiP2iSflVjx9g/3U9hCI4q2U= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= @@ -234,25 +237,19 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/StirlingMarketingGroup/go-namecase v1.0.0 h1:2CzaNtCzc4iNHirR+5ru9OzGg8rQp860gqLBFqRI02Y= github.com/StirlingMarketingGroup/go-namecase v1.0.0/go.mod h1:ZsoSKcafcAzuBx+sndbxHu/RjDcDTrEdT4UvhniHfio= -github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -264,23 +261,14 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= -github.com/avast/retry-go/v4 v4.3.3 h1:G56Bp6mU0b5HE1SkaoVjscZjlQb0oy4mezwY/cGH19w= -github.com/avast/retry-go/v4 v4.3.3/go.mod h1:rg6XFaiuFYII0Xu3RDbZQkxCofFwruZKW8oEF1jpWiU= +github.com/avast/retry-go/v4 v4.3.4 h1:pHLkL7jvCvP317I8Ge+Km2Yhntv3SdkJm7uekkqbKhM= +github.com/avast/retry-go/v4 v4.3.4/go.mod h1:rv+Nla6Vk3/ilU0H51VHddWHiwimzX66yZ0JT6T+UvE= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.203 h1:pcsP805b9acL3wUqa4JR2vg1k2wnItkDYNvfmcy6F+U= github.com/aws/aws-sdk-go v1.44.203/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= -github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= -github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= -github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= -github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= -github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= -github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -292,17 +280,12 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/btcsuite/btcd v0.22.2 h1:vBZ+lGGd1XubpOWO67ITJpAEsICWhA0YzqkcpkgNBfo= -github.com/btcsuite/btcd/btcec/v2 v2.1.2/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ= -github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= +github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -310,9 +293,6 @@ github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInq github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/centrifuge/go-substrate-rpc-client/v4 v4.0.12 h1:DCYWIBOalB0mKKfUg2HhtGgIkBbMA1fnlnkZp7fHB18= -github.com/centrifuge/go-substrate-rpc-client/v4 v4.0.12/go.mod h1:5g1oM4Zu3BOaLpsKQ+O8PAv2kNuq+kPcA1VzFbsSqxE= -github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -332,7 +312,8 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= +github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e h1:0XBUw73chJ1VYSsfvcPvVT7auykAJce9FpRr10L6Qhw= +github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:P13beTBKr5Q18lJe1rIoLUqjM+CB1zYrRg44ZqGuQSA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -348,40 +329,39 @@ github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:z github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= -github.com/cometbft/cometbft v0.37.0 h1:M005vBaSaugvYYmNZwJOopynQSjwLoDTwflnQ/I/eYk= -github.com/cometbft/cometbft v0.37.0/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= -github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= -github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= +github.com/cometbft/cometbft v0.37.2 h1:XB0yyHGT0lwmJlFmM4+rsRnczPlHoAKFX6K8Zgc2/Jc= +github.com/cometbft/cometbft v0.37.2/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= +github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= +github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= -github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= -github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= -github.com/cosmos/cosmos-sdk v0.47.1 h1:HnaCYtaAMWZp1SdlwwE1mPJ8kFlZ/TuEJ/ciNXH6Uno= -github.com/cosmos/cosmos-sdk v0.47.1/go.mod h1:14tO5KQaTrl2q3OxBnDRfue7TRN9zkXS0cLutrSqkOo= +github.com/cosmos/cosmos-sdk v0.47.4 h1:FVUpEprm58nMmBX4xkRdMDaIG5Nr4yy92HZAfGAw9bg= +github.com/cosmos/cosmos-sdk v0.47.4/go.mod h1:R5n+uM7vguVPFap4pgkdvQCT1nVo/OtPwrlAU40rvok= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.6 h1:Ee7z15dWJaGlgM2rWrK8N2IX7PQcuccu8oG68jp5RL4= -github.com/cosmos/gogoproto v1.4.6/go.mod h1:VS/ASYmPgv6zkPKLjR9EB91lwbLHOzaGCirmKKhncfI= +github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= +github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= -github.com/cosmos/ibc-go/v7 v7.0.0 h1:j4kyywlG0hhDmT9FmSaR5iCIka7Pz7kJTxGWY1nlV9Q= -github.com/cosmos/ibc-go/v7 v7.0.0/go.mod h1:BFh8nKWjr5zeR2OZfhkzdgDzj1+KjRn3aJLpwapStj8= -github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab h1:I9ialKTQo7248V827Bba4OuKPmk+FPzmTVHsLXaIJWw= -github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab/go.mod h1:2CwqasX5dSD7Hbp/9b6lhK6BwoBDCBldx7gPKRukR60= +github.com/cosmos/ibc-go/v7 v7.2.0 h1:dx0DLUl7rxdyZ8NiT6UsrbzKOJx/w7s+BOaewFRH6cg= +github.com/cosmos/ibc-go/v7 v7.2.0/go.mod h1:OOcjKIRku/j1Xs1RgKK0yvKRrJ5iFuZYMetR1n3yMlc= +github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= +github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= github.com/cosmos/ledger-cosmos-go v0.12.1 h1:sMBxza5p/rNK/06nBSNmsI/WDqI0pVJFVNihy1Y984w= github.com/cosmos/ledger-cosmos-go v0.12.1/go.mod h1:dhO6kj+Y+AHIOgAe4L9HL/6NDdyyth4q238I9yFpD2g= github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= @@ -392,13 +372,10 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= -github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= -github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -410,13 +387,10 @@ github.com/decred/dcrd/chaincfg/chainhash v1.0.2 h1:rt5Vlq/jM3ZawwiacWjPa+smINyL github.com/decred/dcrd/chaincfg/chainhash v1.0.2/go.mod h1:BpbrGgrPTr3YJYRN3Bm+D9NuaFd+zGyNeIKgrhCXK60= github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= -github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.0 h1:3GIJYXQDAKpLEFriGFN8SbSffak10UXHGdIcFaMPykY= -github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.0/go.mod h1:3s92l0paYkZoIHuj4X93Teg/HB7eGM9x/zokGw+u4mY= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.1 h1:18HurQ6DfHeNvwIjvOmrgr44bPdtVaQAe/WWwHg9goM= +github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.1/go.mod h1:XmyzkaXBy7ZvHdrTAlXAjpog8qKSAWa3ze7yqzWmgmc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= -github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= -github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= @@ -425,25 +399,17 @@ github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KP github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= -github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= -github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.19+incompatible h1:lzEmjivyNHFHMNAFLXORMBXyGIhw/UP4DvJwvyKYq64= -github.com/docker/docker v20.10.19+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v24.0.5+incompatible h1:WmgcE4fxyI6EEXxBRxsHnZXrO1pQ3smi0k/jho4HLeY= +github.com/docker/docker v24.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= -github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= @@ -453,7 +419,6 @@ github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -466,42 +431,31 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ethereum/go-ethereum v1.10.17 h1:XEcumY+qSr1cZQaWsQs5Kck3FHB0V2RiMHPdTBJ+oT8= -github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= -github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= -github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= +github.com/ethereum/go-ethereum v1.10.20 h1:75IW830ClSS40yrQC1ZCMZCt5I+zU16oqId2SiQwdQ4= +github.com/ethereum/go-ethereum v1.10.20/go.mod h1:LWUN82TCHGpxB3En5HVmLLzPD7YSrEUFmFfN1nKkVN0= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko= github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg= github.com/gdamore/tcell/v2 v2.4.1-0.20210905002822-f057f0a857a1/go.mod h1:Az6Jt+M5idSED2YPGtwnfJV0kXohgdCBPmHGSYc1r04= github.com/gdamore/tcell/v2 v2.6.0 h1:OKbluoP9VYmJwZwq/iLb4BxwKcwGthaa1YNBJIyCySg= github.com/gdamore/tcell/v2 v2.6.0/go.mod h1:be9omFATkdr0D9qewWW3d+MEvl5dha+Etb5y65J2H8Y= -github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= -github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= -github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= -github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -517,20 +471,15 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= -github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= -github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= @@ -541,18 +490,14 @@ github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= -github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= -github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= @@ -596,12 +541,10 @@ github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8l github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -620,7 +563,6 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -646,11 +588,12 @@ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20230405160723-4a4c7d95572b h1:Qcx5LM0fSiks9uCyFZwDBUasd3lxd1RM0GYpL+Li5o4= +github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -667,8 +610,8 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ= -github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= +github.com/googleapis/gax-go/v2 v2.11.0 h1:9V9PWXEsWnPpQhu/PeQIkS4eGzMlTLGgt80cUUI8Ki4= +github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -681,10 +624,8 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= @@ -703,13 +644,12 @@ github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIv github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.0 h1:bzrYP+qu/gMrL1au7/aDvkoOVGUJpeKBgbqRHACAFDY= -github.com/hashicorp/go-getter v1.7.0/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= +github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -730,9 +670,8 @@ github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= -github.com/hashicorp/golang-lru v0.6.0/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -741,16 +680,12 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= -github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= -github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/huin/goupnp v1.0.3-0.20220313090229-ca81a64b4204/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= -github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/icza/dyno v0.0.0-20220812133438-f0b6f8a18845 h1:H+uM0Bv88eur3ZSsd2NGKg3YIiuXxwxtlN7HjE66UTU= @@ -758,26 +693,12 @@ github.com/icza/dyno v0.0.0-20220812133438-f0b6f8a18845/go.mod h1:c1tRKs5Tx7E2+u github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= -github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= -github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= -github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= -github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= -github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= -github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= -github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= -github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= -github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= -github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= -github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= -github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= -github.com/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b h1:izTof8BKh/nE1wrKOrloNA5q4odOarjf+Xpe+4qow98= +github.com/ipfs/go-cid v0.2.0 h1:01JTiihFq9en9Vz0lc0VDWvZe/uBonGpzo4THP0vcQ0= +github.com/ipfs/go-cid v0.2.0/go.mod h1:P+HXFDF4CVhaVayiEb4wkAy7zBHxBwsJyt0Y5U6MLro= +github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -795,91 +716,73 @@ github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= -github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.16.4 h1:91KN02FnsOYhuunwU4ssRe8lc2JosWmizWa91B5v1PU= -github.com/klauspost/compress v1.16.4/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/compress v1.16.3 h1:XuJt9zzcnaz6a16/OU53ZjWp/v7/42WcR5t2a0PcNQY= +github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= -github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= -github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= -github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/klauspost/cpuid/v2 v2.2.3 h1:sxCkb+qR91z4vsqw4vGGZlDgPz3G7gjaLyK3V8y70BU= +github.com/klauspost/cpuid/v2 v2.2.3/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= -github.com/libp2p/go-libp2p v0.27.3 h1:tkV/zm3KCZ4R5er9Xcs2pt0YNB4JH0iBfGAtHJdLHRs= -github.com/libp2p/go-libp2p v0.27.3/go.mod h1:FAvvfQa/YOShUYdiSS03IR9OXzkcJXwcNA2FUCh9ImE= -github.com/libp2p/go-libp2p-core v0.20.1 h1:fQz4BJyIFmSZAiTbKV8qoYhEH5Dtv/cVhZbG3Ib/+Cw= -github.com/libp2p/go-libp2p-core v0.20.1/go.mod h1:6zR8H7CvQWgYLsbG4on6oLNSGcyKaYFSEYyDt51+bIY= +github.com/libp2p/go-libp2p v0.22.0 h1:2Tce0kHOp5zASFKJbNzRElvh0iZwdtG5uZheNW8chIw= +github.com/libp2p/go-libp2p v0.22.0/go.mod h1:UDolmweypBSjQb2f7xutPnwZ/fxioLbMBxSjRksxxU4= +github.com/libp2p/go-openssl v0.1.0 h1:LBkKEcUv6vtZIQLVTegAil8jbNpJErQ9AnT+bWV+Ooo= +github.com/libp2p/go-openssl v0.1.0/go.mod h1:OiOxwPpL3n4xlenjx2h7AwSGaFSC/KZvf6gNdOBQMtc= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/linxGnu/grocksdb v1.7.16 h1:Q2co1xrpdkr5Hx3Fp+f+f7fRGhQFQhvi/+226dtLmA8= +github.com/linxGnu/grocksdb v1.7.16/go.mod h1:JkS7pl5qWpGpuVb3bPqTz8nC12X3YtPZT+Xq7+QfQo4= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= -github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= -github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o0= +github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= -github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= @@ -891,6 +794,8 @@ github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= +github.com/misko9/go-substrate-rpc-client/v4 v4.0.0-20230413215336-5bd2aea337ae h1:ZYbJh4TLwfSuSQe6DT/1982SfNNBcmvzrX5FycfSrmo= +github.com/misko9/go-substrate-rpc-client/v4 v4.0.0-20230413215336-5bd2aea337ae/go.mod h1:XexEkZgpnQ3sqUYz84DFoVUcDake6G/tYHrwdbdERhM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -902,10 +807,8 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -913,33 +816,29 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= -github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aGkbLYxPE= -github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI= -github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= -github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4= -github.com/multiformats/go-multiaddr v0.9.0 h1:3h4V1LHIk5w4hJHekMKWALPXErDfz/sggzwC/NcqbDQ= -github.com/multiformats/go-multiaddr v0.9.0/go.mod h1:mI67Lb1EeTOYb8GQfL/7wpIZwc46ElrvzhYnoJOmTT0= -github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g= -github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk= -github.com/multiformats/go-multicodec v0.8.1 h1:ycepHwavHafh3grIbR1jIXnKCsFm0fqsfEOsJ8NtKE8= -github.com/multiformats/go-multicodec v0.8.1/go.mod h1:L3QTQvMIaVBkXOXXtVmYE+LI16i14xuaojr/H7Ai54k= +github.com/multiformats/go-base32 v0.0.4 h1:+qMh4a2f37b4xTNs6mqitDinryCI+tfO2dRVMN9mjSE= +github.com/multiformats/go-base32 v0.0.4/go.mod h1:jNLFzjPZtp3aIARHbJRZIaPuspdH0J6q39uUM5pnABM= +github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4= +github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= +github.com/multiformats/go-multiaddr v0.6.0 h1:qMnoOPj2s8xxPU5kZ57Cqdr0hHhARz7mFsPMIiYNqzg= +github.com/multiformats/go-multiaddr v0.6.0/go.mod h1:F4IpaKZuPP360tOMn2Tpyu0At8w23aRyVqeK0DbFeGM= +github.com/multiformats/go-multibase v0.1.1 h1:3ASCDsuLX8+j4kx58qnJ4YFq/JWTJpCyDW27ztsVTOI= +github.com/multiformats/go-multibase v0.1.1/go.mod h1:ZEjHE+IsUrgp5mhlEAYjMtZwK1k4haNkcaPg9aoe1a8= +github.com/multiformats/go-multicodec v0.5.0 h1:EgU6cBe/D7WRwQb1KmnBvU7lrcFGMggZVTPtOW9dDHs= +github.com/multiformats/go-multicodec v0.5.0/go.mod h1:DiY2HFaEp5EhEXb/iYzVAunmyX/aSFMxq2KMKfWEues= github.com/multiformats/go-multihash v0.2.1 h1:aem8ZT0VA2nCHHk7bPJ1BjUbHNciqZC/d16Vve9l108= github.com/multiformats/go-multihash v0.2.1/go.mod h1:WxoMcYG85AZVQUyRyo9s4wULvW5qrI9vb2Lt6evduFc= -github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8= -github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= +github.com/multiformats/go-varint v0.0.6 h1:gk85QWKxh3TazbLxED/NlDVv8+q+ReFJk7Y2W/KhfNY= +github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= -github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= -github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= @@ -953,13 +852,10 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= @@ -979,7 +875,6 @@ github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= @@ -987,25 +882,19 @@ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnh github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= -github.com/pactus-project/pactus v0.11.0 h1:bPjw//JlAjEZMPXm/jVolvGYy9PeWjykuMe4T//Wo3k= -github.com/pactus-project/pactus v0.11.0/go.mod h1:8Jk+q/hvlm8walmpUMr3jYalGMWMhzSOgmHsIISz3Hs= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= +github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= -github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d h1:htwtWgtQo8YS6JFWWi2DNgY0RwSGJ1ruMoxY6CUUclk= -github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= -github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= +github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= +github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/xxHash v0.1.5 h1:n/jBpwTHiER4xYvK3/CdPVnLDPchj8eTJFFLUb4QHBo= @@ -1016,7 +905,6 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= @@ -1026,8 +914,8 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.15.0 h1:5fCgGYogn0hFdhyhLbw7hEsWxufKtY9klyvdNfFlFhM= +github.com/prometheus/client_golang v1.15.0/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -1036,10 +924,8 @@ github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6T github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= @@ -1054,7 +940,6 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -1066,13 +951,11 @@ github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= github.com/rivo/tview v0.0.0-20220307222120-9994674d60a8 h1:xe+mmCnDN82KhC010l3NfYlA8ZbOuzbXAzSYBa6wbMc= github.com/rivo/tview v0.0.0-20220307222120-9994674d60a8/go.mod h1:WIfMkQNY+oq/mWwtsjOYHIZBuwthioY2srOmljJkTnk= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw= github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -1080,6 +963,9 @@ github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZV github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= +github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1088,35 +974,32 @@ github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0 github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= -github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU= +github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= -github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= +github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= +github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= -github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -1125,11 +1008,8 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= -github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= -github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= -github.com/strangelove-ventures/go-subkey v1.0.7 h1:cOP/Lajg3uxV/tvspu0m6+0Cu+DJgygkEAbx/s+f35I= -github.com/strangelove-ventures/go-subkey v1.0.7/go.mod h1:E34izOIEm+sZ1YmYawYRquqBQWeZBjVB4pF7bMuhc1c= +github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= +github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -1138,7 +1018,7 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.1.5-0.20170601210322-f6abca593680/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1149,44 +1029,36 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= -github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tklauser/go-sysconf v0.3.5 h1:uu3Xl4nkLzQfXNsWn15rPc/HQCJKObbt1dKJeWp3vU4= -github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= -github.com/tklauser/numcpus v0.2.2 h1:oyhllyrScuYI6g+h/zUvNXNp1wy7x8qQy3t/piefldA= -github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= +github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= +github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= +github.com/tyler-smith/go-bip32 v1.0.0 h1:sDR9juArbUgX+bO/iblgZnMPeWY1KZMUC2AFUJdv5KE= +github.com/tyler-smith/go-bip32 v1.0.0/go.mod h1:onot+eHknzV4BVPwrzqY5OoVpyCvnwD7lMawL5aQupE= +github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= +github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1225,11 +1097,11 @@ go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +golang.org/x/crypto v0.0.0-20170613210332-850760c427c5/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1237,23 +1109,17 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= @@ -1264,9 +1130,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc h1:mCRnTeVUjcrhlRmO0VK8a6k6Rrf6TF9htwo2pJVSjIU= +golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1293,8 +1158,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1330,23 +1195,20 @@ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1359,8 +1221,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1386,8 +1248,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= -golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= +golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= +golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1402,8 +1264,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1415,7 +1277,6 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1425,7 +1286,6 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1436,7 +1296,6 @@ golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1450,13 +1309,10 @@ golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1464,17 +1320,13 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1485,10 +1337,10 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1506,25 +1358,24 @@ golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= -golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1534,22 +1385,19 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1574,7 +1422,6 @@ golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1609,8 +1456,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= -golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= +golang.org/x/tools v0.11.0 h1:EMCa6U9S2LtZXLAMoWiR/R8dAQFRqbAitmbJ2UKhoi8= +golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1620,12 +1467,6 @@ golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNq golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= -gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -1675,8 +1516,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.110.0 h1:l+rh0KYUooe9JGbGVx71tbFo4SMbMTXK3I3ia2QSEeU= -google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= +google.golang.org/api v0.126.0 h1:q4GJq+cAdMAC7XP7njvQ4tvohGLiSlytuL4BQxbIZ+o= +google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1693,7 +1534,6 @@ google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= @@ -1701,7 +1541,6 @@ google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= @@ -1797,8 +1636,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44 h1:EfLuoKW5WfkgVdDy7dTK8qSbH37AX5mj/MFh+bGPz14= -google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44/go.mod h1:8B0gmkoRebU8ukX6HP+4wrVQUY1+6PkQ44BSyIlflHA= +google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 h1:Au6te5hbKUV8pIYWHqOUZ1pva5qK/rwbIhoXEUB9Lu8= +google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= +google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 h1:s5YSX+ZH5b5vS9rnpGymvIyMpLRJizowqDlOuyjXnTk= +google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1840,8 +1683,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag= -google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= +google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= +google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1858,15 +1701,14 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -1876,11 +1718,9 @@ gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= -gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1897,8 +1737,7 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= +gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1907,7 +1746,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= +launchpad.net/gocheck v0.0.0-20140225173054-000000000087 h1:Izowp2XBH6Ya6rv+hqbceQyw/gSGoXfH/UPoTGduL54= +launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= lukechampine.com/blake3 v1.1.7 h1:GgRMhmdsuK8+ii6UZFDL8Nb+VyMwadAgcJyfYHxG6n0= lukechampine.com/blake3 v1.1.7/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI= @@ -1918,29 +1758,27 @@ modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw= modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk= modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM= -modernc.org/libc v1.22.3 h1:D/g6O5ftAfavceqlLOFwaZuA5KYafKwmr30A6iSqoyY= -modernc.org/libc v1.22.3/go.mod h1:MQrloYP209xa2zHome2a8HLiLm6k0UT8CoHpV74tOFw= +modernc.org/libc v1.22.5 h1:91BNch/e5B0uPbJFgqbxXuOnxBQjlS//icfQEGmvyjE= +modernc.org/libc v1.22.5/go.mod h1:jj+Z7dTNX8fBScMVNRAYZ/jF91K8fdT2hYMThc3YjBY= modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds= modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/sqlite v1.21.1 h1:GyDFqNnESLOhwwDRaHGdp2jKLDzpyT/rNLglX3ZkMSU= -modernc.org/sqlite v1.21.1/go.mod h1:XwQ0wZPIh1iKb5mkvCJ3szzbhk+tykC8ZWqTRTgYRwI= +modernc.org/sqlite v1.24.0 h1:EsClRIWHGhLTCX44p+Ri/JLD+vFGo0QGjasg2/F9TlI= +modernc.org/sqlite v1.24.0/go.mod h1:OrDj17Mggn6MhE+iPbBNf7RGKODDE9NFT0f3EwDzJqk= modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= -modernc.org/tcl v1.15.1 h1:mOQwiEK4p7HruMZcwKTZPw/aqtGM4aY00uzWhlKKYws= +modernc.org/tcl v1.15.2 h1:C4ybAYCGJw968e+Me18oW55kD/FexcHbqH2xak1ROSY= modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg= modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -modernc.org/z v1.7.0 h1:xkDw/KepgEjeizO2sNco+hqYkU12taxQFqPEmgm1GWE= +modernc.org/z v1.7.3 h1:zDJf6iHjrnB+WRD88stbXokugjyc0/pB91ri1gO6LZY= +nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= -nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/ibc/chain.go b/ibc/chain.go index 577e3801b..d9120f5ba 100644 --- a/ibc/chain.go +++ b/ibc/chain.go @@ -3,8 +3,8 @@ package ibc import ( "context" + "cosmossdk.io/math" "github.com/docker/docker/client" - //"github.com/strangelove-ventures/interchaintest/v7/ibc" ) type Chain interface { @@ -64,7 +64,7 @@ type Chain interface { Height(ctx context.Context) (uint64, error) // GetBalance fetches the current balance for a specific account address and denom. - GetBalance(ctx context.Context, address string, denom string) (int64, error) + GetBalance(ctx context.Context, address string, denom string) (math.Int, error) // GetGasFeesInNativeDenom gets the fees in native denom for an amount of spent gas. GetGasFeesInNativeDenom(gasPaid int64) int64 diff --git a/ibc/relayer.go b/ibc/relayer.go index 76366c4e0..8224332e2 100644 --- a/ibc/relayer.go +++ b/ibc/relayer.go @@ -24,7 +24,7 @@ import ( // but the report will be missing details. type Relayer interface { // restore a mnemonic to be used as a relayer wallet for a chain - RestoreKey(ctx context.Context, rep RelayerExecReporter, chainID, keyName, coinType, mnemonic string) error + RestoreKey(ctx context.Context, rep RelayerExecReporter, cfg ChainConfig, keyName, mnemonic string) error // generate a new key AddKey(ctx context.Context, rep RelayerExecReporter, chainID, keyName, coinType string) (Wallet, error) @@ -93,6 +93,10 @@ type Relayer interface { // // "env" are environment variables in the format "MY_ENV_VAR=value" Exec(ctx context.Context, rep RelayerExecReporter, cmd []string, env []string) RelayerExecResult + + // Set the wasm client contract hash in the chain's config if the counterparty chain in a path used 08-wasm + // to instantiate the client. + SetClientContractHash(ctx context.Context, rep RelayerExecReporter, cfg ChainConfig, hash string) error } // GetTransferChannel will return the transfer channel assuming only one client, diff --git a/ibc/types.go b/ibc/types.go index 9f8166414..044d2092d 100644 --- a/ibc/types.go +++ b/ibc/types.go @@ -4,6 +4,7 @@ import ( "reflect" "strconv" + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/types/module/testutil" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" ) @@ -34,6 +35,10 @@ type ChainConfig struct { TrustingPeriod string `yaml:"trusting-period"` // Do not use docker host mount. NoHostMount bool `yaml:"no-host-mount"` + // When true, will skip validator gentx flow + SkipGenTx bool + // When provided, will run before performing gentx and genesis file creation steps for validators. + PreGenesis func(ChainConfig) error // When provided, genesis file contents will be altered before sharing for genesis. ModifyGenesis func(ChainConfig, []byte) ([]byte, error) // Override config parameters for files at filepath. @@ -42,13 +47,21 @@ type ChainConfig struct { EncodingConfig *testutil.TestEncodingConfig // Required when the chain uses the new sub commands for genesis (https://github.com/cosmos/cosmos-sdk/pull/14149) UsingNewGenesisCommand bool `yaml:"using-new-genesis-command"` + // Configuration describing additional sidecar processes. + SidecarConfigs []SidecarConfig } func (c ChainConfig) Clone() ChainConfig { x := c + images := make([]DockerImage, len(c.Images)) copy(images, c.Images) x.Images = images + + sidecars := make([]SidecarConfig, len(c.SidecarConfigs)) + copy(sidecars, c.SidecarConfigs) + x.SidecarConfigs = sidecars + return x } @@ -126,6 +139,14 @@ func (c ChainConfig) MergeChainSpecConfig(other ChainConfig) ChainConfig { c.ModifyGenesis = other.ModifyGenesis } + if other.SkipGenTx { + c.SkipGenTx = true + } + + if other.PreGenesis != nil { + c.PreGenesis = other.PreGenesis + } + if other.ConfigFileOverrides != nil { c.ConfigFileOverrides = other.ConfigFileOverrides } @@ -134,6 +155,10 @@ func (c ChainConfig) MergeChainSpecConfig(other ChainConfig) ChainConfig { c.EncodingConfig = other.EncodingConfig } + if len(other.SidecarConfigs) > 0 { + c.SidecarConfigs = append([]SidecarConfig(nil), other.SidecarConfigs...) + } + return c } @@ -152,6 +177,17 @@ func (c ChainConfig) IsFullyConfigured() bool { c.TrustingPeriod != "" } +// SidecarConfig describes the configuration options for instantiating a new sidecar process. +type SidecarConfig struct { + ProcessName string + Image DockerImage + HomeDir string + Ports []string + StartCmd []string + PreStart bool + ValidatorProcess bool +} + type DockerImage struct { Repository string `yaml:"repository"` Version string `yaml:"version"` @@ -170,7 +206,7 @@ func (i DockerImage) Ref() string { type WalletAmount struct { Address string Denom string - Amount int64 + Amount math.Int } type IBCTimeout struct { @@ -228,6 +264,7 @@ type RelayerImplementation int64 const ( CosmosRly RelayerImplementation = iota Hermes + Hyperspace ) // ChannelFilter provides the means for either creating an allowlist or a denylist of channels on the src chain diff --git a/interchain.go b/interchain.go index 83111d170..ab8093d79 100644 --- a/interchain.go +++ b/interchain.go @@ -4,6 +4,7 @@ import ( "context" "fmt" + "cosmossdk.io/math" "github.com/docker/docker/client" "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/strangelove-ventures/interchaintest/v7/testreporter" @@ -351,7 +352,7 @@ func (ic *Interchain) genesisWalletAmounts(ctx context.Context) (map[ibc.Chain][ { Address: faucetAddresses[c], Denom: c.Config().Denom, - Amount: 100_000_000_000_000, // Faucet wallet gets 100T units of denom. + Amount: math.NewInt(100_000_000_000_000), // Faucet wallet gets 100T units of denom. }, } @@ -366,7 +367,7 @@ func (ic *Interchain) genesisWalletAmounts(ctx context.Context) (map[ibc.Chain][ walletAmounts[c] = append(walletAmounts[c], ibc.WalletAmount{ Address: wallet.FormattedAddress(), Denom: c.Config().Denom, - Amount: 1_000_000_000_000, // Every wallet gets 1t units of denom. + Amount: math.NewInt(1_000_000_000_000), // Every wallet gets 1t units of denom. }) } @@ -420,8 +421,7 @@ func (ic *Interchain) configureRelayerKeys(ctx context.Context, rep *testreporte if err := r.RestoreKey(ctx, rep, - c.Config().ChainID, chainName, - c.Config().CoinType, + c.Config(), chainName, ic.relayerWallets[relayerChain{R: r, C: c}].Mnemonic(), ); err != nil { return fmt.Errorf("failed to restore key to relayer %s for chain %s: %w", ic.relayers[r], chainName, err) diff --git a/interchain_test.go b/interchain_test.go index 77950022a..f59f02744 100644 --- a/interchain_test.go +++ b/interchain_test.go @@ -5,13 +5,14 @@ import ( "fmt" "testing" + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" sdk "github.com/cosmos/cosmos-sdk/types" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/strangelove-ventures/interchaintest/v7/relayer/rly" @@ -200,6 +201,8 @@ func TestInterchain_CreateUser(t *testing.T) { NetworkID: network, })) + initBal := math.NewInt(10_000) + t.Run("with mnemonic", func(t *testing.T) { keyName := "mnemonic-user-name" @@ -219,7 +222,7 @@ func TestInterchain_CreateUser(t *testing.T) { require.NoError(t, err) require.NotEmpty(t, mnemonic) - user, err := interchaintest.GetAndFundTestUserWithMnemonic(ctx, keyName, mnemonic, 10000, gaia0) + user, err := interchaintest.GetAndFundTestUserWithMnemonic(ctx, keyName, mnemonic, initBal.Int64(), gaia0) require.NoError(t, err) require.NoError(t, testutil.WaitForBlocks(ctx, 2, gaia0)) require.NotEmpty(t, user.Address()) @@ -227,13 +230,12 @@ func TestInterchain_CreateUser(t *testing.T) { actualBalance, err := gaia0.GetBalance(ctx, user.FormattedAddress(), gaia0.Config().Denom) require.NoError(t, err) - require.Equal(t, int64(10000), actualBalance) - + require.True(t, actualBalance.Equal(initBal)) }) t.Run("without mnemonic", func(t *testing.T) { keyName := "regular-user-name" - users := interchaintest.GetAndFundTestUsers(t, ctx, keyName, 10000, gaia0) + users := interchaintest.GetAndFundTestUsers(t, ctx, keyName, initBal.Int64(), gaia0) require.NoError(t, testutil.WaitForBlocks(ctx, 2, gaia0)) require.Len(t, users, 1) require.NotEmpty(t, users[0].Address()) @@ -241,7 +243,7 @@ func TestInterchain_CreateUser(t *testing.T) { actualBalance, err := gaia0.GetBalance(ctx, users[0].FormattedAddress(), gaia0.Config().Denom) require.NoError(t, err) - require.Equal(t, int64(10000), actualBalance) + require.True(t, actualBalance.Equal(initBal)) }) } @@ -301,7 +303,7 @@ func broadcastTxCosmosChainTest(t *testing.T, relayerImpl ibc.RelayerImplementat testUser := interchaintest.GetAndFundTestUsers(t, ctx, "gaia-user-1", 10_000_000, gaia0)[0] - sendAmount := int64(10000) + sendAmount := math.NewInt(10_000) t.Run("relayer starts", func(t *testing.T) { require.NoError(t, r.StartRelayer(ctx, eRep, pathName)) @@ -309,7 +311,7 @@ func broadcastTxCosmosChainTest(t *testing.T, relayerImpl ibc.RelayerImplementat t.Run("broadcast success", func(t *testing.T) { b := cosmos.NewBroadcaster(t, gaia0.(*cosmos.CosmosChain)) - transferAmount := sdk.Coin{Denom: gaia0.Config().Denom, Amount: sdk.NewInt(sendAmount)} + transferAmount := sdk.Coin{Denom: gaia0.Config().Denom, Amount: sendAmount} memo := "" msg := transfertypes.NewMsgTransfer( @@ -335,7 +337,7 @@ func broadcastTxCosmosChainTest(t *testing.T, relayerImpl ibc.RelayerImplementat dstFinalBalance, err := gaia1.GetBalance(ctx, testUser.(*cosmos.CosmosWallet).FormattedAddressWithPrefix(gaia1.Config().Bech32Prefix), dstIbcDenom) require.NoError(t, err, "failed to get balance from dest chain") - require.Equal(t, sendAmount, dstFinalBalance) + require.True(t, dstFinalBalance.Equal(sendAmount)) }) } diff --git a/internal/blockdb/messages_view_test.go b/internal/blockdb/messages_view_test.go index e88d9f85b..addfb2240 100644 --- a/internal/blockdb/messages_view_test.go +++ b/internal/blockdb/messages_view_test.go @@ -9,8 +9,9 @@ import ( "path/filepath" "testing" + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/types" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/strangelove-ventures/interchaintest/v7/relayer" "github.com/strangelove-ventures/interchaintest/v7/testreporter" @@ -258,7 +259,7 @@ WHERE type = "/ibc.core.channel.v1.MsgChannelOpenConfirm" AND chain_id = ? transfer := ibc.WalletAmount{ Address: gaia1FaucetAddr, Denom: gaia0.Config().Denom, - Amount: txAmount, + Amount: math.NewInt(txAmount), } tx, err := gaia0.SendIBCTransfer(ctx, gaia0ChannelID, interchaintest.FaucetAccountKeyName, transfer, ibc.TransferOptions{}) require.NoError(t, err) diff --git a/internal/dockerutil/container_lifecycle.go b/internal/dockerutil/container_lifecycle.go index cd584995d..54f852c0b 100644 --- a/internal/dockerutil/container_lifecycle.go +++ b/internal/dockerutil/container_lifecycle.go @@ -5,7 +5,6 @@ import ( "fmt" "net" "strings" - "time" dockertypes "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" @@ -117,8 +116,11 @@ func (c *ContainerLifecycle) StartContainer(ctx context.Context) error { } func (c *ContainerLifecycle) StopContainer(ctx context.Context) error { - timeout := 30 * time.Second - return c.client.ContainerStop(ctx, c.id, &timeout) + var timeout container.StopOptions + timeoutSec := 30 + timeout.Timeout = &timeoutSec + + return c.client.ContainerStop(ctx, c.id, timeout) } func (c *ContainerLifecycle) RemoveContainer(ctx context.Context) error { @@ -156,3 +158,16 @@ func (c *ContainerLifecycle) GetIP(ctx context.Context) (string, error) { return resp.NetworkSettings.IPAddress, nil } + +// Running will inspect the container and check its state to determine if it is currently running. +// If the container is running nil will be returned, otherwise an error is returned. +func (c *ContainerLifecycle) Running(ctx context.Context) error { + cjson, err := c.client.ContainerInspect(ctx, c.id) + if err != nil { + return err + } + if cjson.State.Running { + return nil + } + return fmt.Errorf("container with name %s and id %s is not running", c.containerName, c.id) +} diff --git a/internal/dockerutil/fileretriever_test.go b/internal/dockerutil/fileretriever_test.go index 1225b98ae..c73aa1c21 100644 --- a/internal/dockerutil/fileretriever_test.go +++ b/internal/dockerutil/fileretriever_test.go @@ -21,7 +21,7 @@ func TestFileRetriever(t *testing.T) { cli, network := interchaintest.DockerSetup(t) ctx := context.Background() - v, err := cli.VolumeCreate(ctx, volumetypes.VolumeCreateBody{ + v, err := cli.VolumeCreate(ctx, volumetypes.CreateOptions{ Labels: map[string]string{dockerutil.CleanupLabel: t.Name()}, }) require.NoError(t, err) diff --git a/internal/dockerutil/filewriter_test.go b/internal/dockerutil/filewriter_test.go index 1898b8784..cb985eabb 100644 --- a/internal/dockerutil/filewriter_test.go +++ b/internal/dockerutil/filewriter_test.go @@ -21,7 +21,7 @@ func TestFileWriter(t *testing.T) { cli, network := interchaintest.DockerSetup(t) ctx := context.Background() - v, err := cli.VolumeCreate(ctx, volumetypes.VolumeCreateBody{ + v, err := cli.VolumeCreate(ctx, volumetypes.CreateOptions{ Labels: map[string]string{dockerutil.CleanupLabel: t.Name()}, }) require.NoError(t, err) diff --git a/internal/dockerutil/image.go b/internal/dockerutil/image.go index b9b0b91fa..aaf1c76a3 100644 --- a/internal/dockerutil/image.go +++ b/internal/dockerutil/image.go @@ -345,7 +345,10 @@ func (c *Container) Stop(timeout time.Duration) error { ctx, cancel := context.WithTimeout(context.Background(), timeout*2) defer cancel() - err := c.image.client.ContainerStop(ctx, c.containerID, &timeout) + var stopOptions container.StopOptions + timeoutRound := int(timeout.Round(time.Second)) + stopOptions.Timeout = &timeoutRound + err := c.image.client.ContainerStop(ctx, c.containerID, stopOptions) if err != nil { // Only return the error if it didn't match an already stopped, or a missing container. if !(errdefs.IsNotModified(err) || errdefs.IsNotFound(err)) { diff --git a/internal/dockerutil/setup.go b/internal/dockerutil/setup.go index e4b02227b..b16f44826 100644 --- a/internal/dockerutil/setup.go +++ b/internal/dockerutil/setup.go @@ -94,6 +94,7 @@ func dockerCleanup(t DockerSetupTestingT, cli *client.Client) func() { showContainerLogs := os.Getenv("SHOW_CONTAINER_LOGS") != "" containerLogTail := os.Getenv("CONTAINER_LOG_TAIL") ctx := context.TODO() + cli.NegotiateAPIVersion(ctx) cs, err := cli.ContainerList(ctx, types.ContainerListOptions{ All: true, Filters: filters.NewArgs( @@ -106,9 +107,12 @@ func dockerCleanup(t DockerSetupTestingT, cli *client.Client) func() { } for _, c := range cs { - stopTimeout := 10 * time.Second - deadline := time.Now().Add(stopTimeout) - if err := cli.ContainerStop(ctx, c.ID, &stopTimeout); isLoggableStopError(err) { + var stopTimeout container.StopOptions + timeout := 10 + timeoutDur := time.Duration(timeout * int(time.Second)) + deadline := time.Now().Add(timeoutDur) + stopTimeout.Timeout = &timeout + if err := cli.ContainerStop(ctx, c.ID, stopTimeout); isLoggableStopError(err) { t.Logf("Failed to stop container %s during docker cleanup: %v", c.ID, err) } diff --git a/internal/dockerutil/setup_test.go b/internal/dockerutil/setup_test.go index d5b4494e4..007df13d3 100644 --- a/internal/dockerutil/setup_test.go +++ b/internal/dockerutil/setup_test.go @@ -51,7 +51,7 @@ func TestDockerSetup_KeepVolumes(t *testing.T) { mt.Simulate(func() { cli, _ := dockerutil.DockerSetup(mt) - v, err := cli.VolumeCreate(ctx, volumetypes.VolumeCreateBody{ + v, err := cli.VolumeCreate(ctx, volumetypes.CreateOptions{ Labels: map[string]string{dockerutil.CleanupLabel: mt.Name()}, }) require.NoError(t, err) diff --git a/label/doc.go b/label/doc.go deleted file mode 100644 index 771d163c0..000000000 --- a/label/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Package label contains types to manage labels for tests. -// Labels are treated as named values that are present or absent on a particular test. -// -// The labels are reported through the test reporter, in the JSON output. -// There is currently no support for using labels to filter which tests to run, -// but it should be trivial to postprocess the test report using labels. -package label diff --git a/label/label.go b/label/label.go deleted file mode 100644 index 215917f60..000000000 --- a/label/label.go +++ /dev/null @@ -1,96 +0,0 @@ -package label - -import ( - "fmt" -) - -// Test is a label associated with an individual test. -// All test labels are known at compile time. -type Test string - -const ( - Timeout Test = "timeout" - HeightTimeout Test = "height_timeout" - TimestampTimeout Test = "timestamp_timeout" -) - -var knownTestLabels = map[Test]struct{}{ - Timeout: {}, - HeightTimeout: {}, - TimestampTimeout: {}, -} - -func (l Test) IsKnown() bool { - _, exists := knownTestLabels[l] - return exists -} - -// Relayer is a label associated with a relayer during tests. -// Relayer values must be registered through RegisterRelayerLabel, typically inside init functions. -type Relayer string - -const ( - Rly Relayer = "rly" - Hermes Relayer = "hermes" -) - -var knownRelayerLabels = map[Relayer]struct{}{ - Rly: {}, - Hermes: {}, -} - -func (l Relayer) IsKnown() bool { - _, exists := knownRelayerLabels[l] - return exists -} - -// RegisterRelayerLabel is available for external packages that may import interchaintest, -// to register any external relayer implementations they may provide. -func RegisterRelayerLabel(l Relayer) { - if _, exists := knownRelayerLabels[l]; exists { - panic(fmt.Errorf("relayer label %q already exists and must not be double registered", l)) - } - - knownRelayerLabels[l] = struct{}{} -} - -// Chain is a label associated with a chain during tests. -// Chain values must be registered through RegisterChainLabel, typically inside init functions. -type Chain string - -func (l Chain) IsKnown() bool { - _, exists := knownChainLabels[l] - return exists -} - -const ( - // Cosmos-based chains should include this label. - Cosmos Chain = "cosmos" - - // Specific chains follow. - - Gaia Chain = "gaia" - Osmosis Chain = "osmosis" - Juno Chain = "juno" - Agoric Chain = "agoric" - - Penumbra Chain = "penumbra" -) - -var knownChainLabels = map[Chain]struct{}{ - Gaia: {}, - Osmosis: {}, - Juno: {}, - Agoric: {}, - Penumbra: {}, -} - -// RegisterChainLabel is available for external packages that may import interchaintest, -// to register any external chain implementations they may provide. -func RegisterChainLabel(l Chain) { - if _, exists := knownChainLabels[l]; exists { - panic(fmt.Errorf("chain label %q already exists and must not be double registered", l)) - } - - knownChainLabels[l] = struct{}{} -} diff --git a/relayer/docker.go b/relayer/docker.go index b6a82ad24..950dabd75 100644 --- a/relayer/docker.go +++ b/relayer/docker.go @@ -15,6 +15,7 @@ import ( "github.com/docker/docker/pkg/stdcopy" "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" + "github.com/strangelove-ventures/interchaintest/v7/testutil" "go.uber.org/zap" ) @@ -86,7 +87,7 @@ func NewDockerRelayer(ctx context.Context, log *zap.Logger, testName string, cli return nil, fmt.Errorf("pulling container image %s: %w", containerImage.Ref(), err) } - v, err := cli.VolumeCreate(ctx, volumetypes.VolumeCreateBody{ + v, err := cli.VolumeCreate(ctx, volumetypes.CreateOptions{ // Have to leave Driver unspecified for Docker Desktop compatibility. Labels: map[string]string{dockerutil.CleanupLabel: testName}, @@ -140,6 +141,22 @@ func (r *DockerRelayer) WriteFileToHomeDir(ctx context.Context, relativePath str return nil } +// ReadFileFromHomeDir reads a file at the relative path specified and returns the contents. The file is +// relative to the home directory in the relayer container. +func (r *DockerRelayer) ReadFileFromHomeDir(ctx context.Context, relativePath string) ([]byte, error) { + fr := dockerutil.NewFileRetriever(r.log, r.client, r.testName) + bytes, err := fr.SingleFileContent(ctx, r.volumeName, relativePath) + if err != nil { + return nil, fmt.Errorf("failed to retrieve %s: %w", relativePath, err) + } + return bytes, nil +} + +// Modify a toml config file in relayer home directory +func (r *DockerRelayer) ModifyTomlConfigFile(ctx context.Context, relativePath string, modification testutil.Toml) error { + return testutil.ModifyTomlConfigFile(ctx, r.log, r.client, r.testName, r.volumeName, relativePath, modification) +} + // AddWallet adds a stores a wallet for the given chain ID. func (r *DockerRelayer) AddWallet(chainID string, wallet ibc.Wallet) { r.wallets[chainID] = wallet @@ -305,7 +322,9 @@ func (r *DockerRelayer) Exec(ctx context.Context, rep ibc.RelayerExecReporter, c } } -func (r *DockerRelayer) RestoreKey(ctx context.Context, rep ibc.RelayerExecReporter, chainID, keyName, coinType, mnemonic string) error { +func (r *DockerRelayer) RestoreKey(ctx context.Context, rep ibc.RelayerExecReporter, cfg ibc.ChainConfig, keyName, mnemonic string) error { + chainID := cfg.ChainID + coinType := cfg.CoinType cmd := r.c.RestoreKey(chainID, keyName, coinType, mnemonic, r.HomeDir()) // Restoring a key should be near-instantaneous, so add a 1-minute timeout @@ -317,7 +336,6 @@ func (r *DockerRelayer) RestoreKey(ctx context.Context, rep ibc.RelayerExecRepor if res.Err != nil { return res.Err } - addrBytes := r.c.ParseRestoreKeyOutput(string(res.Stdout), string(res.Stderr)) r.wallets[chainID] = r.c.CreateWallet("", addrBytes, mnemonic) @@ -338,7 +356,7 @@ func (r *DockerRelayer) StartRelayer(ctx context.Context, rep ibc.RelayerExecRep containerImage := r.containerImage() joinedPaths := strings.Join(pathNames, ".") - containerName := fmt.Sprintf("%s-%s", r.c.Name(), joinedPaths) + containerName := fmt.Sprintf("%s-%s-%s", r.c.Name(), joinedPaths, dockerutil.RandLowerCaseLetterString(5)) cmd := r.c.StartRelayer(r.HomeDir(), pathNames...) @@ -390,13 +408,13 @@ func (r *DockerRelayer) StopRelayer(ctx context.Context, rep ibc.RelayerExecRepo return fmt.Errorf("StopRelayer: inspecting container: %w", err) } - startedAt, err := time.Parse(c.State.StartedAt, time.RFC3339Nano) + startedAt, err := time.Parse(time.RFC3339Nano, c.State.StartedAt) if err != nil { r.log.Info("Failed to parse container StartedAt", zap.Error(err)) startedAt = time.Unix(0, 0) } - finishedAt, err := time.Parse(c.State.FinishedAt, time.RFC3339Nano) + finishedAt, err := time.Parse(time.RFC3339Nano, c.State.FinishedAt) if err != nil { r.log.Info("Failed to parse container FinishedAt", zap.Error(err)) finishedAt = time.Now().UTC() @@ -475,6 +493,10 @@ func (r *DockerRelayer) UseDockerNetwork() bool { return true } +func (r *DockerRelayer) SetClientContractHash(ctx context.Context, rep ibc.RelayerExecReporter, cfg ibc.ChainConfig, hash string) error { + panic("[rly/SetClientContractHash] Implement me") +} + type RelayerCommander interface { // Name is the name of the relayer, e.g. "rly" or "hermes". Name() string diff --git a/relayer/hermes/hermes_commander.go b/relayer/hermes/hermes_commander.go index d73c018f5..f532a2701 100644 --- a/relayer/hermes/hermes_commander.go +++ b/relayer/hermes/hermes_commander.go @@ -16,7 +16,8 @@ import ( var _ relayer.RelayerCommander = &commander{} type commander struct { - log *zap.Logger + log *zap.Logger + extraStartFlags []string } func (c commander) Name() string { @@ -48,13 +49,13 @@ func (c commander) ParseGetChannelsOutput(stdout, stderr string) ([]ibc.ChannelO State: r.ChannelEnd.State, Ordering: r.ChannelEnd.Ordering, Counterparty: ibc.ChannelCounterparty{ - PortID: r.CounterPartyChannelEnd.Remote.PortID, - ChannelID: r.CounterPartyChannelEnd.Remote.ChannelID, + PortID: r.ChannelEnd.Remote.PortID, + ChannelID: r.ChannelEnd.Remote.ChannelID, }, ConnectionHops: r.ChannelEnd.ConnectionHops, Version: r.ChannelEnd.Version, - PortID: r.ChannelEnd.Remote.PortID, - ChannelID: r.ChannelEnd.Remote.ChannelID, + PortID: r.CounterPartyChannelEnd.Remote.PortID, + ChannelID: r.CounterPartyChannelEnd.Remote.ChannelID, }) } @@ -135,7 +136,9 @@ func (c commander) GetClients(chainID, homeDir string) []string { } func (c commander) StartRelayer(homeDir string, pathNames ...string) []string { - return []string{hermes, "--config", fmt.Sprintf("%s/%s", homeDir, hermesConfigPath), "start", "--full-scan"} + cmd := []string{hermes, "--config", fmt.Sprintf("%s/%s", homeDir, hermesConfigPath), "start"} + cmd = append(cmd, c.extraStartFlags...) + return cmd } func (c commander) CreateWallet(keyName, address, mnemonic string) ibc.Wallet { diff --git a/relayer/hermes/hermes_config.go b/relayer/hermes/hermes_config.go index 50e1b9695..92e6af3c1 100644 --- a/relayer/hermes/hermes_config.go +++ b/relayer/hermes/hermes_config.go @@ -6,7 +6,6 @@ import ( "strings" ) - // NewConfig returns a hermes Config with an entry for each of the provided ChainConfigs. // The defaults were adapted from the sample config file found here: https://github.com/informalsystems/hermes/blob/master/config.toml func NewConfig(chainConfigs ...ChainConfig) Config { diff --git a/relayer/hermes/hermes_relayer.go b/relayer/hermes/hermes_relayer.go index 5ed3c807d..e67a89412 100644 --- a/relayer/hermes/hermes_relayer.go +++ b/relayer/hermes/hermes_relayer.go @@ -17,8 +17,8 @@ import ( const ( hermes = "hermes" - defaultContainerImage = "docker.io/informalsystems/hermes" - DefaultContainerVersion = "1.2.0" + defaultContainerImage = "ghcr.io/informalsystems/hermes" + DefaultContainerVersion = "1.4.0" hermesDefaultUidGid = "1000:1000" hermesHome = "/home/hermes" @@ -62,6 +62,12 @@ type pathChainConfig struct { // NewHermesRelayer returns a new hermes relayer. func NewHermesRelayer(log *zap.Logger, testName string, cli *client.Client, networkID string, options ...relayer.RelayerOption) *Relayer { c := commander{log: log} + for _, opt := range options { + switch o := opt.(type) { + case relayer.RelayerOptionExtraStartFlags: + c.extraStartFlags = o.Flags + } + } options = append(options, relayer.HomeDir(hermesHome)) dr, err := relayer.NewDockerRelayer(context.TODO(), log, testName, cli, networkID, c, options...) if err != nil { @@ -113,7 +119,10 @@ func (r *Relayer) LinkPath(ctx context.Context, rep ibc.RelayerExecReporter, pat func (r *Relayer) CreateChannel(ctx context.Context, rep ibc.RelayerExecReporter, pathName string, opts ibc.CreateChannelOptions) error { pathConfig := r.paths[pathName] - cmd := []string{hermes, "--json", "create", "channel", "--a-chain", pathConfig.chainA.chainID, "--a-port", opts.SourcePortName, "--b-port", opts.DestPortName, "--a-connection", pathConfig.chainA.connectionID} + cmd := []string{hermes, "--json", "create", "channel", "--order", opts.Order.String(), "--a-chain", pathConfig.chainA.chainID, "--a-port", opts.SourcePortName, "--b-port", opts.DestPortName, "--a-connection", pathConfig.chainA.connectionID} + if opts.Version != "" { + cmd = append(cmd, "--channel-version", opts.Version) + } res := r.Exec(ctx, rep, cmd, nil) if res.Err != nil { return res.Err @@ -161,6 +170,9 @@ func (r *Relayer) UpdateClients(ctx context.Context, rep ibc.RelayerExecReporter func (r *Relayer) CreateClients(ctx context.Context, rep ibc.RelayerExecReporter, pathName string, opts ibc.CreateClientOptions) error { pathConfig := r.paths[pathName] chainACreateClientCmd := []string{hermes, "--json", "create", "client", "--host-chain", pathConfig.chainA.chainID, "--reference-chain", pathConfig.chainB.chainID} + if opts.TrustingPeriod != "0" { + chainACreateClientCmd = append(chainACreateClientCmd, "--trusting-period", opts.TrustingPeriod) + } res := r.Exec(ctx, rep, chainACreateClientCmd, nil) if res.Err != nil { return res.Err @@ -173,6 +185,9 @@ func (r *Relayer) CreateClients(ctx context.Context, rep ibc.RelayerExecReporter pathConfig.chainA.clientID = chainAClientId chainBCreateClientCmd := []string{hermes, "--json", "create", "client", "--host-chain", pathConfig.chainB.chainID, "--reference-chain", pathConfig.chainA.chainID} + if opts.TrustingPeriod != "0" { + chainBCreateClientCmd = append(chainBCreateClientCmd, "--trusting-period", opts.TrustingPeriod) + } res = r.Exec(ctx, rep, chainBCreateClientCmd, nil) if res.Err != nil { return res.Err @@ -189,8 +204,8 @@ func (r *Relayer) CreateClients(ctx context.Context, rep ibc.RelayerExecReporter // RestoreKey restores a key from a mnemonic. In hermes, you must provide a file containing the mnemonic. We need // to copy the contents of the mnemonic into a file on disk and then reference the newly created file. -func (r *Relayer) RestoreKey(ctx context.Context, rep ibc.RelayerExecReporter, chainID, keyName, coinType, mnemonic string) error { - +func (r *Relayer) RestoreKey(ctx context.Context, rep ibc.RelayerExecReporter, cfg ibc.ChainConfig, keyName, mnemonic string) error { + chainID := cfg.ChainID relativeMnemonicFilePath := fmt.Sprintf("%s/mnemonic.txt", chainID) if err := r.WriteFileToHomeDir(ctx, relativeMnemonicFilePath, []byte(mnemonic)); err != nil { return fmt.Errorf("failed to write mnemonic file: %w", err) diff --git a/relayer/hyperspace/hyperspace_commander.go b/relayer/hyperspace/hyperspace_commander.go new file mode 100644 index 000000000..4576379ac --- /dev/null +++ b/relayer/hyperspace/hyperspace_commander.go @@ -0,0 +1,392 @@ +// Package hyperspace provides an interface to the hyperspace relayer running in a Docker container. +package hyperspace + +import ( + "context" + "fmt" + "path" + + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" + types23 "github.com/cosmos/ibc-go/v7/modules/core/23-commitment/types" + "github.com/misko9/go-substrate-rpc-client/v4/signature" + "github.com/pelletier/go-toml/v2" + "github.com/strangelove-ventures/interchaintest/v7/chain/polkadot" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + "go.uber.org/zap" +) + +// hyperspaceCommander satisfies relayer.RelayerCommander. +type hyperspaceCommander struct { + log *zap.Logger + paths map[string]*pathConfiguration + extraStartFlags []string +} + +// pathConfiguration represents the concept of a "path" which is implemented at the interchain test level rather +// than the hyperspace level. +type pathConfiguration struct { + chainA, chainB pathChainConfig +} + +// pathChainConfig holds all values that will be required when interacting with a path. +type pathChainConfig struct { + chainID string +} + +func (hyperspaceCommander) Name() string { + return "hyperspace" +} + +func (hyperspaceCommander) DockerUser() string { + return "1000:1000" // docker run -it --rm --entrypoint echo ghcr.io/cosmos/relayer "$(id -u):$(id -g)" +} + +func (c *hyperspaceCommander) AddChainConfiguration(containerFilePath, homeDir string) []string { + fmt.Println("[hyperspace] AddChainConfiguration ", containerFilePath, homeDir) + //c.chainConfigPaths = append(c.chainConfigPaths, containerFilePath) + return []string{ + "hyperspace", + "-h", + } +} + +// Hyperspace doesn't not have this functionality +func (hyperspaceCommander) AddKey(chainID, keyName, coinType, homeDir string) []string { + panic("[AddKey] Do not call me") +} + +func (c *hyperspaceCommander) CreateChannel(pathName string, opts ibc.CreateChannelOptions, homeDir string) []string { + fmt.Println("[hyperspace] CreateChannel", pathName, homeDir) + _, ok := c.paths[pathName] + if !ok { + panic(fmt.Sprintf("path %s not found", pathName)) + } + return []string{ + "hyperspace", + "create-channel", + "--config-a", + configPath(homeDir, c.paths[pathName].chainA.chainID), + "--config-b", + configPath(homeDir, c.paths[pathName].chainB.chainID), + "--config-core", + path.Join(homeDir, "core.config"), + "--delay-period", + "0", + "--port-id", + opts.SourcePortName, + "--order", + "unordered", + "--version", + opts.Version, + } +} + +func (c *hyperspaceCommander) CreateClients(pathName string, opts ibc.CreateClientOptions, homeDir string) []string { + fmt.Println("[hyperspace] CreateClients", pathName, opts, homeDir) + _, ok := c.paths[pathName] + if !ok { + panic(fmt.Sprintf("path %s not found", pathName)) + } + return []string{ + "hyperspace", + "create-clients", + "--config-a", + configPath(homeDir, c.paths[pathName].chainA.chainID), + "--config-b", + configPath(homeDir, c.paths[pathName].chainB.chainID), + "--config-core", + path.Join(homeDir, "core.config"), + "--delay-period", + "0", + "--port-id", + "transfer", + "--order", + "unordered", + } +} + +func (c *hyperspaceCommander) CreateConnections(pathName, homeDir string) []string { + fmt.Println("[hyperspace] CreateConnections", pathName, homeDir) + _, ok := c.paths[pathName] + if !ok { + panic(fmt.Sprintf("path %s not found", pathName)) + } + return []string{ + "hyperspace", + "create-connection", + "--config-a", + configPath(homeDir, c.paths[pathName].chainA.chainID), + "--config-b", + configPath(homeDir, c.paths[pathName].chainB.chainID), + "--config-core", + path.Join(homeDir, "core.config"), + "--delay-period", + "0", + "--port-id", + "transfer", + "--order", + "unordered", + } +} + +// Hyperspace doesn't not have this functionality +func (hyperspaceCommander) FlushAcknowledgements(pathName, channelID, homeDir string) []string { + panic("[FlushAcknowledgements] Do not call me") +} + +// Hyperspace doesn't not have this functionality +func (hyperspaceCommander) FlushPackets(pathName, channelID, homeDir string) []string { + panic("[FlushPackets] Do not call me") +} + +// GeneratePath establishes an in memory path representation. The concept does not exist in hyperspace. +func (c *hyperspaceCommander) GeneratePath(srcChainID, dstChainID, pathName, homeDir string) []string { + if c.paths == nil { + c.paths = map[string]*pathConfiguration{} + } + c.paths[pathName] = &pathConfiguration{ + chainA: pathChainConfig{ + chainID: srcChainID, + }, + chainB: pathChainConfig{ + chainID: dstChainID, + }, + } + return []string{"true"} +} + +// Hyperspace does not have paths, just two configs +func (hyperspaceCommander) UpdatePath(pathName, homeDir string, filter ibc.ChannelFilter) []string { + panic("[UpdatePath] Do not call me") + +} + +// Prints chain config which is populated by hyperspace +// Ideally, there should be a command from hyperspace to get this output +func (hyperspaceCommander) GetChannels(chainID, homeDir string) []string { + fmt.Println("[hyperspace] Get Channels") + configFilePath := path.Join(homeDir, chainID+".config") + return []string{ + "cat", + configFilePath, + } +} + +// Prints chain config which is populated by hyperspace +// Ideally, there should be a command from hyperspace to get this output +func (hyperspaceCommander) GetConnections(chainID, homeDir string) []string { + fmt.Println("[hyperspace] Get Connections") + configFilePath := path.Join(homeDir, chainID+".config") + return []string{ + "cat", + configFilePath, + } +} + +// Prints chain config which is populated by hyperspace +// Ideally, there should be a command from hyperspace to get this output +func (hyperspaceCommander) GetClients(chainID, homeDir string) []string { + fmt.Println("[hyperspace] Get Clients") + configFilePath := path.Join(homeDir, chainID+".config") + return []string{ + "cat", + configFilePath, + } +} + +// Hyperspace does not have link cmd, call create clients, create connection, and create channel +func (hyperspaceCommander) LinkPath(pathName, homeDir string, channelOpts ibc.CreateChannelOptions, clientOpt ibc.CreateClientOptions) []string { + panic("[LinkPath] Do not use me") +} + +// There is no hyperspace call to restore the key, so this can't return an executable. +// HyperspaceRelayer's RestoreKey will restore the key in the chain's config file +func (hyperspaceCommander) RestoreKey(chainID, bech32Prefix, coinType, mnemonic, homeDir string) []string { + panic("[RestoreKey] Do not use me") +} + +// hyperspace can only start 1 path +func (c *hyperspaceCommander) StartRelayer(homeDir string, pathNames ...string) []string { + fmt.Println("[hyperspace] StartRelayer", homeDir, pathNames) + if len(pathNames) != 1 { + panic("Hyperspace's StartRelayer list of paths can only have 1 path") + } + pathName := pathNames[0] + _, ok := c.paths[pathName] + if !ok { + panic(fmt.Sprintf("path %s not found", pathName)) + } + return []string{ + "hyperspace", + "relay", + "--config-a", + configPath(homeDir, c.paths[pathName].chainA.chainID), + "--config-b", + configPath(homeDir, c.paths[pathName].chainB.chainID), + "--config-core", + path.Join(homeDir, "core.config"), + "--delay-period", + "0", + "--port-id", + "transfer", + "--order", + "unordered", + "--version", + "ics20-1", + } +} + +// Hyperspace doesn't not have this functionality +func (hyperspaceCommander) UpdateClients(pathName, homeDir string) []string { + panic("[UpdateClients] Do not use me") +} + +func (hyperspaceCommander) ConfigContent(ctx context.Context, cfg ibc.ChainConfig, keyName, rpcAddr, grpcAddr string) ([]byte, error) { + fmt.Println("[hyperspace] ConfigContent", cfg, keyName, rpcAddr, grpcAddr) + HyperspaceRelayerChainConfig := ChainConfigToHyperspaceRelayerChainConfig(cfg, keyName, rpcAddr, grpcAddr) + bytes, err := toml.Marshal(HyperspaceRelayerChainConfig) + if err != nil { + return nil, err + } + return bytes, nil +} + +func (hyperspaceCommander) DefaultContainerImage() string { + return HyperspaceDefaultContainerImage +} + +func (hyperspaceCommander) DefaultContainerVersion() string { + return HyperspaceDefaultContainerVersion +} + +// There is no hyperspace call to add key, so there is no stdout to parse. +// DockerRelayer's RestoreKey will restore the key in the chain's config file +func (hyperspaceCommander) ParseAddKeyOutput(stdout, stderr string) (ibc.Wallet, error) { + panic("[ParseAddKeyOutput] Do not call me") +} + +// There is no hyperspace call to restore the key, so there is no stdout to parse. +// DockerRelayer's RestoreKey will restore the key in the chain's config file +func (hyperspaceCommander) ParseRestoreKeyOutput(stdout, stderr string) string { + panic("[ParseRestoreKeyOutput] Do not call me") +} + +type ChannelsOutput struct { + Channels [][]string `toml:"channel_whitelist"` +} + +// Parses output of chain config which is populated by hyperspace +// Ideally, there should be a command from hyperspace to get this output +func (hyperspaceCommander) ParseGetChannelsOutput(stdout, stderr string) ([]ibc.ChannelOutput, error) { + var cfg ChannelsOutput + err := toml.Unmarshal([]byte(stdout), &cfg) + if err != nil { + return nil, err + } + + outputs := make([]ibc.ChannelOutput, 0) + for _, channel := range cfg.Channels { + outputs = append(outputs, ibc.ChannelOutput{ + State: "", + Ordering: "", + Counterparty: ibc.ChannelCounterparty{ // TODO: retrieve from hyperspace + PortID: "", + ChannelID: "", + }, + ConnectionHops: []string{}, + Version: "", + PortID: channel[1], + ChannelID: channel[0], + }) + } + return outputs, nil +} + +type ConnectionsOutput struct { + ConnectionID string `toml:"connection_id"` + ClientID string `toml:"client_id"` +} + +// Parses output of chain config which is populated by hyperspace +// Ideally, there should be a command from hyperspace to get this output +// Only supports 1 connection and limited info +func (hyperspaceCommander) ParseGetConnectionsOutput(stdout, stderr string) (ibc.ConnectionOutputs, error) { + var cfg ConnectionsOutput + err := toml.Unmarshal([]byte(stdout), &cfg) + if err != nil { + return nil, err + } + + return ibc.ConnectionOutputs{ + &ibc.ConnectionOutput{ + ID: cfg.ConnectionID, + ClientID: cfg.ClientID, + Versions: []*ibcexported.Version{ + { + Identifier: "", + Features: []string{}, + }, + }, + State: "", + Counterparty: &ibcexported.Counterparty{ + ClientId: "", + ConnectionId: "", + Prefix: types23.MerklePrefix{ + KeyPrefix: []byte{}, + }, + }, + DelayPeriod: "0", + }, + }, nil +} + +type ClientOutput struct { + ChainID string `toml:"chain_id"` + ClientID string `toml:"client_id"` +} + +// Parses output of chain config which is populated by hyperspace +// Ideally, there should be a command from hyperspace to get this output +// Only supports 1 client +func (hyperspaceCommander) ParseGetClientsOutput(stdout, stderr string) (ibc.ClientOutputs, error) { + var cfg ClientOutput + err := toml.Unmarshal([]byte(stdout), &cfg) + if err != nil { + return nil, err + } + + return ibc.ClientOutputs{ + &ibc.ClientOutput{ + ClientID: cfg.ClientID, + ClientState: ibc.ClientState{ + ChainID: cfg.ChainID, + }, + }, + }, nil +} + +func (hyperspaceCommander) Init(homeDir string) []string { + fmt.Println("[hyperspace] Init", homeDir) + // Return hyperspace help to ensure hyperspace binary is accessible + return []string{ + "hyperspace", + "-h", + } +} + +func (hyperspaceCommander) CreateWallet(keyName, address, mnemonic string) ibc.Wallet { + kp, err := signature.KeyringPairFromSecret(mnemonic, polkadot.Ss58Format) + if err != nil { + return NewWallet("", "", "") + } + return NewWallet("", kp.Address, mnemonic) +} + +func (hyperspaceCommander) Flush(pathName, channelID, homeDir string) []string { + panic("flush implemented in hyperspace not the commander") +} + +func configPath(homeDir, chainID string) string { + chainConfigFile := chainID + ".config" + return path.Join(homeDir, chainConfigFile) +} diff --git a/relayer/hyperspace/hyperspace_config.go b/relayer/hyperspace/hyperspace_config.go new file mode 100644 index 000000000..50f1fcee2 --- /dev/null +++ b/relayer/hyperspace/hyperspace_config.go @@ -0,0 +1,144 @@ +package hyperspace + +import ( + "fmt" + "strconv" + "strings" + + "github.com/cosmos/cosmos-sdk/crypto/hd" + "github.com/cosmos/cosmos-sdk/crypto/keyring" + "github.com/cosmos/cosmos-sdk/types" + "github.com/strangelove-ventures/interchaintest/v7/chain/polkadot" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + bip32 "github.com/tyler-smith/go-bip32" + bip39 "github.com/tyler-smith/go-bip39" +) + +type HyperspaceRelayerCoreConfig struct { + PrometheusEndpoint string +} + +type HyperspaceRelayerSubstrateChainConfig struct { + Type string `toml:"type"` + Name string `toml:"name"` + ParaID uint32 `toml:"para_id"` + ParachainRPCURL string `toml:"parachain_rpc_url"` + RelayChainRPCURL string `toml:"relay_chain_rpc_url"` + BeefyActivation uint32 `toml:"beefy_activation_block"` + CommitmentPrefix string `toml:"commitment_prefix"` + PrivateKey string `toml:"private_key"` + SS58Version uint8 `toml:"ss58_version"` + FinalityProtocol string `toml:"finality_protocol"` + KeyType string `toml:"key_type"` + ChannelWhitelist []string `toml:"channel_whitelist"` +} + +type KeyEntry struct { + PublicKey string `toml:"public_key"` + PrivateKey string `toml:"private_key"` + Account string `toml:"account"` + Address []byte `toml:"address"` +} + +type HyperspaceRelayerCosmosChainConfig struct { + Type string `toml:"type"` + Name string `toml:"name"` + RPCUrl string `toml:"rpc_url"` + GRPCUrl string `toml:"grpc_url"` + WebsocketUrl string `toml:"websocket_url"` + ChainID string `toml:"chain_id"` + AccountPrefix string `toml:"account_prefix"` + FeeDenom string `toml:"fee_denom"` + FeeAmount string `toml:"fee_amount"` + GasLimit uint64 `toml:"gas_limit"` + StorePrefix string `toml:"store_prefix"` + MaxTxSize uint64 `toml:"max_tx_size"` + WasmCodeId string `toml:"wasm_code_id"` + Keybase KeyEntry `toml:"keybase"` + ChannelWhitelist []string `toml:"channel_whitelist"` +} + +const ( + HyperspaceDefaultContainerImage = "hyperspace" + HyperspaceDefaultContainerVersion = "local" +) + +func GenKeyEntry(bech32Prefix, coinType, mnemonic string) KeyEntry { + coinType64, err := strconv.ParseUint(coinType, 10, 32) + if err != nil { + return KeyEntry{} + } + algo := keyring.SignatureAlgo(hd.Secp256k1) + hdPath := hd.CreateHDPath(uint32(coinType64), 0, 0).String() + + // create master key and derive first key for keyring + derivedPriv, err := algo.Derive()(mnemonic, "", hdPath) + if err != nil { + return KeyEntry{} + } + + privKey := algo.Generate()(derivedPriv) + address := types.AccAddress(privKey.PubKey().Address()) + bech32Addr := types.MustBech32ifyAddressBytes(bech32Prefix, address) + + // Derive extended private key + seed := bip39.NewSeed(mnemonic, "") + masterKey, _ := bip32.NewMasterKey(seed) + purposeKey, _ := masterKey.NewChildKey(0x8000002C) // 44' + coinTypeKey, _ := purposeKey.NewChildKey(0x80000000 + uint32(coinType64)) // 118' + accountKey, _ := coinTypeKey.NewChildKey(0x80000000) // 0' + changeKey, _ := accountKey.NewChildKey(0) // 0 + indexKey, _ := changeKey.NewChildKey(0) // 0 + + return KeyEntry{ + PublicKey: indexKey.PublicKey().B58Serialize(), // i.e. "xpub6GNKSnPmR5zN3Ef3EqYkSJTZzjzGecb1n1SqJRUNnoFPsyxviG7QyoVzjEjP3gfqRu7AvRrEZMfXJazz8pZgmYP6yvvdRqC2pWmWpeQTMBP" + PrivateKey: indexKey.B58Serialize(), // i.e. "xprvA3Ny3GrsaiS4pkaa8p1k5AWqSi9nF9sAQnXEW34mETiR1BdnAioAS1BWsx3uAXKT3NbY6cpY2mQL6N7R8se1GVHqNkpjwc7rv5VRaQ9x8EB" + Account: bech32Addr, // i.e. "cosmos1pyxjp07wc207l7jecyr3wcmq9cr54tqwhcwugm" + Address: address.Bytes(), // i.e. [9, 13, 32, 191, 206, 194, 159, 239, 250, 89, 193, 7, 23, 99, 96, 46, 7, 74, 172, 14] + } +} +func ChainConfigToHyperspaceRelayerChainConfig(chainConfig ibc.ChainConfig, keyName, rpcAddr, grpcAddr string) interface{} { + chainType := chainConfig.Type + if chainType == "polkadot" || chainType == "parachain" || chainType == "relaychain" { + chainType = "parachain" + } + + if chainType == "parachain" { + addrs := strings.Split(rpcAddr, ",") + paraRpcAddr := rpcAddr + relayRpcAddr := grpcAddr + if len(addrs) > 1 { + paraRpcAddr, relayRpcAddr = addrs[0], addrs[1] + } + return HyperspaceRelayerSubstrateChainConfig{ + Type: chainType, + Name: chainConfig.Name, + ParaID: 2000, + ParachainRPCURL: strings.Replace(strings.Replace(paraRpcAddr, "http", "ws", 1), "9933", "27451", 1), + RelayChainRPCURL: strings.Replace(strings.Replace(relayRpcAddr, "http", "ws", 1), "9933", "27451", 1), + CommitmentPrefix: "0x6962632f", + PrivateKey: "//Alice", + SS58Version: polkadot.Ss58Format, + KeyType: "sr25519", + FinalityProtocol: "Grandpa", + } + } else if chainType == "cosmos" { + wsUrl := strings.Replace(rpcAddr, "http", "ws", 1) + "/websocket" + return HyperspaceRelayerCosmosChainConfig{ + Type: chainType, + Name: chainConfig.Name, + ChainID: chainConfig.ChainID, + AccountPrefix: chainConfig.Bech32Prefix, + FeeDenom: "stake", + FeeAmount: "4000", + GasLimit: 10_000_000, + GRPCUrl: "http://" + grpcAddr, + RPCUrl: rpcAddr, + StorePrefix: "ibc", + MaxTxSize: 200000, + WebsocketUrl: wsUrl, + } + } else { + panic(fmt.Sprintf("unsupported chain type %s", chainType)) + } +} diff --git a/relayer/hyperspace/hyperspace_relayer.go b/relayer/hyperspace/hyperspace_relayer.go new file mode 100644 index 000000000..e5bb74344 --- /dev/null +++ b/relayer/hyperspace/hyperspace_relayer.go @@ -0,0 +1,206 @@ +// Package hyperspace provides an interface to the hyperspace relayer running in a Docker container. +package hyperspace + +import ( + "context" + "fmt" + "path" + "time" + + "github.com/docker/docker/client" + "github.com/pelletier/go-toml/v2" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v7/relayer" + "go.uber.org/zap" +) + +var _ ibc.Relayer = &HyperspaceRelayer{} + +// ******* DockerRelayer methods that will panic in hyperspace commander, no overrides yet ******* +// FlushAcknowledgements() - no hyperspace implementation yet +// FlushPackets() - no hypersapce implementation yet +// UpdatePath() - hyperspace doesn't understand paths, may not be needed. +// UpdateClients() - no hyperspace implementation yet +// AddKey() - no hyperspace implementation yet + +// HyperspaceRelayer is the ibc.Relayer implementation for github.com/ComposableFi/hyperspace. +type HyperspaceRelayer struct { + // Embedded DockerRelayer so commands just work. + *relayer.DockerRelayer +} + +func NewHyperspaceRelayer(log *zap.Logger, testName string, cli *client.Client, networkID string, options ...relayer.RelayerOption) *HyperspaceRelayer { + c := hyperspaceCommander{log: log} + for _, opt := range options { + switch o := opt.(type) { + case relayer.RelayerOptionExtraStartFlags: + c.extraStartFlags = o.Flags + } + } + dr, err := relayer.NewDockerRelayer(context.TODO(), log, testName, cli, networkID, &c, options...) + if err != nil { + panic(err) // TODO: return + } + + coreConfig := HyperspaceRelayerCoreConfig{ + PrometheusEndpoint: "", + } + bytes, err := toml.Marshal(coreConfig) + if err != nil { + panic(err) // TODO: return + } + err = dr.WriteFileToHomeDir(context.TODO(), "core.config", bytes) + if err != nil { + panic(err) // TODO: return + } + + r := &HyperspaceRelayer{ + DockerRelayer: dr, + } + + return r +} + +// HyperspaceCapabilities returns the set of capabilities of the Cosmos relayer. +// +// Note, this API may change if the rly package eventually needs +// to distinguish between multiple rly versions. +func HyperspaceCapabilities() map[relayer.Capability]bool { + // RC1 matches the full set of capabilities as of writing. + return nil // relayer.FullCapabilities() +} + +// LinkPath performs the operations that happen when a path is linked. This includes creating clients, creating connections +// and establishing a channel. This happens across multiple operations rather than a single link path cli command. +// Parachains need a Polkadot epoch/session before starting, do not link in interchain.Build() +func (r *HyperspaceRelayer) LinkPath(ctx context.Context, rep ibc.RelayerExecReporter, pathName string, channelOpts ibc.CreateChannelOptions, clientOpts ibc.CreateClientOptions) error { + if err := r.CreateClients(ctx, rep, pathName, clientOpts); err != nil { + return err + } + + if err := r.CreateConnections(ctx, rep, pathName); err != nil { + return err + } + + if err := r.CreateChannel(ctx, rep, pathName, channelOpts); err != nil { + return err + } + + return nil +} + +func (r *HyperspaceRelayer) RestoreKey(ctx context.Context, rep ibc.RelayerExecReporter, cfg ibc.ChainConfig, keyName, mnemonic string) error { + addrBytes := "" + chainID := cfg.ChainID + coinType := cfg.CoinType + chainType := cfg.Type + + chainConfigFile := chainID + ".config" + config, err := r.GetRelayerChainConfig(ctx, chainConfigFile, chainType) + if err != nil { + return err + } + switch chainType { + case "cosmos": + bech32Prefix := cfg.Bech32Prefix + config.(*HyperspaceRelayerCosmosChainConfig).Keybase = GenKeyEntry(bech32Prefix, coinType, mnemonic) + case "polkadot": + config.(*HyperspaceRelayerSubstrateChainConfig).PrivateKey = mnemonic + } + + err = r.SetRelayerChainConfig(ctx, chainConfigFile, config) + if err != nil { + return err + } + + r.AddWallet(chainID, NewWallet(chainID, addrBytes, mnemonic)) + + return nil +} + +func (r *HyperspaceRelayer) SetClientContractHash(ctx context.Context, rep ibc.RelayerExecReporter, cfg ibc.ChainConfig, hash string) error { + chainID := cfg.ChainID + chainType := cfg.Type + chainConfigFile := chainID + ".config" + config, err := r.GetRelayerChainConfig(ctx, chainConfigFile, chainType) + if err != nil { + return err + } + switch chainType { + case "cosmos": + config.(*HyperspaceRelayerCosmosChainConfig).WasmCodeId = hash + } + + return r.SetRelayerChainConfig(ctx, chainConfigFile, config) +} + +func (r *HyperspaceRelayer) PrintCoreConfig(ctx context.Context, rep ibc.RelayerExecReporter) error { + cmd := []string{ + "cat", + path.Join(r.HomeDir(), "core.config"), + } + + ctx, cancel := context.WithTimeout(ctx, time.Minute) + defer cancel() + res := r.Exec(ctx, rep, cmd, nil) + if res.Err != nil { + return res.Err + } + fmt.Println(string(res.Stdout)) + return nil +} + +func (r *HyperspaceRelayer) PrintConfigs(ctx context.Context, rep ibc.RelayerExecReporter, chainID string) error { + cmd := []string{ + "cat", + path.Join(r.HomeDir(), chainID+".config"), + } + + ctx, cancel := context.WithTimeout(ctx, time.Minute) + defer cancel() + res := r.Exec(ctx, rep, cmd, nil) + if res.Err != nil { + return res.Err + } + fmt.Println(string(res.Stdout)) + return nil +} + +func (r *HyperspaceRelayer) GetRelayerChainConfig( + ctx context.Context, + filePath string, + chainType string, +) (interface{}, error) { + configRaw, err := r.ReadFileFromHomeDir(ctx, filePath) + if err != nil { + return nil, err + } + + switch chainType { + case "cosmos": + var config HyperspaceRelayerCosmosChainConfig + if err := toml.Unmarshal(configRaw, &config); err != nil { + return nil, fmt.Errorf("failed to unmarshal %s: %w", filePath, err) + } + return &config, nil + case "polkadot": + var config HyperspaceRelayerSubstrateChainConfig + if err := toml.Unmarshal(configRaw, &config); err != nil { + return nil, fmt.Errorf("failed to unmarshal %s: %w", filePath, err) + } + return &config, nil + } + return nil, fmt.Errorf("unsupported chain config: %s", chainType) +} +func (r *HyperspaceRelayer) SetRelayerChainConfig( + ctx context.Context, + filePath string, + config interface{}, +) error { + bytes, err := toml.Marshal(config) + if err != nil { + return err + } + + return r.WriteFileToHomeDir(ctx, filePath, bytes) +} diff --git a/relayer/hyperspace/hyperspace_test.go b/relayer/hyperspace/hyperspace_test.go new file mode 100644 index 000000000..996684d40 --- /dev/null +++ b/relayer/hyperspace/hyperspace_test.go @@ -0,0 +1,27 @@ +package hyperspace_test + +import ( + "testing" + + "github.com/strangelove-ventures/interchaintest/v7/relayer/hyperspace" + "github.com/stretchr/testify/require" +) + +func TestKeys(t *testing.T) { + bech32Prefix := "cosmos" + coinType := "118" + mnemonic := "taste shoot adapt slow truly grape gift need suggest midnight burger horn whisper hat vast aspect exit scorpion jewel axis great area awful blind" + + expectedKeyEntry := hyperspace.KeyEntry{ + PublicKey: "xpub6G1GwQBqWwXuCRhri9q1JzxZ9eMWFazo2ssoZNkAsqusDTT6MPUXiPaXMJS9v4RVaSmYPhA1HK5RCD7WPutmUn3eeqXduM142X7YRVBx8bn", + PrivateKey: "xprvA31vXtewgZybywdPc8Hzws1pbcX1r8GwfexCkzLZKWNtLf7worAHAbG3W3F1SagK47ng5877ihXkDvmNfZnVHSGw7Ad1JkzyPTKEtSpmSxa", + Address: []byte{69, 6, 166, 110, 97, 215, 215, 210, 224, 48, 93, 126, 44, 86, 4, 36, 109, 137, 43, 242}, + Account: "cosmos1g5r2vmnp6lta9cpst4lzc4syy3kcj2lj0nuhmy", + } + + keyEntry := hyperspace.GenKeyEntry(bech32Prefix, coinType, mnemonic) + require.Equal(t, expectedKeyEntry.PublicKey, keyEntry.PublicKey, "PublicKey is wrong") + require.Equal(t, expectedKeyEntry.PrivateKey, keyEntry.PrivateKey, "PrivateKey is wrong") + require.Equal(t, expectedKeyEntry.Account, keyEntry.Account, "Account is wrong") + require.Equal(t, expectedKeyEntry.Address, keyEntry.Address, "Address is wrong") +} diff --git a/relayer/hyperspace/wallet.go b/relayer/hyperspace/wallet.go new file mode 100644 index 000000000..441cf8f9e --- /dev/null +++ b/relayer/hyperspace/wallet.go @@ -0,0 +1,44 @@ +package hyperspace + +import ( + "github.com/strangelove-ventures/interchaintest/v7/ibc" +) + +var _ ibc.Wallet = &HyperspaceWallet{} + +type WalletModel struct { + Mnemonic string `json:"mnemonic"` + Address string `json:"address"` +} + +type HyperspaceWallet struct { + mnemonic string + address string + keyName string +} + +func NewWallet(keyname string, address string, mnemonic string) *HyperspaceWallet { + return &HyperspaceWallet{ + mnemonic: mnemonic, + address: address, + keyName: keyname, + } +} + +func (w *HyperspaceWallet) KeyName() string { + return w.keyName +} + +func (w *HyperspaceWallet) FormattedAddress() string { + return w.address +} + +// Get mnemonic, only used for relayer wallets +func (w *HyperspaceWallet) Mnemonic() string { + return w.mnemonic +} + +// Get Address +func (w *HyperspaceWallet) Address() []byte { + return []byte(w.address) +} diff --git a/relayer/rly/cosmos_relayer.go b/relayer/rly/cosmos_relayer.go index 5a148e912..0f6434488 100644 --- a/relayer/rly/cosmos_relayer.go +++ b/relayer/rly/cosmos_relayer.go @@ -66,7 +66,7 @@ type CosmosRelayerChainConfig struct { const ( DefaultContainerImage = "ghcr.io/cosmos/relayer" - DefaultContainerVersion = "andrew-config_file_lock_for_all_writes" + DefaultContainerVersion = "v2.3.1" ) // Capabilities returns the set of capabilities of the Cosmos relayer. diff --git a/relayerfactory.go b/relayerfactory.go index 34c5e8cd6..bb9808b69 100644 --- a/relayerfactory.go +++ b/relayerfactory.go @@ -6,9 +6,9 @@ import ( "github.com/docker/docker/client" "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/label" "github.com/strangelove-ventures/interchaintest/v7/relayer" "github.com/strangelove-ventures/interchaintest/v7/relayer/hermes" + "github.com/strangelove-ventures/interchaintest/v7/relayer/hyperspace" "github.com/strangelove-ventures/interchaintest/v7/relayer/rly" "go.uber.org/zap" ) @@ -26,14 +26,6 @@ type RelayerFactory interface { // indicating details of the Relayer that will be built. Name() string - // Labels are reported to allow simple filtering of tests depending on this Relayer. - // While the Name should be fully descriptive, - // the Labels are intended to be short and fixed. - // - // Most relayers will probably only have one label indicative of its name, - // but we allow multiple labels for future compatibility. - Labels() []label.Relayer - // Capabilities is an indication of the features this relayer supports. // Tests for any unsupported features will be skipped rather than failed. Capabilities() map[relayer.Capability]bool @@ -66,6 +58,14 @@ func (f builtinRelayerFactory) Build( networkID, f.options..., ) + case ibc.Hyperspace: + return hyperspace.NewHyperspaceRelayer( + f.log, + t.Name(), + cli, + networkID, + f.options..., + ) case ibc.Hermes: return hermes.NewHermesRelayer(f.log, t.Name(), cli, networkID, f.options...) default: @@ -99,17 +99,6 @@ func (f builtinRelayerFactory) Name() string { } } -func (f builtinRelayerFactory) Labels() []label.Relayer { - switch f.impl { - case ibc.CosmosRly: - return []label.Relayer{label.Rly} - case ibc.Hermes: - return []label.Relayer{label.Hermes} - default: - panic(fmt.Errorf("RelayerImplementation %v unknown", f.impl)) - } -} - // Capabilities returns the set of capabilities for the // relayer implementation backing this factory. func (f builtinRelayerFactory) Capabilities() map[relayer.Capability]bool { diff --git a/test_user.go b/test_user.go index eb86f5992..50877a73e 100644 --- a/test_user.go +++ b/test_user.go @@ -5,6 +5,7 @@ import ( "fmt" "testing" + "cosmossdk.io/math" "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" "github.com/strangelove-ventures/interchaintest/v7/testutil" @@ -30,7 +31,7 @@ func GetAndFundTestUserWithMnemonic( err = chain.SendFunds(ctx, FaucetAccountKeyName, ibc.WalletAmount{ Address: user.FormattedAddress(), - Amount: amount, + Amount: math.NewInt(amount), Denom: chainCfg.Denom, }) if err != nil { diff --git a/testreporter/messages.go b/testreporter/messages.go index ffa78cd60..a70c109c2 100644 --- a/testreporter/messages.go +++ b/testreporter/messages.go @@ -4,8 +4,6 @@ import ( "encoding/json" "fmt" "time" - - "github.com/strangelove-ventures/interchaintest/v7/label" ) // Message is the sentinel interface to all testreporter messages. @@ -43,15 +41,6 @@ func (m FinishSuiteMessage) typ() string { type BeginTestMessage struct { Name string StartedAt time.Time - Labels LabelSet -} - -// LabelSet is the set of labels that can be associated with a test. -type LabelSet struct { - Relayer []label.Relayer `json:",omitempty"` - Chain []label.Chain `json:",omitempty"` - - Test []label.Test `json:",omitempty"` } func (m BeginTestMessage) typ() string { diff --git a/testreporter/messages_test.go b/testreporter/messages_test.go index 7623fb841..678bb8915 100644 --- a/testreporter/messages_test.go +++ b/testreporter/messages_test.go @@ -6,7 +6,6 @@ import ( "time" "github.com/google/go-cmp/cmp" - "github.com/strangelove-ventures/interchaintest/v7/label" "github.com/strangelove-ventures/interchaintest/v7/testreporter" "github.com/stretchr/testify/require" ) @@ -21,11 +20,6 @@ func TestWrappedMessage_RoundTrip(t *testing.T) { Message: testreporter.BeginTestMessage{ Name: "foo", StartedAt: time.Now(), - Labels: testreporter.LabelSet{ - Relayer: []label.Relayer{label.Rly}, - Chain: []label.Chain{label.Gaia}, - Test: []label.Test{label.Timeout}, - }, }, }, {Message: testreporter.PauseTestMessage{Name: "foo", When: time.Now()}}, diff --git a/testreporter/reporter.go b/testreporter/reporter.go index 130205c18..bb6b1904c 100644 --- a/testreporter/reporter.go +++ b/testreporter/reporter.go @@ -5,8 +5,6 @@ import ( "fmt" "io" "time" - - "github.com/strangelove-ventures/interchaintest/v7/label" ) // T is a subset of testing.TB, @@ -71,43 +69,13 @@ func (r *Reporter) Close() error { return <-r.writerDone } -// TrackParameters is intended to be called from the outermost layer of tests. -// It tracks the test run including labels indicative of what relayers and chains are used. -func (r *Reporter) TrackParameters(t T, relayerLabels []label.Relayer, chainLabels []label.Chain) { - for _, l := range relayerLabels { - if !l.IsKnown() { - panic(fmt.Errorf("illegal use of unknown relayer label %q", l)) - } - } - // Allowing unknown chain labels, for now. - - r.trackTest(t, LabelSet{ - Relayer: relayerLabels, - Chain: chainLabels, - }) -} - -// TrackTest tracks execution of a subtest using the supplied labels. -func (r *Reporter) TrackTest(t T, labels ...label.Test) { - for _, l := range labels { - if !l.IsKnown() { - panic(fmt.Errorf("illegal use of unknown test label %q", l)) - } - } - - r.trackTest(t, LabelSet{ - Test: labels, - }) -} - // trackTest tracks the test start and finish time. // It also records which labels are present on the test. -func (r *Reporter) trackTest(t T, labels LabelSet) { +func (r *Reporter) TrackTest(t T) { name := t.Name() r.in <- BeginTestMessage{ Name: name, StartedAt: time.Now(), - Labels: labels, } t.Cleanup(func() { r.in <- FinishTestMessage{ diff --git a/testreporter/reporter_test.go b/testreporter/reporter_test.go index a1e698515..541d3d171 100644 --- a/testreporter/reporter_test.go +++ b/testreporter/reporter_test.go @@ -9,7 +9,6 @@ import ( "github.com/google/go-cmp/cmp" "github.com/strangelove-ventures/interchaintest/v7/internal/mocktesting" - "github.com/strangelove-ventures/interchaintest/v7/label" "github.com/strangelove-ventures/interchaintest/v7/testreporter" "github.com/stretchr/testify/require" ) @@ -57,7 +56,7 @@ func TestReporter_TrackPassingSingleTest(t *testing.T) { mt := mocktesting.NewT("my_test") beforeStartTest := time.Now() - r.TrackTest(mt, label.Timeout) + r.TrackTest(mt) afterStartTest := time.Now() time.Sleep(10 * time.Millisecond) @@ -78,7 +77,6 @@ func TestReporter_TrackPassingSingleTest(t *testing.T) { beginTestMsg := msgs[1].(testreporter.BeginTestMessage) require.Equal(t, beginTestMsg.Name, "my_test") - require.Equal(t, beginTestMsg.Labels, testreporter.LabelSet{Test: []label.Test{label.Timeout}}) requireTimeInRange(t, beginTestMsg.StartedAt, beforeStartTest, afterStartTest) finishTestMsg := msgs[2].(testreporter.FinishTestMessage) diff --git a/testutil/gzip.go b/testutil/gzip.go new file mode 100644 index 000000000..f5ef98c05 --- /dev/null +++ b/testutil/gzip.go @@ -0,0 +1,23 @@ +package testutil + +import ( + "bytes" + "compress/gzip" +) + +// GzipIt compresses the input ([]byte) +func GzipIt(input []byte) ([]byte, error) { + // Create gzip writer. + var b bytes.Buffer + w := gzip.NewWriter(&b) + _, err := w.Write(input) + if err != nil { + return nil, err + } + err = w.Close() // You must close this first to flush the bytes to the buffer. + if err != nil { + return nil, err + } + + return b.Bytes(), nil +}