8000 GitHub - matter-labs/era-consensus: Consensus layer implementation for zkSync Era
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

matter-labs/era-consensus

zkSync Era Consensus Layer

This repo implements the consensus layer for ZK Stack chains. We implement all the necessary components for a set of sequencers to reach consensus over blocks. The zkSync Era Consensus Layer is designed to be used as a library, providing consensus and networking services to an execution layer.

Prerequisites

In order for the project to run performantly (both as an application and a library), we need to disable TCP slow start on the machine operating system. This can be done in Linux with the following command:

sysctl -w net.ipv4.tcp_slow_start_after_idle=0

Architecture

This section provides a physical map of folders & files in this repository.

  • /infrastructure: Infrastructure scripts that are needed to test the zkSync Era Consensus Layer.
  • /node
    • /components: Crates that implement specific components. Each of them maintains its own separate state and communicate with each other through message passing.
      • /bft: Implements the logic for the consensus algorithm.
      • /executor: Responsible for parsing the configuration parameters given by the user, and initializing the components and the interface with the execution layer. It's basically the bootloader for the node.
      • /network: Handles communication with other nodes and maintains a pool of outbound and inbound connections. It also implements a syncing mechanism (for blocks, etc).
    • /lib: All the library crates used as dependencies of the component crates above.
      • /concurrency: Crate with essential primitives for structured concurrency.
      • /crypto: Cryptographic primitives used by the other crates.
      • /engine: Provides an interface to the execution layer.
      • /protobuf: Code generated from protobuf schema files and utilities for serialization used by the other crates.
      • /protobuf_build: Generates rust code from the proto files.
      • /roles: Implements the types necessary for each role in the network. We have just two roles: Node and Validator.
      • /utils: Collection of small utilities and primitives.
    • /tools: Utility binaries needed to work with and test the node.
  • /spec: Contains the specifications for the consensus algorithm.
    • /informal-spec: The pseudo-code specification that was used as the basis for the implementation.
    • /protocol-spec: The Quint specification that was used to formally verify the protocol.

Policies

License

zkSync Era is distributed under the terms of either

at your option.

Official Links

About

Consensus layer implementation for zkSync Era

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 25

Languages

0