Now hash the TransferTarget into Transaction transparent outputs.#3320
Now hash the TransferTarget into Transaction transparent outputs.#3320brentstone merged 8 commits intomainfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3320 +/- ##
==========================================
- Coverage 53.89% 53.74% -0.15%
==========================================
Files 314 314
Lines 105704 105919 +215
==========================================
- Hits 56968 56931 -37
- Misses 48736 48988 +252 ☔ View full report in Codecov by Sentry. |
6de0599 to
dddc8aa
Compare
dddc8aa to
20d113b
Compare
098ffe6 to
c5c615c
Compare
c5c615c to
949faaa
Compare
| &msg.timeout_height_on_b, | ||
| &msg.timeout_timestamp_on_b, | ||
| ); | ||
| if packet_commitment != storage_commitment { |
There was a problem hiding this comment.
The packet commitment from the packet has been validated in the IBC VP.
We need to check the receiver in the IBC message with that of the MASP transaction, right?
I think we make a packet commitment from the MASP transaction's receiver and the IBC message(tx_data)'s timeout values and compare it with the commitment stored in the storage.
There was a problem hiding this comment.
Understood. I'm working on a variant of this PR where the timeout values are extracted from tx_data. I'm just a little concerned that this will cause the VP to be dependent on the transaction format instead of the state changes. Also, I haven't yet checked how this will interact with the removal of Transfer dependence changes in #3232 .
| changed_balances.decoder.insert(ibc_address_hash, ibc_address); | ||
|
|
||
| // Extract the IBC events | ||
| let ibc_events: BTreeSet<_> = self |
There was a problem hiding this comment.
We don't need IBC events because the transaction has only one IBC message.
We can get the IBC transfer info by decoding the tx_data like https://github.com/anoma/namada/blob/879a3268f2edfbdd0da1c98cf0e4bbdac48f5b0d/crates/ibc/src/lib.rs#L156.
949faaa to
f6a7580
Compare
e713123 to
e3ce9a5
Compare
e3ce9a5 to
6ad0a0f
Compare
6ad0a0f to
abbf3b2
Compare
f77cf47 to
5547f09
Compare
Describe your changes
An attempt to address issue #3300. The approach taken is to include the IBC receiver in the pre-image of shielded
Transactionoutputs. More specifically, the following changes have been made:Addressindicating a non-IBC recipientAddressthat corresponds to an transferPacketDataand checking that the transparent inputs and outputs use thatTransactiongo to thereceiverstated inPacketDatain the case of an outgoing shielded actionTransactionare the IBC internal address in the case of a refund or an incoming shielded actionCloses #3300
Indicate on which release or other PRs this topic is based on
Namada v0.37.0
Hermes 1.8.2 using this branch for the Namada SDK
Checklist before merging to
draft