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

Hermes is dropping supporting headers when assembling messages from the operational data #3465

Closed
5 tasks
Tracked by #3437
romac opened this issue Jul 10, 2023 · 0 comments · Fixed by #3468
Closed
5 tasks
Tracked by #3437
Assignees
Labels
A: bug Admin: something isn't working
Milestone

Comments

@romac
Copy link
Member

romac commented Jul 10, 2023

Summary of Bug

OperationalData::assemble_msgs is discarding the client updates for the supporting headers returned by the light client when assembling messages to relay from the operational data.

// Fetch the client update message. Vector may be empty if the client already has the header
// for the requested height.
let mut client_update_opt = match self.target {
OperationalDataTarget::Source => {
relay_path.build_update_client_on_src(update_height)?
}
OperationalDataTarget::Destination => {
relay_path.build_update_client_on_dst(update_height)?
}
};
client_update_opt.pop()

As can be seen above, it only keeps the last client update which corresponds to the latest height at which we want to update the client to. But if the light client needed to do bisection to verify that header from the current trusted state, then that client update would be rejected on chain, as the chain needs the supporting headers to perform verification in case of bisection.

It should instead prepend all the client updates returned by build_update_client_on_src/dst.

Version

master

Steps to Reproduce

Acceptance Criteria


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@romac romac added the A: bug Admin: something isn't working label Jul 10, 2023
@romac romac added this to the v1.6 milestone Jul 10, 2023
@romac romac self-assigned this Jul 10, 2023
@romac romac changed the title RelayPath is dropping supporting headers when assembling messages from the operational data Hermes is dropping supporting headers when assembling messages from the operational data Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: bug Admin: something isn't working
Projects
Status: ✅ Done
1 participant