• Stars
    star
    134
  • Rank 270,967 (Top 6 %)
  • Language
    Rust
  • License
    GNU General Publi...
  • Created almost 3 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A framework for generalized shielded state transitions

Taiga

Taiga is a framework for generalized shielded state transitions. This repository contains the implementation of Taiga in Rust.

⚠️ Taiga is WIP and cannot be used in production yet ⚠️

Taiga at the bottom, as a foundation for Taiga applications, and their state is stored in Notes.

Taiga in 500 Words

Taiga is a state transition protocol that allows applications built on top of it to enjoy the advantages of fully shielded multi-party state transitions (hiding the application type, the data associated with it, involved parties, etc.) without giving up the application complexity. Although an independent project, Taiga is intended to be at the heart of Anoma. Conceptually, Taiga can be seen as an operating system for execution of Anoma programs. In practice, Taiga is a set of APIs for creating notes, intents, transactions – for both shielded and transparent execution; creating and verifying transaction validity proofs; computing the state changes produced by transactions; de-/serializing all of the above.

A Note represents an Anoma resource in Taiga. Notes are immutable and have a "denomination" and a non-negative value, among other fields. Every note has a set (partially determined by the note's denomination) of executable programs (often referred to as Validity Predicates or VPs) associated with it. Taiga programs result in a state change, which includes a list of invalidated (or "nullified") notes and a list of newly created notes. Invalidating a note means revealing its nullifier, a secret value bound to the note. Note ownership is determined by knowledge of the nullifier plus arbitrary logic in a VP associated with the note. Creating a note means computing its commitment (a hash), and adding it to a global merkle tree of commitments. The global state of Anoma is a hashset of note nullifiers and a commitment tree.

Taiga transactions consist of valid partial transactions. Every partial transaction consists of exactly two input notes and two output notes. Output notes are crafted by the creator of the partial transaction. If a transaction gets executed, its inputs notes are invalidated, and its output notes are "created": added to the commitment tree. A Partial transaction is considered valid if all programs (VPs) associated with the notes comprising it are valid (result in true). Every VP in a partial transaction can read any field of any note in it. If we don't need all 4 note slots in a partial transaction, we can use "ephemeral" notes to fill the empty slots: they are same as real notes, but have the is_merkle_checked flag set to false. Ephemeral notes can also be used to describe the user intent by attaching an intent VP to it. Intent VP can describe arbitrarily complex logic of a valid state change: unless it is satisfied, the whole partial transaction would not be valid and therefore can't be part of a valid transaction.

Taiga transaction is valid if 1) all contained partial transactions are valid; and 2) the transaction is balanced: for every note denomination, the sum of values of all input notes of that denomination is equal to the sum of all output notes of the same denomination. A single valid partial transaction can be a valid transaction if it is balanced.

To achieve shielded properties, Taiga uses zero-knowledge proof system Halo2 to hide the sensitive information about the state transitions (application types, parties involved, etc). Transactions of different applications are indistinguishable from one another and all applications benefit from the shared shielded pool of transactions.

Features

  • Support for arbitrary atomic multi-party state transitions
  • Data and function privacy: to a third-party observer, all transactions look the same, no matter what applications are involved
  • Matchmaking is taken care of: with the help of intent applications and solvers finding counterparties becomes easy
  • In addition to shielded execution, Taiga also implements transparent execution. Assets can be moved between the transparent and shielded pool, and applications may support both types of state transitions
  • Performance benefits from using PLONK arithmetization (including lookups)

Taiga Specs

or run the Taiga book:

cd book
mdbook serve --open

Examples of Taiga Transactions

Split the Note

Let's assume we have a note representing 1 ETH, and we want to give 0.7 ETH to a friend. To do so, we would first need to split the note into two smaller notes. Let's start constructing a partial transaction! We have a 1 ETH note, and we want a 0.7 ETH note:

Inputs:  [ 1 ETH ] [ ]
Outputs: [0.7 ETH] [ ]

We would probably want to get the change too:

Inputs:  [ 1 ETH ] [ ]
Outputs: [0.7 ETH] [0.3 ETH]

This is not a valid partial transaction because it doesn't have two inputs. We can use an ephemeral note for padding (let's mark padding notes using ^ symbol):

Inputs:  [ 1 ETH ] [0 PAD^ ]
Outputs: [0.7 ETH] [0.3 ETH]

Padding notes may have a non-zero value, but in this case, the value is zero, thus it doesn't contribute to balancing the transaction. Sum of input notes in this partial transaction is 1 ETH; sum of outputs is also 1 ETH. This single partial transaction is balanced, and thus is also a valid full transaction. We, of course, assume, that all VPs associated with the notes involved result in true.

More Repositories

1

namada

