This commit is contained in:
Anatoly Yakovenko
2018-06-21 22:57:55 -07:00
committed by Greg Fitzgerald
parent b4df69791b
commit b60eb3a899

View File

@ -73,16 +73,19 @@ void finalize(
``` ```
The module_data structure is configued by the client, it contains the `struct solana_module` structure at the top, which defines how to calculate how much buffer to provide for each step. The module_data structure is configued by the client, it contains the `struct solana_module` structure at the top, which defines how to calculate how much buffer to provide for each step.
A client will create a transaction to create a new loader instance. A client will create a transaction to create a new loader instance:
* `Solana_NewLoader(Loader instance PubKey, proof of key ownership, space i need for my elf)`
A client will then do a bunch of transactions to load its elf into the loader instance they created. `Solana_NewLoader(Loader instance PubKey, proof of key ownership, space I need for my elf)`
* `Loader_UploadElf(Loader instance PubKey, proof of key ownership, pos start, pos end, data)`
* `Loader_NewInstance(Loader instance PubKey, proof of key ownership, Instance PubKey, proof of key owndership)` A client will then do a bunch of transactions to load its elf into the loader instance they created:
A client will then do a bunch of transactions to load its elf into the loader instance they created. `Loader_UploadElf(Loader instance PubKey, proof of key ownership, pos start, pos end, data)`
* `Instance_UploadModuleData(Instance PubKey, proof of key ownership, pos start, pos end, data)`
`Loader_NewInstance(Loader instance PubKey, proof of key ownership, Instance PubKey, proof of key owndership)`
A client will then do a bunch of transactions to load its elf into the loader instance they created:
`Instance_UploadModuleData(Instance PubKey, proof of key ownership, pos start, pos end, data)`
``` ```
struct module_hdr { struct module_hdr {
@ -95,16 +98,18 @@ struct module_hdr {
}; };
``` ```
At this point the client may need to upload more R user data to the OS via some more transactions to the loader. At this point the client may need to upload more R user data to the OS via some more transactions to the loader:
* `Instance_Start(Instance PubKey, proof of key owndership)` `Instance_Start(Instance PubKey, proof of key owndership)`
At this point clients can start sending transactions to the instance At this point clients can start sending transactions to the instance
## Parallelizable Runtime ## Parallelizable Runtime
To parallelize smart contract execution we plan on breaking up contracts into distinct interfaces, Map/Collect/Reduce/Finalize. To parallelize smart contract execution we plan on breaking up contracts into distinct interfaces, Map/Collect/Reduce/Finalize.
### Map and Collect ### Map and Collect
``` ```
struct transaction { struct transaction {
struct transaction_msg msg; struct transaction_msg msg;