Skip to content

Commit bbd5126

Browse files
committed
feature(protocol-config): init a new crate, with http impl of a new trait to retrieve epoch setting
1 parent 0df5853 commit bbd5126

File tree

14 files changed

+918
-13
lines changed

14 files changed

+918
-13
lines changed

Cargo.lock

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ members = [
1818
"internal/mithril-doc",
1919
"internal/mithril-doc-derive",
2020
"internal/mithril-era",
21-
"internal/mithril-metric",
21+
"internal/mithril-metric",
22+
"internal/mithril-protocol-config",
2223
"internal/mithril-persistence",
2324
"internal/mithril-resource-pool",
2425
"internal/mithril-ticker",

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ This repository consists of the following parts:
102102

103103
- [**Mithril persistence**](./internal/mithril-persistence): the **persistence** library that is used by **Mithril network** nodes.
104104

105+
- [**Mithril protocol config**](./internal/mithril-protocol-config): the **configuration protocol** library used by **Mithril network** nodes.
106+
105107
- [**Mithril resource pool**](./internal/mithril-resource-pool): a **resource pool** mechanism that is used by **Mithril network** nodes.
106108

107109
- [**Mithril ticker**](./internal/mithril-ticker): a **ticker** mechanism that reads time information from the chain and is used by **Mithril network** nodes.

epoch_grid.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
|Configuration parameter| Node| Epoch + 0| Epoch + 1| Epoch + 2| Epoch + 3| Epoch + 4|
2+
| --- | --- | --- | --- | --- | --- | --- |
3+
|protocol parameters| aggregator (leader)| update local parameters. <br> Persist epoch setting for epoch+2 in database| advertise new protocol parameters on `/epoch-settings`| -| - | -|
4+
|protocol parameters| aggregator (follower)| -| fetch new protocol parameters on `/epoch-settings` and does signer registration with them| -| - | -|
5+
|protocol parameters| signer| -| fetch new protocol parameters on `/epoch-settings` <br> - signer_registration_protocol_parameters for epoch +1| -| - | -|
6+
|entity types config| aggregator (leader) | --- | --- | --- | --- | --- |
7+
|entity types config| aggregator (follower) | --- | --- | --- | --- | --- |
8+
|entity types config| signer | --- | fetch new protocol parameters on `/epoch-settings`<br> - entity types config for epoch - 1| --- | --- | --- |
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[package]
2+
name = "mithril-protocol-config"
3+
version = "0.1.0"
4+
description = "Configuraton parameters of the mithril network"
5+
authors = { workspace = true }
6+
edition = { workspace = true }
7+
homepage = { workspace = true }
8+
license = { workspace = true }
9+
repository = { workspace = true }
10+
11+
[dependencies]
12+
anyhow = { workspace = true }
13+
async-trait = { workspace = true }
14+
mithril-common = { path = "../../mithril-common" }
15+
reqwest = { workspace = true, features = [
16+
"default",
17+
"stream",
18+
"gzip",
19+
"zstd",
20+
"deflate",
21+
"brotli"
22+
] }
23+
semver = { workspace = true }
24+
serde = { workspace = true }
25+
serde_json = { workspace = true }
26+
slog = { workspace = true, features = [
27+
"max_level_trace",
28+
"release_max_level_debug",
29+
] }
30+
slog-async = { workspace = true }
31+
slog-term = { workspace = true }
32+
thiserror = { workspace = true }
33+
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "signal"] }
34+
35+
36+
[dev-dependencies]
37+
#criterion = { version = "0.7.0", features = ["html_reports", "async_tokio"] }
38+
http = "1.3.1"
39+
httpmock = "0.7.0"
40+
mockall = { workspace = true }
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Mithril-protocol-config
2+
3+
**This is a work in progress** 🛠
4+
5+
This crate contains shared interface for Mithril nodes which need to epoch settings.

0 commit comments

Comments
 (0)