Tanour is a Contract actor executor for Zarb blockchain.
Tanour can be launched as an independent and standalone process and it has no internal state. Interacting with the Zarb blockchain happens through the set of Provider APIs.
Contract in Zarb are like Actors in the Actor model.
Each contract actor:
- Can be instantiated through the
instantiate
method. - Can process the message it receives through
process_msg
method. - Can concurrently send a message to another contract actor through the
send_msg
method.
These are the only methods that each contract can expose to the outside world.
Storage in Zarb is not a set of key-value pairs, indeed it's a separate file that each contract actor has the read and write access to modify it. This model comes with many advantages. However, there are some disadvantages like difficulty of writing the smart contract and lack supported map data type.
Storage as key-value pairs
Storage as file
Contract actor are written in WebAssembly and currently Tanour is using Wasmer to execute the contracts.
TODO
Tanour requires latest stable Rust version to build. You can install Rust through rustup.
In order to use Tanour as a webservice you also need to install Cap'n Proto.
To build the Tanour from the source code, you can follow these commands:
$ git clone https://github.com/zarb/tanour
$ cd tanour
# build in release mode
$ cargo build --release
This package is licensed under the MIT License.