diff --git a/docs/diagrams/c10l-smart-contract-call.mmd.svg b/docs/diagrams/c10l-smart-contract-call.mmd.svg index 030c019f..d327a2af 100644 --- a/docs/diagrams/c10l-smart-contract-call.mmd.svg +++ b/docs/diagrams/c10l-smart-contract-call.mmd.svg @@ -1 +1 @@ -Oasis NodeKey Manager🔒Oasis NodeSapphire ParaTimeCompute 🔒Oasis NodeSapphireParaTime ClientOasis Web3GatewayClient(e.g. Node.js,MetaMask)Oasis NodeKey Manager🔒Oasis NodeSapphire ParaTimeCompute 🔒Oasis NodeSapphireParaTime ClientOasis Web3GatewayClient(e.g. Node.js,MetaMask)R is cacheduntil the endof epochopt[Encrypt Call]opt[Sign Call]opt[Encrypted Call]opt[EncryptedCall]opt[EncryptedCall]Create calldata1Get ephemeralpublic key R2Get ephemeralpublic key R3Get ephemeralpublic key R4Derive per-epochper-runtimekeypair R, R'5Ephemeral public key R6Ephemeralpublic key R7Ephemeralpublic key R8Generate X25519keypair C, C'9Derive shared keyK' = X25519(C', R)10Encrypt call datawith Deoxys-II usingshared key K'11Attach C12Sign callwith User'sSecp256k1/Ed25519key13eth_call14eth_call15Validate call16eth_call17Get ephemeralprivate key R'18Check runtimepolicy for caller19Derive per-epochper-runtimekeypair R, R'20Ephemeralprivate key R'21Derive shared keyK' = X25519(C, R')22Decrypt Deoxys-IIenvelope using K'23Get c10l contractstate keypair S, S'24Check runtimepolicy for caller25Derive per-contractper-runtimekeypair S, S'26Contract statekeypair S, S'27Fetch contract code28C10l contract executionusing S, S' to readstorage29Encrypt callresult with K'30Call result31Call result32Call result33Decrypt call resultusing K'34 \ No newline at end of file +Oasis NodeKey Manager🔒Oasis NodeSapphire ParaTimeCompute 🔒Oasis NodeSapphireParaTime ClientOasis Web3GatewayClient(e.g. Node.js,MetaMask)Oasis NodeKey Manager🔒Oasis NodeSapphire ParaTimeCompute 🔒Oasis NodeSapphireParaTime ClientOasis Web3GatewayClient(e.g. Node.js,MetaMask)R is cacheduntil the endof epochopt[Encrypt Call]opt[Sign Call]opt[Encrypted Call]opt[EncryptedCall]opt[EncryptedCall]Create calldata1Get ephemeralpublic key R2Get ephemeralpublic key R3Get ephemeralpublic key R4Derive per-epochper-runtimekeypair R, R'5Ephemeral public key R6Ephemeralpublic key R7Ephemeralpublic key R8Generate X25519keypair C, C'9Derive shared keyK' = X25519(C', R)10Encrypt call datawith Deoxys-II usingshared key K'11Attach C12Sign callwith User'sSecp256k1/Ed25519key13eth_call14eth_call15Validate call16eth_call17Get ephemeralprivate key R'18Check runtimepolicy for caller19Derive per-epochper-runtimekeypair R, R'20Ephemeralprivate key R'21Derive shared keyK' = X25519(C, R')22Decrypt Deoxys-IIenvelope using K'23Get c10l contractstate keypair S, S'24Check runtimepolicy for caller25Derive per-contractper-runtimekeypair S, S'26Contract statekeypair S, S'27Fetch contract code28C10l contract executionusing S, S' to readstorage29Encrypt callresult with K'30Call result31Call result32Call result33Decrypt call resultusing K'34 \ No newline at end of file diff --git a/docs/diagrams/c10l-smart-contract-tx.mmd.svg b/docs/diagrams/c10l-smart-contract-tx.mmd.svg index da9b8c78..d4ea04b2 100644 --- a/docs/diagrams/c10l-smart-contract-tx.mmd.svg +++ b/docs/diagrams/c10l-smart-contract-tx.mmd.svg @@ -1 +1 @@ -Oasis NodeKey Manager🔒Oasis NodeSapphire ParaTimeCompute 🔒Oasis NodeSapphireParaTime ClientOasis Web3GatewayClient(e.g. Node.js,MetaMask)Oasis NodeKey Manager🔒Oasis NodeSapphire ParaTimeCompute 🔒Oasis NodeSapphireParaTime ClientOasis Web3GatewayClient(e.g. Node.js,MetaMask)R is cacheduntil the endof epochopt[Encrypt Transaction]opt[Encrypted Transaction]alt[EncryptedTransaction][UnencryptedTransaction]Proposer node addstransaction, state andreceipt in new blockWait for new blockopt[EncryptedTransaction-]Create transactioncall data1Get ephemeralpublic key R2Get ephemeralpublic key R3Get ephemeralpublic key R4Derive per-epochper-runtimekeypair R, R'5Ephemeral public key R6Ephemeralpublic key R7Ephemeralpublic key R8Generate X25519keypair C, C'9Derive shared keyK' = X25519(C', R)10Encrypt call datawith Deoxys-II usingshared key K'11Attach C12Sign transactionwith User'sSecp256k1/Ed25519key13eth_sendRawTx14eth_sendRawTx15Validatetransaction16eth_sendRawTx17Get ephemeralprivate key R'18Check runtimepolicy for caller19Derive per-epochper-runtimekeypair R, R'20Ephemeralprivate key R'21Derive shared keyK' = X25519(C, R')22Decrypt Deoxys-IIenvelope using K'23Get c10l contractstate keypair S, S'24Check runtimepolicy for caller25Derive per-contractper-runtimekeypair S, S'26Contract statekeypair S, S'27Fetch contract code28C10l contract executionusing S, S' to read andwrite storage29Obtain newstate root30Transaction receipt:encrypt tx status with K',unencrypted logs31Transaction receipt:unencrypted tx statusand logs32Transactionreceipt33Decrypt tx statusfrom receiptusing K'34 \ No newline at end of file +Oasis NodeKey Manager🔒Oasis NodeSapphire ParaTimeCompute 🔒Oasis NodeSapphireParaTime ClientOasis Web3GatewayClient(e.g. Node.js,MetaMask)Oasis NodeKey Manager🔒Oasis NodeSapphire ParaTimeCompute 🔒Oasis NodeSapphireParaTime ClientOasis Web3GatewayClient(e.g. Node.js,MetaMask)R is cacheduntil the endof epochopt[Encrypt Transaction]opt[Encrypted Transaction]alt[EncryptedTransaction][UnencryptedTransaction]Proposer node addstransaction, state andreceipt in new blockWait for new blockopt[EncryptedTransaction-]Create transactioncall data1Get ephemeralpublic key R2Get ephemeralpublic key R3Get ephemeralpublic key R4Derive per-epochper-runtimekeypair R, R'5Ephemeral public key R6Ephemeralpublic key R7Ephemeralpublic key R8Generate X25519keypair C, C'9Derive shared keyK' = X25519(C', R)10Encrypt call datawith Deoxys-II usingshared key K'11Attach C12Sign transactionwith User'sSecp256k1/Ed25519key13eth_sendRawTx14eth_sendRawTx15Validatetransaction16eth_sendRawTx17Get ephemeralprivate key R'18Check runtimepolicy for caller19Derive per-epochper-runtimekeypair R, R'20Ephemeralprivate key R'21Derive shared keyK' = X25519(C, R')22Decrypt Deoxys-IIenvelope using K'23Get c10l contractstate keypair S, S'24Check runtimepolicy for caller25Derive per-contractper-runtimekeypair S, S'26Contract statekeypair S, S'27Fetch contract code28C10l contract executionusing S, S' to read andwrite storage29Obtain newstate root30Transaction receipt:encrypt tx status with K',unencrypted logs31Transaction receipt:unencrypted tx statusand logs32Transactionreceipt33Decrypt tx statusfrom receiptusing K'34 \ No newline at end of file