Code Monkey home page Code Monkey logo

zksync's Introduction

zkSync: scaling and privacy engine for Ethereum

Logo

Live on Mainnet Live on Rinkeby Live on Ropsten

zkSync is a scaling and privacy engine for Ethereum. Its current functionality scope includes low gas transfers of ETH and ERC20 tokens in the Ethereum network.

Description

zkSync is built on ZK Rollup architecture. ZK Rollup is an L2 scaling solution in which all funds are held by a smart contract on the mainchain, while computation and storage are performed off-chain. For every Rollup block, a state transition zero-knowledge proof (SNARK) is generated and verified by the mainchain contract. This SNARK includes the proof of the validity of every single transaction in the Rollup block. Additionally, the public data update for every block is published over the mainchain network in the cheap calldata.

This architecture provides the following guarantees:

  • The Rollup validator(s) can never corrupt the state or steal funds (unlike Sidechains).
  • Users can always retrieve the funds from the Rollup even if validator(s) stop cooperating because the data is available (unlike Plasma).
  • Thanks to validity proofs, neither users nor a single other trusted party needs to be online to monitor Rollup blocks in order to prevent fraud.

In other words, ZK Rollup strictly inherits the security guarantees of the underlying L1.

To learn how to use zkSync, please refer to the zkSync SDK documentation.

Development Documentation

The following guides for developers are available:

Projects

Changelog

Since the repository is big and is split into independent components, there is a different changelog for each of its major parts:

License

zkSync is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE, LICENSE-MIT for details.

zksync's People

Contributors

alekseysidorov avatar alexandrst88 avatar antond3 avatar baldyash avatar barichek avatar bors-matterlabs-dev[bot] avatar bradfora avatar deniallugo avatar dennybaa avatar dependabot[bot] avatar dvush avatar furkhat avatar gluk64 avatar hatemosphere avatar jazzandrock avatar killmeplz avatar ly0va avatar olegnn avatar otani88 avatar perekopskiy avatar popzxc avatar romanbrodetski avatar shamatar avatar slumber avatar stanislavbreadless avatar thor314 avatar tsionyx avatar tymurkhr avatar vladbochok avatar voron200 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zksync's Issues

Refactor crates

  • move out merkle_tree into a separate crate
  • in merkle_tree use parallel merkle_tree
  • move out key_generator into a separate crate
  • move out circuits into a separate crate
  • move models and models/circuit into franklin/src/models crate

Cosmetic improvements of the rust workspace.

  • Move all crates to rust 2018
  • Apply code format. (cargo fmt)
  • Organize crates as a workspace (remove top level crate and move bins to server/prover crates)

EDIT:

  • Apply clippy fixes
    After merge of all current work, another batch of fixes should be applied.

Update loadtest

Make loadtest work with latest wallet

  • parallelize

cache signatures?

CI

  • create k8s nodes for gitlab
  • configure k8s (label, namespaces..)
  • configure k8s plugins (nginx ingress controller, external-dns, certmon)
  • set up a repository for docker containers
  • set up a repository for helm charts
  • configure vault / consul
  • deploy gitlab
  • configure gitlab
  • configure gitlab backups
  • import franklin repository
  • create franklin helm chart
  • configure ci

One source of constants in our project

Problem:

There are some parameters that make development hard on laptop.

  • Block size chunks - size of Franklin block (denominated in chunks, 1 chunk is 8 bytes)
  • Account tree depth - size of account tree.

Proposal:
I propose using environment to setup this constants in our project.

How this constants change code:

models::params -> circuit -> key generator -> solidity contract that verifies proofs.

How to pick up this constants from environment at compile time?
https://doc.rust-lang.org/1.2.0/std/macro.env!.html

How to ensure that constants in binary are consistent with environment?
You can create object in the same "models::params" module that is constructed with lazy_static! and in the construction you can verify that constants from current environment are the same as it was at compile time.
using https://doc.rust-lang.org/1.2.0/std/env/fn.var.html

Write chain spec.

Specify API in wiki so that a parallel implementation is possible.

Isolate prover from db

Design and implement isolating the prover interface, so that the server and db can be run in a secured environment, while provers are running in the cloud.

new architetcture: https://docs.google.com/drawings/d/1ryKB9er9rJpuIASEnpWtj4HuBuygJe6ma016oBmg4Vo/edit

  • make tests for single block generation
    • state must converge
    • prover must generate valid proof for the test block
  • design and implement job queue
  • create witness_generator actor (thread) in server, with its own state
  • move witness generation and state rewinding from prover to witness_generator (via memory, not db)
  • fix prover::rewind_state() to only load diff
  • (optional) save witness to storage?
  • provide witness for prover via REST API (with access control possible to allow prover only)

Design new deposit. Update contract spec.

New deposit:

  1. Deposit from from user -- one eth transaction.
  2. Deposit funds locked forever (now correct block commit should not fail)
  3. Since deposits are locked forever, now deposit cancel is part of the exodus mode.

Update contract

  • spec
  • priority queue
  • exodus mode
  • not lock balances
  • separate governance
  • fix contract known issues
  • priority fee
  • audit
  • tests

polish block explorer

  • page for transactions
    • uniform type/from/to display
  • page for accounts
    • paginated list of transactions
  • all pages mutually interlinked from everywhere

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.