Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

architecture

cgrigis edited this page Jun 26, 2019 · 9 revisions

Architecture

The following describes the architecture of the demonstrator, in particular regarding how it interacts with the OmniLedger blockchain for authorization, Stainless verification and EVM code execution.

Authorization

The demonstrator leverages the dynacred library for user authorization. Once authorized, additional information is stored in the user credentials structure as described below.

Smart Contract verification

In order to perform code verification and compilation to EVM bytecode, the demonstrator uses an OmniLedger service that provides a set of commands. The commands execute on the server, calling Stainless and retrieving the results. These commands don't interact with the blockchain; for this purpose, OmniLedger is used solely as a means to access Stainless and the Solidity compiler remotely. This functionality may be embedded in any OmniLedger conode, whether it belongs to a cothority or not.

EVM code execution

The EVM bytecode produced by compiling the Stainless-generated Solidity code is meant to target the Ethereum blockchain. C4DT has however developed a compatibility layer embedding an EVM into Omniledger (BEvm), which allows to deployment and execution of the Smart Contracts. The demonstrator makes use of this feature to allow deployment and user interaction with the verified contracts. As the EVM layer is not yet included in the main OmniLedger cothority deployed at Dedis, a dedicated BEvm cothority is deployed for this purpose.

Configuration

Following the previous paragraphs', the demonstrator requires the following information for its configuration:

  • Dedis cothority information:
    • Roster
    • ByzCoinID
    • Admin Darc [?]
  • BEvm cothority information:
    • Roster
    • ByzCoinID
    • Admin Darc
    • Instance ID of the BEvm contract on the BEvm cothority
  • Address of the Conode running the Stainless service
  • Other:
    • Darc private key for signing instructions to the BEvm instance

User data stored in local storage

  • Instance ID of the BEvm contract
  • Darc private key for signing instructions to the BEvm instance
  • EVM Account private key
  • Addresses of the deployed contracts
Clone this wiki locally