Skip to content
This repository was archived by the owner on Oct 28, 2022. It is now read-only.

Scilla Backend Design

Vaivaswatha N edited this page Dec 5, 2018 · 13 revisions

Components and Interaction

                                     +----------------------+
                                    |   Blockchain Smart   |
                                    |   Contract Module    |
                                    |    in C++ (BC)       |
                                    +----------------------+

                                       +         state variable
                                       |             +    ^
                            foo.scilla |             |    |
                                       |        fetch|    |
                                       |             |    |update
                                       v             v    |
                                       
+--------------------------------------+---------------------------------+
|                                                                        |
|                           +-------------+      +----------------+      |
|       +-----------------> |JIT Driver   | +--> | Scilla Run-time|      |
|       |                   |in C++ (JITD)|      | Library in C++ |      |
|       |                   +-+-------+---+      |  (SRTL)        |      |
|       |                     |       ^          +----------------+      |
|       |                     |       |                                  |
|       |           foo.scilla|       |                                  |
|       |                     | foo.ll|                                  |
|       |                     |       |                                  |
|       |                     v       |                                  |
|       |                  +--+-------+----+                             |
|       |                  |Scilla Compiler|                             |
|       |                  |in OCaml (SC)  |                             |
|       |                  +---------------+                             |
|       |                                                                |
|       |                                                                |
|       |                                                                |
|       |                                   Scilla Virtual Machine       |
|       v                                   in OCaml & C++ (SVM)         |
| +-----+-------+                                                        |
| |  JIT Cache  |                                                        |
| +-------------+                                                        |
|                                                                        |
+------------------------------------------------------------------------+

The scilla backend is a virtual machine (SVM), which, given a Scilla program (shown as foo.scilla) will JIT compile and execute it. During the course of execution, it will interact with the Blockchain Smart Contract Module (BC) for fetching and updating state variables. All interactions between BC and SVM will be as shared library calls.

Clone this wiki locally