namada icon indicating copy to clipboard operation
namada copied to clipboard

Generalize the core API of events

Open sug0 opened this issue 1 year ago • 10 comments

Describe your changes

Erase protocol specific details from the core API of events in Namada. Submodules should be responsible for defining custom events, which can be converted into core events for emission and querying.

~~NOTE: IBC tests involving hermes are expected to break with this PR. This release of hermes fixes the e2e tests (thanks Yuji!).~~

Indicate on which release or other PRs this topic is based on

v0.34.0

Checklist before merging to draft

  • [x] I have added a changelog
  • [x] Git history is in acceptable state

sug0 avatar Apr 09 '24 09:04 sug0

Codecov Report

Attention: Patch coverage is 51.63043% with 534 lines in your changes are missing coverage. Please review.

Project coverage is 59.52%. Comparing base (ea843f7) to head (f629fea). Report is 7 commits behind head on main.

Files Patch % Lines
crates/core/src/ibc/event.rs 27.81% 122 Missing :warning:
...tes/apps/src/lib/node/ledger/shell/testing/node.rs 0.00% 88 Missing :warning:
crates/core/src/event/extend.rs 68.93% 82 Missing :warning:
crates/core/src/event.rs 66.09% 59 Missing :warning:
crates/namada/src/ledger/governance/utils.rs 54.73% 43 Missing :warning:
crates/sdk/src/rpc.rs 0.00% 32 Missing :warning:
crates/sdk/src/events/log/dumb_queries.rs 57.57% 28 Missing :warning:
...s/apps/src/lib/node/ledger/shell/finalize_block.rs 21.42% 22 Missing :warning:
crates/sdk/src/masp.rs 0.00% 18 Missing :warning:
crates/governance/src/utils.rs 0.00% 9 Missing :warning:
... and 8 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3032      +/-   ##
==========================================
+ Coverage   59.41%   59.52%   +0.10%     
==========================================
  Files         298      298              
  Lines       92326    92790     +464     
==========================================
+ Hits        54853    55229     +376     
- Misses      37473    37561      +88     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 10 '24 09:04 codecov[bot]

I think there are some conflicts with draft-mainnet because I have changed to get the IBC info from an IBC message instead of an IBC event in #2631.

yito88 avatar Apr 11 '24 14:04 yito88

I think there are some conflicts with draft-mainnet because I have changed to get the IBC info from an IBC message instead of an IBC event in #2631.

This is ok, since no more PRs are allowed in draft-mainnet and we are close to cutting 0.33. Just will have to rebase this PR after that.

brentstone avatar Apr 11 '24 16:04 brentstone

~~TODO: rebase on v0.33.0~~

sug0 avatar Apr 12 '24 11:04 sug0

~~wip: fixing hermes so ibc e2e tests pass~~ ~~todo: check the str returned by event.attributes.get("height")~~

sug0 avatar Apr 17 '24 16:04 sug0

@sug0 Can you try https://github.com/heliaxdev/hermes/releases/tag/v1.7.4-namada-beta9-rc?

yito88 avatar Apr 17 '24 21:04 yito88

@yito88 your patch worked! thanks!

sug0 avatar Apr 18 '24 14:04 sug0

Can the CI be updated with the new Hermes by updating .github/workflows/scripts/hermes.txt?

yito88 avatar Apr 19 '24 14:04 yito88

Can the CI be updated with the new Hermes by updating .github/workflows/scripts/hermes.txt?

yeah for sure! thanks for the suggestion

sug0 avatar Apr 19 '24 21:04 sug0

Can the CI be updated with the new Hermes by updating .github/workflows/scripts/hermes.txt?

@yito88 done in 2127a43

sug0 avatar Apr 23 '24 08:04 sug0