liquidapps-io / zeus-sdk

EOSIO & EVM smart contract unit testing suite and API provider
51 stars 24 forks source link

updated zeos_merkle_tree_updater #55

Closed mschoenebeck closed 1 year ago

mschoenebeck commented 1 year ago

During the execution of the vcpu handler of transaction A another transaction B could change the merkle tree state and thus lead to an invalid tree state (after transaction A updates the merkle tree with its changes). In order to be able to detect this, the current merkle root is passed to the vcpu handler and then passed back to the contract together with the merkle tree changes to be applied. The contract can then check if the merkle root that comes back from the vcpu handler is still the same (as before the handler execution). If it has changed in the meantime the transaction must fail.

NatPDeveloper commented 1 year ago

works, merged internally, closing