22 releases (9 breaking)

new 0.10.0 Apr 16, 2025
0.9.0 Mar 5, 2025
0.8.0 Jan 20, 2025
0.7.0 Dec 16, 2024
0.1.0-rc.4 Jul 24, 2024

#62 in #zk-sync

Download history 943/week @ 2024-12-25 2740/week @ 2025-01-01 4901/week @ 2025-01-08 4669/week @ 2025-01-15 3461/week @ 2025-01-22 2368/week @ 2025-01-29 4375/week @ 2025-02-05 3974/week @ 2025-02-12 3157/week @ 2025-02-19 4999/week @ 2025-02-26 5938/week @ 2025-03-05 5675/week @ 2025-03-12 6433/week @ 2025-03-19 4899/week @ 2025-03-26 4928/week @ 2025-04-02 4587/week @ 2025-04-09

22,445 downloads per month
Used in 47 crates (8 directly)

MIT/Apache

505KB
11K SLoC

zkSync Era Consensus Layer

This repo implements the consensus algorithm for the era blockchain. We implement all the necessary components for a set of sequencers to reach consensus over blocks (which right now are represented just as binary blobs). In the future, this codebase will also be capable of running full nodes and, after we integrate with the rest of the server, of reaching consensus over real blocks.

Knowledge Index

The following questions will be answered by the following resources:

Question Resource
What is the logical project structure and architecture? architecture.md
How can I run the project? launch.md
What is the style guide to contribute to this repo? style.md

Policies

License

zkSync Era is distributed under the terms of either

at your option.


lib.rs:

This module provides the roles of the nodes in the network.

The roles are:

  • Node: a node that participates in the gossip network, so it receives and broadcast blocks, helps with peer discovery, etc. Every node has this role.
  • Validator: a node that participates in the consensus protocol, so it votes for blocks and produces blocks. It also participates in the validator network, which is a mesh network just for validators. Not every node has this role.
  • Attester: a node that signs the L1 batches and broadcasts the signatures known as votes to the gossip network. Not every node has this role.

Dependencies

~19–30MB
~531K SLoC