Start appending tx hashes to emitted wasm events#4454
Conversation
eaa6758 to
41ff010
Compare
9402a1e to
c9a9a9f
Compare
| /// Identifier of an inner transaction in a batch. | ||
| pub struct InnerTxId<'tx> { | ||
| /// Hash of the wrapper transaction, if any. | ||
| pub wrapper_hash: Option<Cow<'tx, Hash>>, |
There was a problem hiding this comment.
A bit unlucky that this is an option, I guess it derives from the fact that DispatchArgs::Raw carries an optional wrapper hash?
| .tree | ||
| .insert(&event_type, HashSet::new()); | ||
| } | ||
| if let Some(inner_tx_id) = inner_tx_id { |
There was a problem hiding this comment.
Nice solution to avoid breaking changes in terms of gas. In the future, if this is not to much of a pain to achieve, I'd still like to account for the gas of these attributes, but for now this is perfectly fine
|
I pushed an update for the failing test, lgtm |
|
the (from https://github.com/anoma/namada/actions/runs/13784293744/job/38548636027) |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4454 +/- ##
==========================================
+ Coverage 74.50% 74.51% +0.01%
==========================================
Files 339 339
Lines 110638 110895 +257
==========================================
+ Hits 82428 82631 +203
- Misses 28210 28264 +54 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
thx tomas! I didn't remove the |
This fix is not the most robust solution, but it is the one that involves less code changes. Ideally, we would include the wrapper tx hash in the native VP execution context, to compute the hash of the inner transactions that is now being included in each wasm emitted event, but this change is too invasive.
2399ba4 to
7e7cd29
Compare
|
(rebased on |
Describe your changes
Include the hash of the inner and wrapper transactions in emitted wasm events.
Checklist before merging
breaking::labelsnamada-docsreponamada-indexerornamada-masp-indexer, a corresponding PR is opened in that repo