From 6cb8266c7b21b21aad82ff279df95b4f137d2189 Mon Sep 17 00:00:00 2001 From: anatoly yakovenko Date: Fri, 22 Jun 2018 23:26:42 -0700 Subject: [PATCH] cleanup (#419) --- rfcs/rfc-001-smart-contracts-engine.md | 36 ++++++++++---------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/rfcs/rfc-001-smart-contracts-engine.md b/rfcs/rfc-001-smart-contracts-engine.md index dc90ead24..5fad5b84a 100644 --- a/rfcs/rfc-001-smart-contracts-engine.md +++ b/rfcs/rfc-001-smart-contracts-engine.md @@ -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