This commit is contained in:
anatoly yakovenko 2018-06-22 23:26:42 -07:00 committed by GitHub
parent 9c50302a39
commit 6cb8266c7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 23 deletions

View File

@ -138,31 +138,21 @@ void reduce_r(
### Execution
Transactions are batched and processed in parallel at each stage.
```
+-----------+ +--------------+ +-----------+ +---------------+
| sigverify |-+->| debit verify |---+->| execution |-+->| memory commit |
+-----------+ | +--------------+ | +-----------+ | +---------------+
| | |
| +---------------+ | | +--------------+
|->| memory verify |->+ +->| debit commit |
+---------------+ | +--------------+
|
| +----=----------+
+->| credit commit |
+---------------+
```
+-----------+ +--------------+ +---------------+ +-----------+
| sigverify |--->| debit verify |--->| memory verify |--->| execution |
+-----------+ +--------------+ +---------------+ +-----------+
```
Continued:
```
+-----------+ +---------------+
| execution |-+->| memory commit |
+-----------+ | +---------------+
|
| +--------------+
+->| debit commit |
| +--------------+
|
| +----=----------+
+->| credit commit |
+---------------+
```
The `debit verify` stage is very similar to `memory verify`. Proof of key ownership is used to check if the callers key has some state allocated with the contract, then the memory is loaded and executed. After execution stage, the dirty pages are written back by the contract. Because know all the memory accesses during execution, we can batch transactions that do not interfere with each other. We can also appy the debit and credit stages of the transaction.
The `debit verify` stage is very similar to `memory verify`. Proof of key ownership is used to check if the callers key has some state allocated with the contract, then the memory is loaded and executed. After execution stage, the dirty pages are written back by the contract. Because know all the memory accesses during execution, we can batch transactions that do not interfere with each other. We can also apply the debit and credit stages of the transaction.
### GPU execution