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

icq-relayer v0.11 #1451

Merged
merged 4 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 4 additions & 16 deletions docs/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1659,10 +1659,7 @@ paths:
protobuf release, and it is not used for type URLs
beginning with

type.googleapis.com. As of May 2023, there are no widely
used type server

implementations and no plans to implement one.
type.googleapis.com.


Schemes other than `http`, `https` (or the empty scheme)
Expand Down Expand Up @@ -1707,10 +1704,6 @@ paths:
if (any.is(Foo.class)) {
foo = any.unpack(Foo.class);
}
// or ...
if (any.isSameTypeAs(Foo.getDefaultInstance())) {
foo = any.unpack(Foo.getDefaultInstance());
}

Example 3: Pack and unpack a message in Python.

Expand Down Expand Up @@ -1750,6 +1743,7 @@ paths:
name "y.z".



JSON

====
Expand Down Expand Up @@ -1976,10 +1970,7 @@ paths:
protobuf release, and it is not used for type URLs
beginning with

type.googleapis.com. As of May 2023, there are no widely
used type server

implementations and no plans to implement one.
type.googleapis.com.


Schemes other than `http`, `https` (or the empty scheme)
Expand Down Expand Up @@ -2024,10 +2015,6 @@ paths:
if (any.is(Foo.class)) {
foo = any.unpack(Foo.class);
}
// or ...
if (any.isSameTypeAs(Foo.getDefaultInstance())) {
foo = any.unpack(Foo.getDefaultInstance());
}

Example 3: Pack and unpack a message in Python.

Expand Down Expand Up @@ -2067,6 +2054,7 @@ paths:
name "y.z".



JSON

====
Expand Down
46 changes: 9 additions & 37 deletions icq-relayer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,18 @@ The Interchain Queries (ICQ) Relayer watches for events emitted by the ICQ modul

The ICQ Relayer configuration is controlled by a single YAML file, the default path of which is $HOME/.icq/config.

```yaml
default_chain: quicksilver-1
chains:
quicksilver-1:
key: default
chain-id: quicksilver-1
rpc-addr: https://rpc.quicksilver.zone:443
grpc-addr: https://grpc.quicksilver.zone:443
account-prefix: quick
keyring-backend: test
gas-adjustment: 1.2
gas-prices: 0.01uqck
min-gas-amount: 0
key-directory: /home/joe/.icq/keys
debug: false
timeout: 20s
block-timeout: 10s
output-format: json
sign-mode: direct
osmosis-1:
key: default
chain-id: osmosis-1
rpc-addr: https://osmosis-1.technofractal.com:443
grpc-addr: https://gprc.osmosis-1.technofractal.com:443
account-prefix: osmo
keyring-backend: test
gas-adjustment: 1.2
gas-prices: 0.01uosmo
min-gas-amount: 0
key-directory: /home/joe/.icq/keys
debug: false
timeout: 20s
block-timeout: 10s
output-format: json
sign-mode: direct

```
The first run of `icq-relayer` will generate a mainnet compatible config file, if one is not present.

## Changelog

### v0.11.0
- Add support for cosmos-sdk v0.50 GetTxsEvents request type
- Make metrics bind port configurable
- Set default config file to be mainnet ready
- Reduce log verbosity
- Add max_msgs_per_tx congig variable
- Dynamic MsgPerTx: Make the MsgPerTx value reduce on failed requests, and slowly return to MaxMsgsPerTx over time on success

### v0.10.0
- Add CometBFT v0.37 compatibility.

Expand Down
8 changes: 1 addition & 7 deletions icq-relayer/cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,11 @@ func initConfig(cmd *cobra.Command) error {
if err != nil {
return err
}

debug, err := cmd.Flags().GetBool("debug")
if err != nil {
return err
}

cfg = &config.Config{}
cfgPath := path.Join(home, "config.yaml")
_, err = os.Stat(cfgPath)
if err != nil {
err = config.CreateConfig(home, debug)
err = config.CreateConfig(home)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion icq-relayer/cmd/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/upgrade"
"github.com/cosmos/ibc-go/v5/modules/apps/transfer"
ibc "github.com/cosmos/ibc-go/v5/modules/core"
interchainquery "github.com/ingenuity-build/quicksilver/x/interchainquery"
interchainquery "github.com/quicksilver-zone/quicksilver/x/interchainquery"
)

// TODO: Import a bunch of custom modules like cosmwasm and osmosis
Expand Down
23 changes: 4 additions & 19 deletions icq-relayer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,16 @@ import (
var (
homePath string
overridenChain string
debug bool
cfg *config.Config
defaultHome = os.ExpandEnv("$HOME/.icq")
appName = "lens"
appName = "icq-relayer"
)

// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "interchain-queries",
Short: "A brief description of your application",
Long: `A longer description that spans multiple lines and likely contains
examples and usage of using your application. For example:

Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
// Uncomment the following line if your bare application
// has an action associated with it:
// Run: func(cmd *cobra.Command, args []string) { },
Use: "icq-relayer",
Short: "A relayer for the Quicksilver interchain queries module",
Long: `A relayer for Quicksilver interchain-queries, allowing cryptographically verifiable cross-chain KV lookups.`,
}

// Execute adds all child commands to the root command and sets flags appropriately.
Expand Down Expand Up @@ -70,12 +61,6 @@ func init() {
panic(err)
}

// --debug flag
rootCmd.PersistentFlags().BoolVarP(&debug, "debug", "d", false, "debug output")
if err := viper.BindPFlag("debug", rootCmd.PersistentFlags().Lookup("debug")); err != nil {
panic(err)
}

rootCmd.PersistentFlags().StringP("output", "o", "json", "output format (json, indent, yaml)")
if err := viper.BindPFlag("output", rootCmd.PersistentFlags().Lookup("output")); err != nil {
panic(err)
Expand Down
13 changes: 3 additions & 10 deletions icq-relayer/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Copyright © 2022 NAME HERE <EMAIL ADDRESS>
package cmd

import (
"fmt"

"github.com/quicksilver-zone/quicksilver/icq-relayer/pkg/runner"
"github.com/spf13/cobra"
)
Expand All @@ -21,20 +23,11 @@ to quickly create a Cobra application.`,
Run: func(cmd *cobra.Command, args []string) {
err := runner.Run(cfg, cmd.Flag("home").Value.String())
if err != nil {
return
fmt.Println("ERROR: " + err.Error())
}
},
}

func init() {
rootCmd.AddCommand(runCmd)
// Here you will define your flags and configuration settings.

// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// runCmd.PersistentFlags().String("foo", "", "A help for foo")

// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// runCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}
Loading
Loading