namada icon indicating copy to clipboard operation
namada copied to clipboard

Murisi/borsh ibc msg transfer rebase v0.41.0

Open murisi opened this issue 1 year ago • 3 comments

Describe your changes

Attempt to close #3501 and hence simplify the (de)serialization of IBC transactions for third parties. More specifically, the following changes have been made:

  • IBC transaction data is now always a tagged serialization of the IbcMessage enumeration instead of being an untagged serialization of a MsgTransfer, MsgNftTransfer or Any structure.
  • IBC transaction data is now encoded using Borsh serialization instead of Protobufs. This is more consistent with how all the other parts of a Tx are serialized using Borsh, and will ease schema generation.
  • Updated the test vector generation code (i.e. the generator and the vector printer) to produce transactions in accordance with the above two changes.

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

Namada 0.41.0

Checklist before merging to draft

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

murisi avatar Jul 29 '24 08:07 murisi

Codecov Report

Attention: Patch coverage is 7.41525% with 874 lines in your changes missing coverage. Please review.

Project coverage is 53.36%. Comparing base (6b0fd29) to head (c8834d6). Report is 722 commits behind head on main.

Files with missing lines Patch % Lines
crates/ibc/src/msg.rs 0.54% 551 Missing :warning:
crates/sdk/src/signing.rs 0.00% 291 Missing :warning:
crates/ibc/src/lib.rs 15.78% 16 Missing :warning:
crates/ibc/src/actions.rs 0.00% 4 Missing :warning:
crates/node/src/bench_utils.rs 0.00% 4 Missing :warning:
crates/light_sdk/src/transaction/ibc.rs 0.00% 3 Missing :warning:
crates/sdk/src/tx.rs 0.00% 3 Missing :warning:
crates/sdk/src/masp.rs 0.00% 1 Missing :warning:
crates/vp_env/src/lib.rs 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3560      +/-   ##
==========================================
- Coverage   53.66%   53.36%   -0.31%     
==========================================
  Files         322      322              
  Lines      111871   112422     +551     
==========================================
- Hits        60037    59990      -47     
- Misses      51834    52432     +598     

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

codecov[bot] avatar Jul 29 '24 08:07 codecov[bot]

What is the status of this @murisi?

brentstone avatar Aug 06 '24 06:08 brentstone

can we close this? @murisi

brentstone avatar Sep 04 '24 21:09 brentstone

can we close this? @murisi

Yeah, we can close this. But for the sake of consistency, in the future we should probably consider using Borsh (de)seralization for the IBC messages and also tagging them to bring their encoding into line with the rest of the Namada transactions. That being said, this might be more trouble than it's worth given that the hardware wallet integration of this Protobuf encoding (wrapped by a Borsh encoding) has already been implemented on the hardware wallet.

murisi avatar Sep 13 '24 08:09 murisi