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

Add config option for number of events queried at once when clearing pending packets #3743

Closed
7 tasks
romac opened this issue Jan 3, 2024 · 0 comments · Fixed by #3748
Closed
7 tasks

Add config option for number of events queried at once when clearing pending packets #3743

romac opened this issue Jan 3, 2024 · 0 comments · Fixed by #3748
Assignees
Labels
A: easy Admin: tasks that are easy to implement A: good-first-issue Admin: good for newcomers I: CLI Internal: related to the relayer's CLI I: configuration Internal: related to Hermes configuration O: reliability Objective: cause to improve trustworthiness and consistent performing
Milestone

Comments

@romac
Copy link
Member

romac commented Jan 3, 2024

Summary

Add a config option for the number of events queried at once when clearing pending packets.

Problem Definition

Right now, this value is hardcoded at 50:

pub const CHUNK_LENGTH: usize = 50;

This is sometimes too high, eg. when some packets are huge, as experienced by the Informal Staking team where the node would error out with a 400 Bad Request when pulling the packet data during a packet clearing:

{
  "timestamp": "2023-12-29T13:39:06.465721Z",
  "level": "ERROR",
  "fields": {
    "message": "gas estimation failed or encountered another unrecoverable error",
    "error": "RPC error to endpoint http://10.10.11.102:26740/: HTTP request failed with non-200 status code: 400 Bad Request"
  },
  "span": {
    "account.sequence": "273283",
    "chain": "osmosis-1",
    "name": "send_tx_with_account_sequence_retry"
  },
  "spans": [
    {
      "name": "spawn"
    },
    {
      "chain": "sifchain-1",
      "name": "chain"
    },
    {
      "client": "07-tendermint-41",
      "name": "client"
    },
    {
      "connection": "connection-20",
      "name": "connection"
    },
    {
      "channel": "channel-17",
      "name": "channel"
    },
    {
      "dst_chain": "osmosis-1",
      "src_chain": "sifchain-1",
      "src_channel": "channel-17",
      "src_port": "transfer",
      "name": "worker.packet"
    },
    {
      "odata": "cleared/1d1b81d2 ->Destination @1-15371999; len=50",
      "name": "relay"
    },
    {
      "chain": "osmosis-1",
      "tracking_id": "cleared/1d1b81d2",
      "name": "send_messages_and_wait_check_tx"
    },
    {
      "account.sequence": "273283",
      "chain": "osmosis-1",
      "name": "send_tx_with_account_sequence_retry"
    }
  ],
  "threadId": "ThreadId(134)"
}

Proposal

  • Add a per-chain query_packets_chunk_size setting to config.toml with a default value of 50 and use that instead of CHUNK_LENGTH.
  • Add a --query-packets-chunk-size=N CLI flag to clear packets which overrides the query_packets_chunk_size if present.

Acceptance Criteria

As per above.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@romac romac added A: good-first-issue Admin: good for newcomers I: CLI Internal: related to the relayer's CLI I: configuration Internal: related to Hermes configuration O: reliability Objective: cause to improve trustworthiness and consistent performing A: easy Admin: tasks that are easy to implement labels Jan 3, 2024
@romac romac added this to the v1.8 milestone Jan 3, 2024
@romac romac added this to Hermes Jan 3, 2024
@github-project-automation github-project-automation bot moved this to 🩹 Triage in Hermes Jan 3, 2024
@romac romac self-assigned this Jan 4, 2024
@github-project-automation github-project-automation bot moved this from 🩹 Triage to ✅ Done in Hermes Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: easy Admin: tasks that are easy to implement A: good-first-issue Admin: good for newcomers I: CLI Internal: related to the relayer's CLI I: configuration Internal: related to Hermes configuration O: reliability Objective: cause to improve trustworthiness and consistent performing
Projects
Status: ✅ Done
1 participant