-
Notifications
You must be signed in to change notification settings - Fork 575
Conversation
} | ||
``` | ||
|
||
- `PostTxProcessing` is called after EVM transaction finished, executed with the same cache context as the EVM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ADR doesn't explain why we need the PostTxProcessing
hook. Can you explain in here how it will
enable EVM contract to communicate with cosmos native modules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps adding some examples from: #394 (comment) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, added the bank send example.
Visit https://dashboard.github.orijtech.com?back=0&pr=429&remote=true&repo=yihuang%2Fethermint to see benchmark details. |
Codecov Report
@@ Coverage Diff @@
## main #429 +/- ##
==========================================
+ Coverage 50.35% 50.71% +0.36%
==========================================
Files 57 49 -8
Lines 5459 4874 -585
==========================================
- Hits 2749 2472 -277
+ Misses 2594 2297 -297
+ Partials 116 105 -11
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ADR is good, but it doesn't follow the ADR template and a lot of context and details are missing if you compare it with the implementation. For example, the following decision is not documented on the ADR:
if !res.Failed() {
err = k.PostTxProcessing(txHash, logs)
if err != nil {
k.RevertToSnapshot(revision)
res.VmError = "failed to process native logs"
res.Ret = []byte(err.Error())
}
}
Some questions that need to be documented:
- why do we revert the state to the snapshot prior to the tx execution? (i.e why did you choose this approach over just performing a no-op on
PostTxProcessing
) - give a reference implementation for a
Hook
implementation - explain the
MultiHook
design for adding multiple hooks - explain how to add the Hook to the
app.go
added a little bit more explanation to this:
added, with this approach, the implementor is still free to swallow any error.
add the
I think this is not essential for the proposal?
added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks better now, although there are some details and code snippet are missing about the integration with the state_transition.go
.
I will also recommend you use Grammarly to fix some of the wording.
done, added some
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 👍
Description
ref impl: #417
For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)