Rust implementation of Namada, a Proof-of-Stake L1 for interchain asset-agnostic privacy
Rust
2,394
star
2

juvix

A language for intent-centric and declarative decentralised applications
Haskell
447
star
3

anoma-archive

Reference implementation of the Anoma protocols in Rust.
Rust
426
star
4

namada-testnets

Testnet configurations and coordination for the Namada network.
327
star
5

namada-trusted-setup-claimer

Sign arbitrary messages with keys obtained from Namada's trusted setup
Rust
320
star
6

vamp-ir

Vamp-IR is a proof-system-agnostic language for writing arithmetic circuits
Rust
155
star
7

zkp-compiler-shootout

Evaluating & benchmarking ZKP compilation strategies.
Rust
118
star
8

masp

The multi-asset shielded pool (MASP) provides a unified privacy set for all assets on Namada.
Rust
88
star
9

ferveo

An implementation of a DKG protocol for front-running protection on Anoma.
Rust
78
star
10

namada-interface

TypeScript
77
star
11

whitepaper

TeX
59
star
12

namada-docs

MDX
48
star
13

namada-shielded-expedition

Python
42
star
14

typhon

Formalization of Typhon protocol
TLA
28
star
15

geb

A Categorical View of Computation
Idris
28
star
16

research

Early-stage research related to the Anoma protocols.
Idris
23
star
17

specs

Specifications for the Anoma protocols.
TeX
23
star
18

alucard

A common lisp DSL for writing zero knowledge circuits
Common Lisp
18
star
19

namada-indexer

Namada indexer to be used in conjunction with the namada interface
Rust
16
star
20

ethereum-bridge

A generalized fully trustless Ethereum bridge for sovereign chains.
Solidity
12
star
21

minijuvix

Haskell
11
star
22

juvix-stdlib

The Juvix standard library
Makefile
9
star
23

VampIR-Book

A book which can act as an introduction and documentation for VampIR
CSS
9
star
24

masp-mpc

MASP MPC code
Rust
8
star
25

namada-mainnet-genesis

Python
7
star
26

namada-sdk-starter

Rust
6
star
27

juvix-nightly-builds

6
star
28

abstract-resource-machine-simulator

Makefile
6
star
29

anoma-alpha

An intent-centric, privacy-preserving protocol for decentralized counterparty discovery, solving, and multi-chain atomic settlement.
Rust
6
star
30

juvix-e2e-demo

Juvix compiler stack - Integration demo
Dockerfile
6
star
31

exhibit_plonkup

Rust
5
star
32

devtool

Rust
4
star
33

anoma-blog

Jupyter Notebook
4
star
34

verify-beacon

Rust
3
star
35

vscode-juvix

VSCode extension for Juvix
TypeScript
3
star
36

dev-utils

Shell
3
star
37

namada-whitepaper

Namada whitepaper
3
star
38

juvix-docs

Juvix Official Documentation
Makefile
3
star
39

devchain-container

Shell
2
star
40

intents-snippets

A repo to put code snippets related to intent research
Agda
2
star
41

Isabelle-HPaxos

A formalization of HPaxos in Isabelle
Isabelle
2
star
42

typhon-sml

Typhon reference implementation in Standard ML
Standard ML
2
star
43

namada-genesis

Python
2
star
44

namada-masp-indexer

The Namada Masp Indexer reference implementation.
Rust
2
star
45

anoma-wasm-multitoken

Validity predicate and transactions for a variable supply multitoken account
Rust
2
star
46

wasm-workspace

Rust
2
star
47

namada-shielded-airdrop

Rust
2
star
48

anoma-blog-writing-guide

Comprehensive guide to writing blogposts for the anoma blog.
2
star
49

juvix-quickcheck

Property-based testing for Juvix
Makefile
2
star
50

plonkup-hash

A collection of hash gadgets written for Plonkup
Rust
1
star
51

juvix-mode

The Juvix Emacs mode
Emacs Lisp
1
star
52

vscode-vampir

1
star
53

anoma-app-lib

A library for intent-centric application development.
1
star
54

juvix-test

A testing framework for Juvix
Shell
1
star
55

juvix-anoma-test

A library for testing Anoma applications
1
star
56

juvix-containers

Immutable container types for Juvix
Makefile
1
star
57

highlightjs-juvix

Juvix language grammars for highlightjs (low maintenance)
JavaScript
1
star
58

art-template

Anoma Research Topics Template
TeX
1
star
59

juvix-anoma-stdlib

A Juvix library for writing Anoma applications
Makefile
1
star
60

namada-light-sdk-starter

Namada light sdk starter kit
Dockerfile
1
star
61

ART-2023-Gureev-Cubides-Geb-Pipeline

TeX
1
star