You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nomos is the blockchain layer of the Logos technology stack, providing a privacy-preserving and censorship-resistant
4
+
framework for decentralized network states.
4
5
5
-
## Project structure
6
+
This monorepo serves as a unified codebase for the Nomos ecosystem, housing all core components, services, and tools
7
+
necessary for running and interacting with the Nomos blockchain. Key features include:
6
8
7
-
-`nomos-core`: Nomos core is the collection of essential structures for the Nomos mvp and experimental nodes.
8
-
-`nomos-services`: Nomos services is the collection of components that are used as building blocks of the Nomos node prototype and the experimental nodes.
9
-
- consensus
10
-
- log
11
-
- http
12
-
- mempool
13
-
- network
14
-
-`nodes`: Nomos nodes is the collection of nodes that are used to run the Nomos mvp and experimental nodes.
15
-
-`nomos-node`: main implementation of the Nomos mvp node.
16
-
-`mockpool-node`: node with single mempool service, used to measure transaction dissemination.
9
+
- Consensus mechanisms for secure and scalable network agreement
10
+
- Ledger management for state persistence and validation
11
+
- Networking layers leveraging libp2p for peer-to-peer communication
12
+
- CLI tools and clients for seamless interaction with the blockchain
13
+
- Testnet configurations for development and experimentation
Nomos services follow a consistent design pattern: a front layer handles the `Overwatch` service, while a back layer
45
+
implements the actual service logic.
46
+
47
+
This modular approach allows for easy replacement of components in a declarative manner.
28
48
29
-
This allows us to easily replace components as needed in a type level system. In any case, a node can be setup in a declarative way composing the types.
30
49
For example:
31
50
32
-
```rust
33
-
...
51
+
```rust ignore
34
52
#[derive(Services)]
35
53
structMockPoolNode {
36
54
logging:OpaqueServiceHandle<Logger>,
@@ -41,20 +59,61 @@ struct MockPoolNode {
41
59
}
42
60
```
43
61
62
+
### Static Dispatching
44
63
64
+
Nomos favours static dispatching over dynamic, influenced by Overwatch.
65
+
This means you'll encounter Generics sprinkled throughout the codebase.
66
+
While it might occasionally feel a bit over the top, it brings some solid advantages, such as:
45
67
46
-
## Docker
68
+
- Compile-time type checking
69
+
- Highly modular and adaptable applications
70
+
71
+
## Project Structure
72
+
73
+
```
74
+
nomos/
75
+
├── book/ # Documentation in Markdown format
76
+
├── ci/ # Non-GitHub scripts, such as Jenkins' nightly integration and fuzzy testing
77
+
├── clients/ # General-purpose clients
78
+
├── consensus/ # Engine and protocols for agreement and validation
79
+
├── ledger/ # Ledger management and state transition logic
├── nomos-cli/ # Command-line interface for interacting with the Nomos blockchain
84
+
├── nomos-core/ # Collection of essential structures
85
+
├── nomos-da/ # Data availability layer
86
+
├── nomos-libp2p/ # Libp2p integration
87
+
├── nomos-services/ # Building blocks for the Node
88
+
├── nomos-tracing/ # Tracing, logging, and metrics
89
+
├── nomos-utils/ # Shared utility functions and helpers
90
+
├── testnet/ # Testnet configurations, monitoring, and deployment scripts
91
+
└── tests/ # Integration and E2E test suites
92
+
```
47
93
48
-
To build and run a docker container with the Nomos node you need to mount both `config.yml` and `global_params_path` specified in the configuration.
94
+
## Development Workflow
95
+
96
+
### Docker
97
+
98
+
#### Building the Image
99
+
100
+
To build the Nomos Docker image, run:
49
101
50
102
```bash
51
103
docker build -t nomos .
104
+
```
52
105
53
-
docker run -v "/path/to/config.yml" -v "/path/to/global_params:global/params/path" nomos /etc/nomos/config.yml
106
+
#### Running a Nomos Node
107
+
108
+
To run a docker container with the Nomos node you need to mount both `config.yml` and `global_params_path` specified in
109
+
the configuration.
54
110
111
+
```bash
112
+
docker run -v "/path/to/config.yml" -v "/path/to/global_params:global/params/path" nomos /etc/nomos/config.yml
55
113
```
56
114
57
-
To use an example configuration located at `nodes/nomos-node/config.yaml`, first run the test that generates the random kzgrs file and then run the docker container with the appropriate config and global params:
115
+
To use an example configuration located at `nodes/nomos-node/config.yaml`, first run the test that generates the random
116
+
kzgrs file and then run the docker container with the appropriate config and global params:
58
117
59
118
```bash
60
119
cargo test --package kzgrs-backend write_random_kzgrs_params_to_file -- --ignored
@@ -63,10 +122,36 @@ docker run -v "$(pwd)/nodes/nomos-node/config.yaml:/etc/nomos/config.yml" -v "$(
63
122
64
123
```
65
124
125
+
## Running Tests
126
+
127
+
To run the test suite, use:
128
+
129
+
```bash
130
+
cargo test
131
+
```
132
+
133
+
## Generating Documentation
134
+
135
+
To generate the project documentation locally, run:
136
+
137
+
```bash
138
+
cargo doc
139
+
```
140
+
141
+
## Contributing
142
+
143
+
We welcome contributions! Please read our [Contributing Guidelines](CONTRIBUTING.md) for details on how to get started.
66
144
67
145
## License
68
146
69
147
This project is primarily distributed under the terms defined by either the MIT license or the
70
148
Apache License (Version 2.0), at your option.
71
149
72
-
See [LICENSE-APACHE](LICENSE-APACHE2.0) and [LICENSE-MIT](LICENSE-MIT) for details.
150
+
See [LICENSE-APACHE2.0](LICENSE-APACHE2.0) and [LICENSE-MIT](LICENSE-MIT) for details.
151
+
152
+
## Community
153
+
154
+
Join the Nomos community on [Discord](https://discord.gg/8Q7Q7vz) and follow us
155
+
on [Twitter](https://twitter.com/nomos_tech).
156
+
157
+
For more information, visit [nomos.tech](https://nomos.tech/?utm_source=chatgpt.com).
0 commit comments