aionnetwork / AVM

Enabling Java code to run in a blockchain environment
https://theoan.com/
MIT License
49 stars 25 forks source link

SideEffects may not be returned correctly if an internal transaction fails #390

Closed arajasek closed 5 years ago

arajasek commented 5 years ago

There is a concern that the removing of TransactionContext in 1ec8d502fa3f45c6f3e7ba337fd7a05281b32265 will cause an incorrect SideEffects object to be returned as part of the TransactionResult if an internal transaction fails. It is likely that this will happen because all existing logs will be erased if an internal transaction fails (not just those pertaining to the failed transaction).

If this is the case, this should be fixed, probably by maintaining a stack of SideEffects that we coalesce into a single object upon returning from the AVM.