Skip to content

Commit 72f08ae

Browse files
authored
Merge pull request #23 from movementlabsxyz/feat/improve-doc
[protocols] more helpful overview files
2 parents 5d367b4 + 99b5824 commit 72f08ae

File tree

11 files changed

+81
-22
lines changed

11 files changed

+81
-22
lines changed

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"stm32-for-vscode.openOCDPath": false,
3+
"stm32-for-vscode.armToolchainPath": false,
4+
"spellright.userDictionary": "${workspaceFolder}/.vscode/spellright.dict"
5+
}

.vscode/spellright.dict

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Fastconfirmation
2+
testnet
3+
unstaking

protocol/README.md

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,34 @@
11
# `protocol-units`
2-
`protocol-units` are used to collect runnable and composable units for interacting with the `ffs` protocol. We store contracts within protocol units, for example.
2+
3+
`protocol-units` are used to collect runnable and composable units for interacting with the `ffs` protocol. We store contracts within protocol units, for example.
34

45
## Contents
5-
- **[`mcr`](./mcr/)**: the `MCR` implementation of `ffs` provided prior to the specification of the `fast-confirmations` and `post-confirmations` protocols. It is maintained for legacy purposes.
6-
- **[`pcp`](./pcp/)**: the Postconfirmations sub-protocol implementation for `ffs`.
7-
- **[`fcp`](./fast-confirmations/)**: the fastconfirmations sub-protocol implementation for `ffs`.
8-
- **[`ffs`](./ffs/)**: the full `ffs` protocol implementation.
6+
7+
- **[`mcr`](./mcr/README.md)**: the `MCR` sub-protocol implementation of `ffs` provided prior to the specification of the `fast-confirmations` and `post-confirmations` protocols. It is maintained for legacy purposes.
8+
- **[`pcp`](./pcp/README.md)**: the Postconfirmation sub-protocol implementation for `ffs`.
9+
- **[`fcp`](./fcp/README.md)**: the Fastconfirmation sub-protocol implementation for `ffs`.
10+
- **[`ffs`](./ffs/README.md)**: the full `ffs` protocol implementation.
11+
12+
## Architecture for each protocol unit
13+
14+
- `cli/` - Command line interface tools
15+
- `client/` - CLI tool for users to interact with the protocol (posting commitments, querying state)
16+
- `deployer/` - CLI tool for deploying the protocol contracts
17+
- `protocol/` - CLI tool for protocol-specific operations
18+
19+
- `clients/` - Protocol client implementations
20+
- `eth/` - Ethereum client implementation that handles blockchain interactions
21+
- `mock/` - Mock client for testing
22+
- `util/` - Shared utilities for clients
23+
24+
- `dlu/` - Deployment and Lifecycle Utilities
25+
- `eth/` - Ethereum-specific deployment tools
26+
- `contracts/` - Smart contract implementations. Includes settlement contracts for block commitments, staking contracts for validator management, token contracts for custody.
27+
- `deployer-core/` - Core deployment logic
28+
- `anvil/` - Local testnet configuration
29+
30+
- `manager/` - Protocol management and orchestration. Manages block commitments by batching and submitting them, interacts with clients, and processes commitment events (acceptance or rejection) for the settlement system.
31+
32+
- [`util/`](util/) - Shared utilities
33+
- `config/` - Configuration management
34+
- `types/` - Common type definitions

protocol/mcr/README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
# MCR - Multi-Commit Rollup
1+
# MCR (Multi Commit Rollup)
22

3-
**MCR** implements a staking-based settlement where validators commit L2-blocks on Layer 1 (L1).
3+
This directory contains the implementation of the MCR protocol, which handles rollup commitment aggregation.
44

5-
Validators stake tokens to participate in block validation. They commit to L2-blocks on L1, and the contract on L1 tracks block commitments, epochs, and stake. The contracts also manage validators and custodian staking and unstaking. The contract validates if commitments have reached two-thirds supermajority stake, and rewards or slashes validators based on their actions.
5+
## Overview
66

