-
Notifications
You must be signed in to change notification settings - Fork 390
Description
Summary of problem
Some Hermes users are running the relayer with clear_interval = 1
. This effectively means that the relayer does not use the WS and scans each chain every block, relaying packets based on the periodic packet clearing functionality.
In general, it's not good to allow users to use Hermes in ways in which is not properly documented and tested, and in environments for which we didn't design it.
I learned about this use-case from a user that was transferring NFTs across networks. They could not rely on the websocket functionality because sending NFTs was done from a WASM contract, which does not emit events tagged with module = ibc
attribute, hence Hermes does not catch those events. Similar problem was reported by this other user (#2809), who is also using WASM contracts for triggering transfers.
Proposal
I think we should consider introducing a native feature that allows Hermes to bypass the Websocket and run in a "periodic packet clearing mode" only. For the moment, let's distinguish push relaying from pull relaying (TODO: figure out more appropriate names).
- push: the current
start
functionality - pull: a more basic packet relaying mode that skips the WS connection
- one way to think of pull relaying is that it's like batch processing (versus online/push processing)
It's unclear what the pull mode would look like, eg:
- new CLI?
- keep the
start
CLI but add an option--periodic
or something like that? - investigate also if anything important (client refresh, misbehaviour detection, channel workers) is not functioning correctly in the absence of the websocket, and clarify that pull mode has limited functionality
Next steps
Note the milestone for this is v1.4, so not an immediate priority.
This is just a meta issue to trace some next steps and feasiblity:
- @adizere to gather more feedback from operators on the production use-case for pull-based mode
- is this mode could be potentially useful beyond just relaying of packets from WASM contracts?
- is is problematic if the pull mode does not accomplish misbhevarior detection, channel or conn. handshakes?
- is there any utility in keeping the current push-mode behavior? Likely there is utility in allowing relayers to quickly catch events and relay (i.e., optimize for latency). In the context of relayer fees & MEV, latency is critical.
- pull mode is clearly useful for relayers that act as backups (on channels that have a lot of redundancy)
-
@soareschen & @ljoss17 and @seanchen1991 to consider the implications and feasibility of a pull-based design in the context of new architectureis the pull mode possible with v1.5 / v2 ?
-
@romac and @ancazamfir to consider the implications of a pull mode in the context of IBC node design - @ljoss17 to consider the implication in the integration testing framework: the framework would need to support testing of the pull-based mode
- @seanchen1991 to add a section to the Hermes guide detailing the tradeoffs between push and pull methodologies and why operators might choose one over the other
Related issues
For Admin Use
- Not duplicate issue
- Appropriate labels applied
- Appropriate milestone (priority) applied
- Appropriate contributors tagged
- Contributor assigned/self-assigned
Metadata
Metadata
Assignees
Labels
Type
Projects
Status