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

Logs are discarded on error #23

Closed
5 tasks
hu55a1n1 opened this issue Feb 17, 2022 · 4 comments
Closed
5 tasks

Logs are discarded on error #23

hu55a1n1 opened this issue Feb 17, 2022 · 4 comments
Labels
A: bug Admin: something isn't working S: errors Scope: related to error handlings

Comments

@hu55a1n1
Copy link
Contributor

hu55a1n1 commented Feb 17, 2022

Crate

ibc

Summary of Bug

The current handlers' implementation discards logs when an error is encountered.

Version

v0.11.1


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@hu55a1n1 hu55a1n1 added the A: bug Admin: something isn't working label Feb 17, 2022
@hu55a1n1 hu55a1n1 self-assigned this Feb 17, 2022
@hu55a1n1 hu55a1n1 changed the title Events and logs are discarded on error Logs are discarded on error Mar 3, 2022
@hu55a1n1
Copy link
Contributor Author

hu55a1n1 commented Mar 7, 2022

Might be related -> cosmos/cosmos-sdk#10618

@hu55a1n1
Copy link
Contributor Author

Suggestion from @plafer (informalsystems/hermes#1838 (comment)) ->

pub fn deliver<Ctx>(ctx: &mut Ctx, message: Any) -> Result<(Vec<IbcEvent>, Vec<String>), Error>

We could create RouterOutput and RouterResult types, analogous to HandlerOutput and HandlerResult. This would make it more explicit that Vec represents the logs.
dispatch() would then return a RouterResult.

struct RouterOutput {
    events: Vec<IbcEvent>,
    logs: Vec<String>,
}

type RouterResult = Result<RouterOutput, Error>;

@hu55a1n1 hu55a1n1 transferred this issue from informalsystems/hermes Sep 28, 2022
@plafer plafer mentioned this issue Nov 23, 2022
7 tasks
@plafer
Copy link
Contributor

plafer commented Nov 23, 2022

This is fixed by the new ValidationContext: logs are no longer returned, but rather given to the context with log_message().

We can close this after the pre-ADR 5 handlers are fully removed.

@Farhad-Shabani Farhad-Shabani added the S: errors Scope: related to error handlings label Jan 5, 2023
@github-project-automation github-project-automation bot moved this to 📥 To Do in ibc-rs Feb 2, 2023
@Farhad-Shabani Farhad-Shabani modified the milestone: Fix known bugs and issues Feb 3, 2023
@plafer
Copy link
Contributor

plafer commented Feb 22, 2023

Completed with the whole ADR 5 #322 work.

@plafer plafer closed this as completed Feb 22, 2023
@github-project-automation github-project-automation bot moved this from 📥 To Do to ✅ Done in ibc-rs Feb 22, 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 S: errors Scope: related to error handlings
Projects
Status: Done
Development

No branches or pull requests

3 participants