7-
For further details see the [RFC for MCR](https://github.com/movementlabsxyz/rfcs/pull/29) and the [MIP-34](https://github.com/movementlabsxyz/MIP/blob/main/MIP/mip-34).
7+
**MCR** implements a staking-based settlement where validators commit to a state from L2 on Layer 1 (L1). MCR accepts commitments from all staked attesters and aggregates them into a single confirmation. The contracts on L1 tracks block commitments, epochs, stake and rewards.
88

9-
## Architecture
9+
The distinguishing feature to PCP is that there is only one type of actor, which is the attester.
1010

11-
- [Contracts](./contracts/README.md): Includes settlement contracts for block commitments, staking contracts for validator management, token contracts for custody.
12-
- **Manager**: Manages block commitments by batching and submitting them, interacts with clients, and processes commitment events (acceptance or rejection) for the settlement system.
13-
- **Setup**: Prepares local environments or deploys contracts, manages configuration for local and deployment setups, and ensures contract deployment when needed.
14-
- **Runner**: Orchestrates the setup and execution of configuration tasks, applies setup steps, and logs processes for debugging.
15-
- **Client**: Handles interaction with the MCR system by posting block commitments, streaming commitment data, and managing Ethereum blockchain interactions.
11+
For further details see the [RFC for MCR](https://github.com/movementlabsxyz/rfcs/pull/29) and the [MIP-34](https://github.com/movementlabsxyz/MIP/blob/main/MIP/mip-34).

protocol/mcr/dlu/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Deployed Logic Units (DLU)
2-
DLUs are units of logic that are not generally run within an independent process, but which must be deployed somewhere. Smart contracts are DLU.
32

4-
In this directory, we include DLU and the means via which to deploy them to various environments.
3+
DLUs are units of logic that are not generally run within an independent process, but which must be deployed somewhere. Smart contracts are DLU.
4+
5+
In this directory, we include DLU and the means via which to deploy them to various environments.

protocol/pcp/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# PCP (Postconfirmation Protocol)
2+
3+
This directory contains the implementation of the PCP protocol, which handles commitment settlement through postconfirmation.
4+
5+
## Overview
6+
7+
**PCP** implements a staking-based settlement where validators commit to a state from L2 on Layer 1 (L1). PCP accepts commitments from all staked attesters. A specialized attester - the acceptor - aggregates them into a single confirmation, called a postconfirmation. The contracts on L1 tracks block commitments, epochs, stake and rewards.
8+
9+
The distinguishing feature to MCR is that there are two types of actors, which are the attesters and the acceptors.
10+
11+
For further details see the [MIP-37](https://github.com/movementlabsxyz/MIP/blob/main/MIP/mip-37).

sdk/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
# `sdk`
2-
The FFS SDK is a set of tools for building FFS services. It is generally the entrypoint for researching and building with FFS.
2+
3+
The FFS SDK is a set of tools for building FFS services. It is generally the entry point for researching and building with FFS.
4+
5+
## Contents
6+
7+
- **[`cli`](./cli/README.md)**: the SDK cli suite.
8+
- **[`ffs`](./cli/ffs/README.md)**: the main FFS command line tool.
9+
- **[`ffs-client`](./cli/ffs-client/README.md)**: a client for interacting with FFS.
10+
- **[`ffs-dev`](./cli/ffs-dev/README.md)**: a development tool for FFS.

sdk/cli/ffs-client/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
# `ffs-client`
2-
The command line tool for interacting with live FFS services.
2+
3+
The command line tool for interacting with live FFS services.
4+
5+
The `ffs-client` relies on the implementation of the following components in each of the sub-protocols in the `[protocol/](../protocol/README.md)` directory:
6+
7+
- `cli/client/` - Command line interface tools for interacting with the protocol
8+
- `clients/eth/` - Ethereum client implementation that handles blockchain interactions

sdk/cli/ffs-dev/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# `ffs-dev`
2-
The FFS command line tool for those working on active development, typically combines the most FFS command line tools.
2+
3+
The FFS command line tool for those working on active development, typically combines the most FFS command line tools.

sdk/cli/ffs/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# `ffs`
2-
The main FFS command line tool. This is under specification and development.
2+
3+
The main FFS command line tool.

0 commit comments

Comments
 (0)