This repository has been archived by the owner on Aug 14, 2023. It is now read-only.
Return Touched Accounts
inside the Spawn
and Call
Receipts
#375
Labels
go-svm
Features required for the go-svm or other clients
medium
Medium-sized task
must-for-mainnet
Must be done before Mainnet
svm
Notes
Before working on this issue, please make sure this one is addressed #406
Details
While calling an existing
Account
(i.e., executing aCall
transaction) and spawning new ones (involves running a constructor), we might transfer coins between different Accounts.go-spacemesh
would like to be notified which accounts were involved in coins transfers as part of executing a transaction.In other words, each time the
svm_transfer
host function is being called, we'd like to append thesource
anddestination
into theTouched Accounts
set.The logged
source
will always be the same Address - the currently executing Account.So the implementation can optimize that, but keeping things simple and stupid in the solution might be a better approach.
The task of the issue is to make sure that
Spawn
andCall
receipts will have a newtouched_accounts
field that will contain this list ofAccount Addresses.
Encoding
Lastly, this field should also be encoded in the returned Receipts.
See the
svm-codec
code here:https://github.com/spacemeshos/svm/tree/master/crates/codec/src/receipt
The text was updated successfully, but these errors were encountered: