Emitting Ethereum related events in PostTxProcessing
EVM hooks make Ethereum events inconsistent
#1010
Labels
bug
Something isn't working
PostTxProcessing
EVM hooks make Ethereum events inconsistent
#1010
The PR #991 introduces payment of gas when sending tokens out of ZetaChain, the method is called in the
PostTxProcessing
hook, the method callCallEVM
that will emit Ethereum events.It appears that emitting Ethereum events while in
PostTxProcessing
makes the overall event logs emitted inconsistent.The tx can be processed but then when querying the receipt from the tx hash, inconsistencies happen.
If the all the events in
CallEVMWIthData
are emitted in aPostTxProcessing
call:Then, the following rpc error happens when trying to get the receipt:
After investigation, the logic parsing tx events is somehow expecting the events to be emitted in "format 2", introduced in evmos/ethermint#1121
Possibly because the first Ethereum events emitted in the TX are in "format 2"
If we emit the events in the format 2:
Then the following RPC error happens when getting the receipt:
It is possibly because we don't use the right
AttributeKeyTxIndex
in the event we emit.Finally, when we skip the Ethereum tx event emit but keep the other events:
We can get the receipt but in the smoke test we will not get the event logs:
Instead of
We should investigate if there is a correct way to emit the events when using the call EVM method in
PostTxProcessing
The text was updated successfully, but these errors were encountered: