Replies: 1 comment
-
Quick thought: it's likely that we want the nonce update to happen inside the VM (rather than inside the node). The reason is a bit arcane but has to do with the fact that different templates can choose to use the nonce/bitfield bytes differently and it's probably more efficient to do the update inside the VM. Will share more on a comprehensive nonce plan soon. I don't know if this has any impact on the above API: nonce check can happen inside We need to finalize the signature for |
Beta Was this translation helpful? Give feedback.
-
Full API
This is not a final API, in case if it will be implemented in svm this API will have to output rewards and execution results after Apply (maybe more).
cons:
they actually follow straight from the API
ultimately it will be painful to work on the codebase where half of the application is implemented in rust and the other half in go. the only way to make it work is to reduce the scope of svm api to the bare minimum.
pros:
External storage API
Storage API is implemented in the go-spacemesh and exposed to svm using C api. This is also the current approach taken by filecoin fvm (see https://github.com/filecoin-project/filecoin-ffi/tree/master/rust/src/fvm), but they also have other limitations, namely storage backend is implemented in golang.
cons:
pros:
Same as previous but with the pointer to the storage
On the rust side connection needs to be created by using ffi from this Ptr. See https://github.com/rusqlite/rusqlite/blob/master/src/inner_connection.rs#L19.
Note that it should work with any backend in C (or in rust) not just sqlite.
pros:
cons:
the bottomline is that this approach requires more engineering effort than the previous two.
Beta Was this translation helpful? Give feedback.
All reactions