Giter Club home page Giter Club logo

interchain-queries's People

Contributors

ajansari95 avatar joe-bowman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

interchain-queries's Issues

Require more verbose errors on failure to connect

Due to a mistyped hostname, icq failed to connect to an rpc node - however, instead of some meaningful issue, the following was logged out:

ts=2023-01-05T14:00:39.677636203Z caller=run.go:69 worker=init msg="starting icq relayer" version=icq/v0.7.8
--
Thu, Jan 5 2023 2:00:39 pm | ts=2023-01-05T14:00:39.680392069Z caller=run.go:93 worker=init msg="configured chain" chain=quicksilver-2
Thu, Jan 5 2023 2:00:39 pm | ts=2023-01-05T14:00:39.682616513Z caller=run.go:93 worker=init msg="configured chain" chain=stargaze-1
Thu, Jan 5 2023 2:00:39 pm | 2023/01/05 14:00:39 Error in Closing the routine

We require better error logging on failed connection/rpc.start() calls.

Fetch ABCI query with Proof

A key part of the Interchain queries module is that requests are provable, and therefore trustless. Without this piece, the data returned by a relayer cannot be appropriately trusted.

ICQ relayer stops sending a batch

ts=2023-05-23T08:27:35.581190896Z caller=run.go:333 chain=quicksilver-2 src_chain=osmosis-1 worker=historic msg="Handling request" type=cosmos.staking.v1beta1.Query/Validators id=c6df5a67a1ef74b31fe3fbfbf271dcf54f7d98cf9b746c2ac6855d1727cfb868 height=10762301
ts=2023-05-23T08:27:35.592653722Z caller=run.go:333 chain=quicksilver-2 src_chain=regen-1 worker=historic msg="Handling request" type=cosmos.staking.v1beta1.Query/Validators id=c6df5a67a1ef74b31fe3fbfbf271dcf54f7d98cf9b746c2ac6855d1727cfb868 height=10762301
ts=2023-05-23T08:27:42.137338766Z caller=run.go:592 worker=flusher chain=quicksilver-2 msg="Sending batch of 2 messages"
ts=2023-05-23T08:27:42.137421931Z caller=run.go:662 worker=flusher chain=quicksilver-2 msg="Added SubmitResponse message" id=c6df5a67a1ef74b31fe3fbfbf271dcf54f7d98cf9b746c2ac6855d1727cfb868
ts=2023-05-23T08:27:45.765372879Z caller=run.go:636 worker=flusher chain=quicksilver-2 msg="Sent batch of 1 (deduplicated) messages"
panic: panic(6): post failed: Post "http://x5.x17.10x.2xx:xx67": EOF

goroutine 244 [running]:
github.com/ingenuity-build/interchain-queries/pkg/runner.doRequest({{0xc0012aa610, 0xd}, {0xc0004051a0, 0xc}, {0xc0004051e8, 0x7}, {0xc001bc8040, 0x40}, {0xc001051fb0, 0x11}, ...}, ...)
	/home/xxxx/interchain-queries/pkg/runner/run.go:329 +0x25b9
github.com/ingenuity-build/interchain-queries/pkg/runner.doRequestWithMetrics({{0xc0012aa610, 0xd}, {0xc0004051a0, 0xc}, {0xc0004051e8, 0x7}, {0xc001bc8040, 0x40}, {0xc001051fb0, 0x11}, ...}, ...)
	/home/xxx/interchain-queries/pkg/runner/run.go:314 +0x145
created by github.com/ingenuity-build/interchain-queries/pkg/runner.handleEvent
	/home/xxx/interchain-queries/pkg/runner/run.go:256 +0x845

Release: icq/v0.8.2

Make queries Generic

Long term , we ought to pass in proto.Message with the appropriate request type and pass this to Invoke directly (and have the Request type instantiation done by the application not by the relayer.

Add prometheus metrics

In order to be able to monitor the performance and behaviour of the relayer, we need to add prometheus metrics to the application.

pkg/runner: Run invokes sync.WaitGroup.Add but never invokes sync.WaitGroup.Done otherwise the code returns ASAP

The code in

wg := &sync.WaitGroup{}
for _, client := range clients {
err := client.RPCClient.Start()
if err != nil {
fmt.Println(err)
}
ch, err := client.RPCClient.Subscribe(ctx, client.Config.ChainID+"-icq", query.String())
if err != nil {
fmt.Println(err)
return err
}
wg.Add(1)
go func(chainId string, ch <-chan coretypes.ResultEvent) {
for v := range ch {
v.Events["source"] = []string{chainId}
go handleEvent(v)
}
}(client.Config.ChainID, ch)
}
for _, client := range clients {
wg.Add(1)
go FlushSendQueue(client.Config.ChainID)
}
wg.Wait()
invokes wg.Add(1) but never wg.Done() which means that the goroutines can run wildly and never end, and that code will return ASAP instead of waiting on the .Wait(). Please pass in *sync.WaitGroup

Add additional query types

Short term fix; we need to add query types for staking/DelegatorDelegations and staking/Validators query types.

Will be superceded by #2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.