Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NTRN-195 feat: support all possible keyrings #53

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
42e8954
wip
oldremez Oct 21, 2022
0507fd2
wip
oldremez Oct 25, 2022
45cae0b
works with test/memory backend
oldremez Oct 26, 2022
6cecf30
wip
oldremez Oct 29, 2022
d32bce9
os, test, memory look working
oldremez Oct 30, 2022
306e337
refactoring
oldremez Nov 3, 2022
e418fb0
Merge branch 'main' into feat/keychain
oldremez Nov 3, 2022
1d9da9b
logger fix
oldremez Nov 3, 2022
3b5a45f
Merge branch 'main' into feat/keychain
oldremez Nov 7, 2022
1df5d18
Merge branch 'main' into feat/keychain
oldremez Nov 8, 2022
570764f
README fix and a bit of refactoring
oldremez Nov 9, 2022
7f28d63
modified way of dev launching
oldremez Nov 15, 2022
499993f
small todo added
oldremez Nov 15, 2022
b10aa42
Merge branch 'main' into feat/keychain
oldremez Nov 15, 2022
189a629
Merge branch 'main' into feat/keychain
oldremez Nov 16, 2022
878541f
Couple of merge fuckups fixed
oldremez Nov 16, 2022
818eb5e
goimports
oldremez Nov 16, 2022
361a0be
Merge branch 'main' into feat/keychain
oldremez Nov 18, 2022
23273fb
post-merge goimports and refactoring
oldremez Nov 18, 2022
365d4eb
make image name configurable
oldremez Dec 1, 2022
3adf046
post-review added new parameters to example config
oldremez Dec 2, 2022
29607cb
post-review passReader simplifying
oldremez Dec 9, 2022
710fe5d
post-review loadChains separation
oldremez Dec 9, 2022
e674f6d
post-review more descriptive type cast error
oldremez Dec 9, 2022
78e68e9
post-review remove default CosmosProviderConfig params in GetTargetChain
oldremez Dec 9, 2022
98aa571
post-review relayer_keyring -> keyring
oldremez Dec 9, 2022
9c478cc
post-review separate keyring config
oldremez Dec 9, 2022
a1ea267
Merge branch 'main' into feat/keychain
oldremez Dec 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@
RELAYER_NEUTRON_CHAIN_RPC_ADDR=tcp://host.docker.internal:16657
RELAYER_NEUTRON_CHAIN_REST_ADDR=http://host.docker.internal:1316
RELAYER_NEUTRON_CHAIN_HOME_DIR=/data/test-1
RELAYER_NEUTRON_CHAIN_SIGN_KEY_NAME=demowallet1
RELAYER_NEUTRON_CHAIN_TIMEOUT=10s
RELAYER_NEUTRON_CHAIN_GAS_PRICES=0.5stake
RELAYER_NEUTRON_CHAIN_GAS_LIMIT=10000000
RELAYER_NEUTRON_CHAIN_GAS_ADJUSTMENT=2.0
RELAYER_NEUTRON_CHAIN_CONNECTION_ID=connection-0
RELAYER_NEUTRON_CHAIN_DEBUG=true
RELAYER_NEUTRON_CHAIN_KEYRING_BACKEND=test
RELAYER_NEUTRON_CHAIN_OUTPUT_FORMAT=json
RELAYER_NEUTRON_CHAIN_SIGN_MODE_STR=direct

RELAYER_NEUTRON_CHAIN_KEYRING_BACKEND=test
RELAYER_NEUTRON_CHAIN_SIGN_KEY_NAME=demowallet1
#RELAYER_NEUTRON_CHAIN_KEYRING_PASSWORD=P@ssw0rd1
#RELAYER_NEUTRON_CHAIN_SIGN_KEY_SEED="mnemonic"
#RELAYER_NEUTRON_CHAIN_SIGN_KEY_HD_PATH="m/44'/118'/0'/0/0"

