/wasp

Node for IOTA Smart Contracts

Primary LanguageGoApache License 2.0Apache-2.0

Wasp logo

Welcome to the Wasp repository!

Wasp is a node software developed by the IOTA Foundation to run the IOTA Smart Contract Protocol (ISCP in short) on top of the IOTA Tangle. Please find here a high level introduction into ISCP.

A smart contract is a distributed software agent that stores its state in the UTXO ledger, and evolves with each request sent to the contract. Since the UTXO ledger is immutable, by extension the smart contract state is also immutable.

A committee of an arbitrary number of Wasp nodes runs a chain of smart contracts. The main purpose of the committee is to ensure consistent transition from the previous state to the next, according to the attached program. This ensures that the operation of smart contracts is distributed, fault-tolerant and leaderless.

The articles below explain how to run a Wasp node on the Pollen network, as well as concepts and architecture of ISCP and Wasp.

Disclaimer: Wasp node and articles is a work in progress, and most likely will always be. The software presented in this repository is not ready for use in commercial settings or whenever processing of critical data is involved.

Prerequisites

git clone -b master+wasp https://github.com/iotaledger/goshimmer.git
cd goshimmer
go install

Note: The only difference between standard Goshimmer (master branch) and the master+wasp branch is the WaspConn plugin, which accepts connections from Wasp nodes.

Compile

  • Build the wasp binary (Wasp node): go build
  • Build the wasp-cli binary (CLI client): go build ./tools/wasp-cli

Alternatively, build and install everything with go install ./...

Test

  • Run all tests (including integration tests which may take several minutes): go test -timeout 20m ./...
  • Run only unit tests: go test -short ./...

Note: integration tests require the goshimmer, wasp and wasp-cli commands in the system path (i.e. you need to run go install ./... before running tests).

Run

Learn

Tools

  • wasp-cli: A CLI client for the Wasp node.
  • wasp-cluster: allows to easily run a network of Wasp nodes, for testing.