From 46835748315dbd52bcda8117569892d32f449522 Mon Sep 17 00:00:00 2001 From: Tore Frederiksen Date: Fri, 16 Aug 2024 18:12:22 +0200 Subject: [PATCH] chore: added ISC --- docs/fundamentals/tkms/architecture.md | 6 +++--- docs/fundamentals/tkms/blockchain.md | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/fundamentals/tkms/architecture.md b/docs/fundamentals/tkms/architecture.md index 92277037..dc6a1b30 100644 --- a/docs/fundamentals/tkms/architecture.md +++ b/docs/fundamentals/tkms/architecture.md @@ -39,14 +39,14 @@ The frontend makes up the public interface of the KMS, through which all request It consists of the following components: -- Smart contracts: ASC and Config SC. +- Smart contracts: ISC, ASC and Config SC. - Responsible for receiving, validating and processing requests and updates from the fhEVM. Including decryption, reencryption, validator updates, key generation and setup. - KMS validators (realized through CometBFT). - The entities realizing the KMS blockchain. There may, or may not, be a 1-1 mapping between each validator and a threshold party in the KMS backend. -Multiple application smart contracts (ASC) are deployed on the blockchain, typically one for each application (e.g. fhEVM blockchain) or application type (e.g. EVM blockchain). Each of these can keep application-specific state in order to verify requests from the application. For instance, an ASC for an fhEVM blockchain holds the identity of the current set of validators, so that access controls lists (ACLs) in decryption and reencryption requests can be validated by checking state inclusion proofs against the state roof of the fhEVM blockchain. +Multiple ISCs are deployed on the blockchain, typically one for each application (e.g. fhEVM blockchain) or application type (e.g. EVM blockchain). Each of these can keep application-specific state in order to verify requests from the application. For instance, an ISC for an fhEVM blockchain holds the identity of the current set of validators, so that access controls lists (ACLs) in decryption and reencryption requests can be validated by checking state inclusion proofs against the state roof of the fhEVM blockchain. -All decryption and reencryption requests are submitted as transactions to an ASC. If approved then the ASC calls the backend by emitting an event that will trigger the backend to actually fulfill the request. Once the request has been fulfilled, the backend submits a fulfillment transaction back to the ASC. +All decryption and reencryption requests are submitted as transactions to an ASC. The ASC performs universal validation and forwards ACL validation to the appropriate ISC. If all validations are ok then the ASC calls the backend by emitting an event that will trigger the backend to actually fulfill the request. Once the request has been fulfilled, the backend submits a fulfillment transaction back to the ASC. All payments to the KMS is also handled through the ASC to which the transaction is submitted. These payments are used to incentivize the KMS operators. diff --git a/docs/fundamentals/tkms/blockchain.md b/docs/fundamentals/tkms/blockchain.md index 10a9fb62..d79a0dd9 100644 --- a/docs/fundamentals/tkms/blockchain.md +++ b/docs/fundamentals/tkms/blockchain.md @@ -4,6 +4,12 @@ This is a permissioned blockchain that is based on BFT consensus that allows for The blockchain handles all decryption, reencryption, and key management operations between _all_ fhEVM chains, co-processors etc. and the KMS engine. +## Smart contracts + +- *ISC (Inclusion proof Smart Contract)*: Smart contract which handles validation of decryption/re-encryption requests for a specific fhEVM. Thus is contains custom logic for validation for a single fhEVM. + +- *ASC (Application Smart Contract)*: A single smart contract to which transaction from the gateway (connector) are submitted to for all fhEVM's. All requests will pass through this contract and decryption and re-encryption requests will be validated by the appropriate ISC contract. + ## Payment All operations must be paid for with tokens. Currently the tokenomics is not implemented and hence tokens can be constructed freely using a focet.