RELAYER_TARGET_CHAIN_RPC_ADDR=tcp://host.docker.internal:26657
RELAYER_TARGET_CHAIN_ACCOUNT_PREFIX=neutron
RELAYER_TARGET_CHAIN_VALIDATOR_ACCOUNT_PREFIX=neutrondeveloper
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ COMMIT := $(shell git log -1 --format='%H')
ldflags = -X github.com/neutron-org/neutron-query-relayer/internal/app.Version=$(VERSION) \
-X github.com/neutron-org/neutron-query-relayer/internal/app.Commit=$(COMMIT)

RELAYER_IMAGE_NAME ?= neutron-org/neutron-query-relayer

dev: clean
go run ./cmd/neutron_query_relayer/ start

Expand All @@ -19,7 +21,7 @@ build:
go build -ldflags '$(ldflags)' -a -o build/neutron_query_relayer ./cmd/neutron_query_relayer/*.go

build-docker:
docker build --build-arg LDFLAGS='$(ldflags)' . -t neutron-org/neutron-query-relayer
docker build --build-arg LDFLAGS='$(ldflags)' . -t $(RELAYER_IMAGE_NAME)

generate-openapi:
@cd ./internal/subscriber/querier ; swagger generate client -f openapi.yml
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Clone the following repositories to the same folder where the neutron-query-rela
1. copy `.env.example` and rename the copy to `.env`
2. set env from env list via way you prefer and run relayer:

`export $(grep -v '^#' .env | xargs) && make dev`
`./run_dev.sh`

### Testing via docker

Expand Down Expand Up @@ -85,14 +85,17 @@ Relayer:
| `RELAYER_NEUTRON_CHAIN_RPC_ADDR` | `string` | rpc address of neutron chain | required |
| `RELAYER_NEUTRON_CHAIN_REST_ADDR` | `string` | rest address of neutron chain | required |
| `RELAYER_NEUTRON_CHAIN_HOME_DIR ` | `string` | path to keys directory | required |
| `RELAYER_NEUTRON_CHAIN_SIGN_KEY_NAME` | `string` | key name | required |
| `RELAYER_NEUTRON_CHAIN_TIMEOUT ` | `time` | timeout of neutron chain provider | optional |
| `RELAYER_NEUTRON_CHAIN_GAS_PRICES` | `string` | specifies how much the user is willing to pay per unit of gas, which can be one or multiple denominations of token | required |
| `RELAYER_NEUTRON_CHAIN_GAS_LIMIT` | `string` | the maximum price a relayer user is willing to pay for relayer's paid blockchain actions | required |
| `RELAYER_NEUTRON_CHAIN_GAS_ADJUSTMENT` | `float` | used to scale gas up in order to avoid underestimating. For example, users can specify their gas adjustment as 1.5 to use 1.5 times the estimated gas | required |
| `RELAYER_NEUTRON_CHAIN_CONNECTION_ID` | `string` | neutron chain connection ID | required |
| `RELAYER_NEUTRON_CHAIN_DEBUG ` | `bool` | flag to run neutron chain provider in debug mode | optional |
| `RELAYER_NEUTRON_CHAIN_KEYRING_BACKEND` | `string` | [see](https://docs.cosmos.network/master/run-node/keyring.html#the-kwallet-backend) | required |
| `RELAYER_NEUTRON_CHAIN_KEYRING_BACKEND` | `string` | keyring backend where the Neutron key for ICQ relayer is stored | required |
| `RELAYER_NEUTRON_CHAIN_KEYRING_PASSWORD` | `string` | password for keyring backend (required for `os`, `file`, `pass`, `kwallet`; ignored for `memory` and `test`) | optional |
| `RELAYER_NEUTRON_CHAIN_SIGN_KEY_NAME` | `string` | key name (required for any backend type but `memory`) | optional |
| `RELAYER_NEUTRON_CHAIN_SIGN_KEY_SEED` | `string` | key seed (required for `memory` backend, ignored for any other type) | optional |
| `RELAYER_NEUTRON_CHAIN_SIGN_KEY_HD_PATH` | `string` | key HD path (optional for `memory` backend, ignored for any other type) | optional |
sotnikov-s marked this conversation as resolved.
Show resolved Hide resolved
| `RELAYER_NEUTRON_CHAIN_OUTPUT_FORMAT` | `json` OR `yaml` | neutron chain provider output format | required |
| `RELAYER_NEUTRON_CHAIN_SIGN_MODE_STR ` | `string` | [see](https://docs.cosmos.network/master/core/transactions.html#signing-transactions) also consider use short variation, e.g. `direct` | optional |
| `RELAYER_TARGET_CHAIN_RPC_ADDR` | `string` | rpc address of target chain | required |
Expand Down
5 changes: 3 additions & 2 deletions cmd/neutron_query_relayer/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ package cmd
import (
"context"
"fmt"
"github.com/neutron-org/neutron-query-relayer/internal/relay"
"log"
"net/http"
"os"
"os/signal"
"sync"
"syscall"

"github.com/neutron-org/neutron-query-relayer/internal/relay"

"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/spf13/cobra"
"go.uber.org/zap"
Expand Down Expand Up @@ -78,7 +79,7 @@ func startRelayer() {
wg := &sync.WaitGroup{}

// The storage has to be shared because of the LevelDB single process restriction.
storage, err := app.NewDefaultStorage(cfg, logger)
storage, err := app.NewDefaultStorage(cfg)
if err != nil {
logger.Fatal("Failed to create NewDefaultStorage", zap.Error(err))
}
Expand Down
88 changes: 62 additions & 26 deletions internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,25 @@ package app
import (
"context"
"fmt"

"github.com/cosmos/cosmos-sdk/crypto/keyring"

"github.com/avast/retry-go/v4"
cosmosrelayer "github.com/cosmos/relayer/v2/relayer"
"github.com/cosmos/relayer/v2/relayer/provider/cosmos"

"time"

rpcclienthttp "github.com/tendermint/tendermint/rpc/client/http"
"go.uber.org/zap"

nlogger "github.com/neutron-org/neutron-logger"
"github.com/neutron-org/neutron-query-relayer/internal/config"
"github.com/neutron-org/neutron-query-relayer/internal/kvprocessor"
"github.com/neutron-org/neutron-query-relayer/internal/raw"
"github.com/neutron-org/neutron-query-relayer/internal/registry"
"github.com/neutron-org/neutron-query-relayer/internal/relay"
"github.com/neutron-org/neutron-query-relayer/internal/relayer_keyring"
"github.com/neutron-org/neutron-query-relayer/internal/storage"
"github.com/neutron-org/neutron-query-relayer/internal/submit"
relaysubscriber "github.com/neutron-org/neutron-query-relayer/internal/subscriber"
Expand All @@ -22,9 +33,6 @@ import (
"github.com/neutron-org/neutron-query-relayer/internal/txsubmitchecker"
neutronapp "github.com/neutron-org/neutron/app"
neutrontypes "github.com/neutron-org/neutron/x/interchainqueries/types"
rpcclienthttp "github.com/tendermint/tendermint/rpc/client/http"
"go.uber.org/zap"
"time"
)

var (
Expand Down Expand Up @@ -99,6 +107,8 @@ func NewDefaultRelayer(
globalCfg := neutronapp.GetDefaultConfig()
globalCfg.Seal()

logger := logRegistry.Get(AppContext)

targetClient, err := raw.NewRPCClient(cfg.TargetChain.RPCAddr, cfg.TargetChain.Timeout)
if err != nil {
return nil, fmt.Errorf("could not initialize target rpc client: %w", err)
Expand All @@ -121,19 +131,32 @@ func NewDefaultRelayer(
}

codec := raw.MakeCodecDefault()
keybase, err := submit.TestKeybase(connParams.neutronChainID, cfg.NeutronChain.HomeDir)
keybase, keyName, err := relayer_keyring.InitializeKeyring(
cfg.NeutronChain.KeyringBackend,
cfg.NeutronChain.KeyringPassword,
cfg.NeutronChain.HomeDir,
cfg.NeutronChain.SignKeyName,
cfg.NeutronChain.SignKeySeed,
cfg.NeutronChain.SignKeyHdPath,
)
if err != nil {
return nil, fmt.Errorf("cannot initialize keybase: %w", err)
}
logger.Debug("keyring initialized", zap.String("keyring_backend", cfg.NeutronChain.KeyringBackend))

txSender, err := submit.NewTxSender(ctx, neutronClient, codec.Marshaller, keybase, *cfg.NeutronChain, logRegistry.Get(TxSenderContext), connParams.neutronChainID)
txSender, err := submit.NewTxSender(ctx, neutronClient, codec.Marshaller, *cfg.NeutronChain, keybase, keyName, logRegistry.Get(TxSenderContext), connParams.neutronChainID)
if err != nil {
return nil, fmt.Errorf("cannot create tx sender: %w", err)
}

neutronChain, targetChain, err := loadChains(cfg, logRegistry, connParams)
neutronChain, err := loadNeutronChain(cfg, keybase, keyName, logRegistry, connParams)
if err != nil {
return nil, fmt.Errorf("failed to loadChains: %w", err)
return nil, fmt.Errorf("failed to load Neutron chain: %w", err)
}

targetChain, err := loadTargetChain(cfg, logRegistry, connParams)
if err != nil {
return nil, fmt.Errorf("failed to load target chain: %w", err)
}

var (
Expand Down Expand Up @@ -165,7 +188,7 @@ func NewDefaultRelayer(
return relayer, nil
}

func NewDefaultStorage(cfg config.NeutronQueryRelayerConfig, logger *zap.Logger) (relay.Storage, error) {
func NewDefaultStorage(cfg config.NeutronQueryRelayerConfig) (relay.Storage, error) {
var (
err error
leveldbStorage relay.Storage
Expand All @@ -179,38 +202,51 @@ func NewDefaultStorage(cfg config.NeutronQueryRelayerConfig, logger *zap.Logger)
return leveldbStorage, nil
}

func loadChains(
cfg config.NeutronQueryRelayerConfig,
logRegistry *nlogger.Registry,
connParams *connectionParams,
) (neutronChain *cosmosrelayer.Chain, targetChain *cosmosrelayer.Chain, err error) {
targetChain, err = relay.GetTargetChain(logRegistry.Get(TargetChainProviderContext), cfg.TargetChain, connParams.targetChainID)
func loadNeutronChain(cfg config.NeutronQueryRelayerConfig,
keybase keyring.Keyring, keyName string, logRegistry *nlogger.Registry, connParams *connectionParams,
) (neutronChain *cosmosrelayer.Chain, err error) {
neutronChain, err = relay.GetNeutronChain(logRegistry.Get(NeutronChainProviderContext), cfg.NeutronChain, connParams.neutronChainID, keyName)

if err != nil {
return nil, nil, fmt.Errorf("failed to load target chain from env: %w", err)
return nil, fmt.Errorf("failed to load neutron chain from env: %w", err)
}

if err := targetChain.AddPath(connParams.targetClientID, connParams.targetConnectionID); err != nil {
return nil, nil, fmt.Errorf("failed to AddPath to source chain: %w", err)
if err := neutronChain.AddPath(connParams.neutronClientID, cfg.NeutronChain.ConnectionID); err != nil {
return nil, fmt.Errorf("failed to AddPath to destination chain: %w", err)
}

if err := targetChain.ChainProvider.Init(); err != nil {
return nil, nil, fmt.Errorf("failed to Init source chain provider: %w", err)
if err := neutronChain.ChainProvider.Init(); err != nil {
return nil, fmt.Errorf("failed to Init source chain provider: %w", err)
}

// Workaround to have more flexibility in keyring configuration
// Unfortunately, ChainProvider interface doesn't allow configuring keyring properly or passing existing one
provConcrete, ok := neutronChain.ChainProvider.(*cosmos.CosmosProvider)
if !ok {
return nil, fmt.Errorf("failed to patch CosmosProvider config (type cast failed)")
}
provConcrete.Keybase = keybase

return neutronChain, nil
}

neutronChain, err = relay.GetNeutronChain(logRegistry.Get(NeutronChainProviderContext), cfg.NeutronChain, connParams.neutronChainID)
func loadTargetChain(cfg config.NeutronQueryRelayerConfig,
logRegistry *nlogger.Registry, connParams *connectionParams,
) (targetChain *cosmosrelayer.Chain, err error) {
targetChain, err = relay.GetTargetChain(logRegistry.Get(TargetChainProviderContext), cfg.TargetChain, connParams.targetChainID)
if err != nil {
return nil, nil, fmt.Errorf("failed to load neutron chain from env: %w", err)
return nil, fmt.Errorf("failed to load target chain from env: %w", err)
}

if err := neutronChain.AddPath(connParams.neutronClientID, cfg.NeutronChain.ConnectionID); err != nil {
return nil, nil, fmt.Errorf("failed to AddPath to destination chain: %w", err)
if err := targetChain.AddPath(connParams.targetClientID, connParams.targetConnectionID); err != nil {
return nil, fmt.Errorf("failed to AddPath to source chain: %w", err)
}

if err := neutronChain.ChainProvider.Init(); err != nil {
return nil, nil, fmt.Errorf("failed to Init source chain provider: %w", err)
if err := targetChain.ChainProvider.Init(); err != nil {
return nil, fmt.Errorf("failed to Init source chain provider: %w", err)
}

return neutronChain, targetChain, nil
return targetChain, nil
}

type connectionParams struct {
Expand Down
33 changes: 19 additions & 14 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package config

import (
"fmt"
"go.uber.org/zap"
"net"
"net/http"
"net/http/httputil"
"net/url"
"time"

"go.uber.org/zap"

"github.com/kelseyhightower/envconfig"

"github.com/neutron-org/neutron-query-relayer/internal/registry"
Expand All @@ -31,20 +32,24 @@ type NeutronQueryRelayerConfig struct {

const EnvPrefix string = "RELAYER"

// NeutronChainConfig TODO: research if HomeDir parameter is needed for something but keys (so it might be optional and ignored for memory keyring)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's passed to the GetNeutronChain besides its keyring's usage. you can also inspect your ~/.neutrond directory which is the default value for neutrond cli calls and probably come to a conclusion about this TODO:

neutrond --help

...
      --home string         directory for config and data (default "~/.neutrond")
...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I mean of course it's passed there but is it actually needed there?

type NeutronChainConfig struct {
RPCAddr string `required:"true" split_words:"true"`
RESTAddr string `required:"true" split_words:"true"`
HomeDir string `required:"true" split_words:"true"`
SignKeyName string `required:"true" split_words:"true"`
Timeout time.Duration `split_words:"true" default:"10s"`
GasPrices string `required:"true" split_words:"true"`
GasLimit uint64 `split_words:"true" default:"0"`
GasAdjustment float64 `required:"true" split_words:"true"`
ConnectionID string `required:"true" split_words:"true"`
Debug bool `split_words:"true" default:"false"`
KeyringBackend string `required:"true" split_words:"true"`
OutputFormat string `split_words:"true" default:"json"`
SignModeStr string `split_words:"true" default:"direct"`
RPCAddr string `required:"true" split_words:"true"`
RESTAddr string `required:"true" split_words:"true"`
HomeDir string `required:"true" split_words:"true"`
SignKeyName string `split_words:"true"`
SignKeySeed string `split_words:"true"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The config is getting bigger and bigger, how do you feel to move keyring related fields to a standalone struct, or at least place the similar fields next to each other.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, makes sense, did it

SignKeyHdPath string `split_words:"true"`
Timeout time.Duration `split_words:"true" default:"10s"`
GasPrices string `required:"true" split_words:"true"`
GasLimit uint64 `split_words:"true" default:"0"`
GasAdjustment float64 `required:"true" split_words:"true"`
ConnectionID string `required:"true" split_words:"true"`
Debug bool `split_words:"true" default:"false"`
KeyringBackend string `required:"true" split_words:"true"`
KeyringPassword string `split_words:"true"`
OutputFormat string `split_words:"true" default:"json"`
SignModeStr string `split_words:"true" default:"direct"`
}

type TargetChainConfig struct {
Expand Down
33 changes: 13 additions & 20 deletions internal/relay/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package relay
import (
"fmt"

"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/relayer/v2/relayer"
"github.com/cosmos/relayer/v2/relayer/provider/cosmos"
"go.uber.org/zap"
Expand All @@ -11,13 +12,14 @@ import (
neutronapp "github.com/neutron-org/neutron/app"
)

func GetNeutronChain(logger *zap.Logger, cfg *config.NeutronChainConfig, chainID string) (*relayer.Chain, error) {
func GetNeutronChain(logger *zap.Logger, cfg *config.NeutronChainConfig, chainID string, keyName string) (*relayer.Chain, error) {
provCfg := cosmos.CosmosProviderConfig{
Key: cfg.SignKeyName,
ChainID: chainID,
RPCAddr: cfg.RPCAddr,
AccountPrefix: neutronapp.Bech32MainPrefix,
KeyringBackend: cfg.KeyringBackend,
Key: keyName,
ChainID: chainID,
RPCAddr: cfg.RPCAddr,
AccountPrefix: neutronapp.Bech32MainPrefix,
// we ignore provided keyring here since we're to substitute it later after initialization
sotnikov-s marked this conversation as resolved.
Show resolved Hide resolved
KeyringBackend: keyring.BackendMemory,
GasAdjustment: cfg.GasAdjustment,
GasPrices: cfg.GasPrices,
Debug: cfg.Debug,
Expand All @@ -35,13 +37,11 @@ func GetNeutronChain(logger *zap.Logger, cfg *config.NeutronChainConfig, chainID

func GetTargetChain(logger *zap.Logger, cfg *config.TargetChainConfig, chainID string) (*relayer.Chain, error) {
provCfg := cosmos.CosmosProviderConfig{
Key: "",
ChainID: chainID,
RPCAddr: cfg.RPCAddr,
AccountPrefix: cfg.AccountPrefix,
// we don't have any needs in keys for target chain
// but since "KeyringBackend" can't be an empty string we explicitly set it to "test" value to avoid errors
KeyringBackend: "test",
Key: "",
sotnikov-s marked this conversation as resolved.
Show resolved Hide resolved
ChainID: chainID,
RPCAddr: cfg.RPCAddr,
AccountPrefix: cfg.AccountPrefix,
KeyringBackend: keyring.BackendMemory,
GasAdjustment: 0.0,
GasPrices: "",
Debug: cfg.Debug,
Expand All @@ -68,12 +68,5 @@ func getChain(logger *zap.Logger, cfg cosmos.CosmosProviderConfig, homepath stri
return nil, fmt.Errorf("failed to build ChainProvider for %w", err)
}

// Without this hack it doesn't want to work with normal home dir layout for some reason.
provConcrete, ok := prov.(*cosmos.CosmosProvider)
if !ok {
return nil, fmt.Errorf("failed to patch CosmosProvider config (type cast failed)")
}
provConcrete.Config.KeyDirectory = homepath

return relayer.NewChain(logger, prov, debug), nil
}
2 changes: 1 addition & 1 deletion internal/relay/relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func NewRelayer(
func (r *Relayer) Run(
ctx context.Context,
queriesTasksQueue <-chan neutrontypes.RegisteredQuery, // Input tasks come from this channel
submittedTxsTasksQueue chan PendingSubmittedTxInfo, // Tasks for the TxSubmitChecker are sent to this channel
submittedTxsTasksQueue chan PendingSubmittedTxInfo, // Tasks for the TxSubmitChecker are sent to this channel
) error {
for {
var err error
Expand Down
1 change: 1 addition & 0 deletions internal/relay/trusted_headers.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package relay

import (
"context"

"github.com/cosmos/ibc-go/v3/modules/core/exported"

codectypes "github.com/cosmos/cosmos-sdk/codec/types"
Expand Down
Loading