Skip to content

Commit 2150813

Browse files
authored
Merge pull request 0xPolygon#2591 from pgebheim/pgpg/main2
Squashed commit of the following:
2 parents 6857da8 + b3371a5 commit 2150813

22 files changed

+675
-1283
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ RUN apk update
44
RUN apk add rsync
55
RUN apk add git
66
RUN apk add nodejs npm
7+
RUN apk add --no-cache bash
78
COPY requirements.txt requirements.txt
89
RUN pip install -r requirements.txt --no-cache-dir
910

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Polygon Knowledge Layer
22

3-
Welcome to the Polygon Knowledge Layer .
3+
Welcome to the Polygon Knowledge Layer!
44

55
These docs use [the Material theme for MkDocs](https://squidfunk.github.io/mkdocs-material/). Our goal is to establish a high-quality, curated, and comprehensive "source of truth" for Polygon's technology.
66

docs/agglayer/agglayer-go.md

Lines changed: 0 additions & 98 deletions
This file was deleted.

docs/agglayer/agglayer-rs.md

Lines changed: 0 additions & 91 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Agglayer Node
2+
3+
## Overview
4+
5+
**The Agglayer node** is the Rust-based service designed to receive zero-knowledge proofs from Agglayer-connected chains, verify their validity, and send them to the L1 for final settlement.
6+
7+
> **Note:** Instructions on how to clone and build the Agglayer locally, including running the pessimistic proof test suite and generating a verifiable proof using Succinct’s Prover Network, can be found [here](#).
8+
9+
## Crate directory
10+
11+
The crates and their functions within the Agglayer repo are as follows:
12+
13+
| Crate | Description |
14+
| --- | --- |
15+
| [agglayer-aggregator-notifier](/crates/agglayer-aggregator-notifier) | Contains implementations for [Certifier](crates/agglayer-certificate-orchestrator/src/certifier.rs#L29) which applies new [Certificate](crates/agglayer-types/src/lib.rs#245) on top of an existing state and computes the proof, as well as [EpochPacker](crates/agglayer-certificate-orchestrator/src/epoch_packer.rs#14), which handles the packing of an epoch |
16+
| [agglayer-certificate-orchestrator](/crates/agglayer-certificate-orchestrator) | Manages the orchestration and handling of certificates; also handles `current_epoch`, which allows non-orchestrators to push a proven certificate |
17+
| [agglayer-clock](/crates/agglayer-clock) | Defines the pace of the Agglayer in terms of epoch with support for two clocks: time (for testing) and block (for listening for L1 blocks) |
18+
| [agglayer-config](/crates/agglayer-config) | Manages configuration settings and parameters for Agglayer components |
19+
| [agglayer-contracts](/crates/agglayer-contracts) | Contains smart contracts and related logic |
20+
| [agglayer-gcp-kms](/crates/agglayer-gcp-kms) | Provides integration with GCP's Key Management Service for secure key handling |
21+
| [agglayer-node](/crates/agglayer-node) | Responsible for spawning and running the different components of the node |
22+
| [agglayer-prover-types](/crates/agglayer-prover-types) | Defines data structures and types used by the prover |
23+
| [agglayer-prover](/crates/agglayer-prover) | Responsible for running everything related to the prover |
24+
| [agglayer-signer](/crates/agglayer-signer) | Manages signing operations |
25+
| [agglayer-storage](/crates/agglayer-storage) | Contains two layers: a physical layer for abstracting RocksDB and a logic layer for exposing the interface to other crates so that they may interact with the storage |
26+
| [agglayer-telemetry](/crates/agglayer-telemetry) | Handles telemetry and monitoring functionalities |
27+
| [agglayer-types](/crates/agglayer-types) | Defines common data types and structures |
28+
| [agglayer](/crates/agglayer) | The CLI for interacting with the Agglayer |
29+
| [pessimistic-proof-program](/crates/pessimistic-proof-program) | Implements the pessimistic proof program |
30+
| [pessimistic-proof-test-suite](/crates/pessimistic-proof-test-suite) | Provides a suite of tests for validating the functionality of the pessimistic proof program |
31+
| [pessimistic-proof](/crates/pessimistic-proof) | Contains the core logic and implementation of the pessimistic proof mechanism |
32+
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
hide:
3+
- toc
4+
---
5+
6+
# Agglayer Architecture
7+
8+
## Overview
9+
10+
**The Agglayer** is designed to provide an interoperability framework for cross-chain communication and state verification that robust, scalable, and flexible enough to support these features between unalike blockchain networks. The key components of the Agglayer include the **Agglayer node**, the **pessimistic proof**, and the **unified bridge**. They are designed to enable lightweight, secure, and verifiable cross-chain transactions.
11+
12+
## Agglayer node
13+
14+
The **Agglayer Node** is a Rust-based service responsible for processing and verifying zero-knowledge (ZK) proofs from chains connected to the Agglayer.
15+
16+
### Key functions:
17+
- **Zero-knowledge proof verification**: The node receives and verifies cryptographic proofs from connected chains before sending them to L1.
18+
- **Certificate management**: Handles certificates that attest to the state transitions of connected chains.
19+
- **Orchestration of epochs**: Manages state updates in a structured manner through epochs.
20+
21+
## Pessimistic proof
22+
23+
The **pessimistic proof** mechanism ensures that any withdrawal claims made to the Agglayer are backed by legitimate deposits in the **Unified Bridge**. It uses a novel zero-knowledge proof system implemented in Rust, leveraging the **SP1 zkVM** and the **Plonky3 proving system**.
24+
25+
### Key functions:
26+
- **Security validation**: Ensures that each chain connected to the Agglayer remains as secure as if it were operating independently.
27+
- **State consistency**: Provides a complete view of all token and message transfers occurring across the Agglayer.
28+
- **Fraud prevention**: Prevents chains from withdrawing more assets than they have legitimately received.
29+
30+
## Unified bridge
31+
32+
The **unified bridge** is responsible for maintaining the data structures related to chain states, cross-chain transactions, and the Agglayer’s Global Exit Root, ensuring cross-chain transactions are indeed finalized on the L1 before they can be claimed.
33+
34+
### Key functions:
35+
- **Cross-chain asset transfers**: Allows users to bridge assets between different chains.
36+
- **Message passing**: Enables contract-to-contract interactions across chains.
37+
- **State management and accounting**: Maintains Merkle proofs that ensure transactions are finalized before being processed on the destination chain.

0 commit comments

Comments
 (0)