Giter Site home page Giter Site logo

dharma-eng / tiramisu Goto Github PK

View Code? Open in Web Editor NEW
74.0 5.0 4.0 1.74 MB

Tiramisu is a "Layer Two" system for scalable token transfers that prioritizes simplicity.

License: MIT License

JavaScript 0.58% TypeScript 73.19% Solidity 26.23%
ethereum erc20 scalability blockchain solidity typescript rollup layer2

tiramisu's Introduction

Tiramisu

Tiramisu

Tiramisu is a "Layer Two" system for scalable token transfers that prioritizes simplicity.

License CI Coverage Community

Summary

Tiramisu is a framework for performing ERC20 token transfers at a fraction of the cost of a standard transfer.

It accomplishes this by aggregating transactions and committing them into blocks. However, it does not perform any on-chain computation for the transactions themselves. Instead, it simply includes a merkle root of the new account state along with the transaction data for each block. If some part of a block is invalid, anyone can submit a proof to that effect within a challenge period. Should they do so, they earn a reward and trigger a roll-back of the state.

Tiramisu is a member of the group of "fraud proof rollup" (or "optimistic rollup") Layer Two technologies. That being said, Tiramisu prioritizes simplicity over raw scalability or generalizability — it designates a single block producer, and the only permitted operations are deposits, transfers, withdrawals, and authorization of additional signing keys.

These operations are broken down into two high-level categories:

  • Hard transactions, including deposits and direct withdrawals or signing key additions, can only be initiated from a corresponding account on mainnet. These are placed in a queue as soon as the Tiramisu contract is called, and must be processed by the block producer in the order they are received.
  • Soft transactions, including transfers and standard withdrawals or signing key modifications, require a signature from a designated signer, and the block producer can choose whether or not to include a given soft transaction in a block.

See the specification for a more detailed overview of the design decisions behind Tiramisu.

⚠️ Warning: these contracts and libraries have not been audited and are not yet production-ready! ⚠️

Table of Contents

Install

To install locally, you'll need Node.js 10 through 12 and Yarn (or npm). Then, perform the following:

$ git clone https://github.com/dharma-eng/Tiramisu.git
$ cd Tiramisu
$ yarn install

Once you've successfully pulled down the code and installed all dependencies, you'll need to compile both the application code (using TypeScript) as well as the contracts (using Truffle):

$ yarn build:ts   # compiles app/ and places output in dist/
$ yarn build:sol  # compiles contracts/ and places output in build/

Usage

To run all the typescript tests in test/tests/:

$ yarn test:app

You can also run tests directly if you prefer for the blockchain class, the state wrapper class, or the state machine class that executes transactions:

$ yarn test:blockchain
$ yarn test:state
$ yarn test:transactions

To generate application test coverage using nyc:

$ yarn test:coverage:app

To generate contract test coverage using Truffle with the solidity-coverage plugin:

$ yarn test:coverage:sol

To run contract linters:

$ yarn lint

Additional Information

This repository is maintained by @0age, @d1ll0n, and @anna-carrol.

Have any questions or feedback? Join the conversation in the Dharma_HQ Discord server.

tiramisu's People

Contributors

0age avatar anna-carroll avatar d1ll0n avatar timdaub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

0age timdaub 0xyza

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.