Skip to content

Commit 213d461

Browse files
authored
chore: Update readme file (#302)
* chore: Update readme file * chore: Fixing mermaid diagram * chore: Fixing mermaid diagram styles * chore: Mermaid styles * chore: Mermaid styles colors * chore: Delete alpha stage message * chore: Minor fix for msrv
1 parent 2fc84b5 commit 213d461

File tree

2 files changed

+132
-105
lines changed

2 files changed

+132
-105
lines changed

README.md

Lines changed: 132 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,32 @@
66
[![CI](https://github.com/OpenZeppelin/openzeppelin-monitor/actions/workflows/ci.yaml/badge.svg)](https://github.com/OpenZeppelin/openzeppelin-monitor/actions/workflows/ci.yaml)
77
[![Release Workflow](https://github.com/OpenZeppelin/openzeppelin-monitor/actions/workflows/release-please.yml/badge.svg)](https://github.com/OpenZeppelin/openzeppelin-monitor/actions/workflows/release-please.yml)
88

9-
10-
> :warning: This software is in alpha. Use in production environments at your own risk.
11-
129
In the rapidly evolving world of blockchain technology, effective monitoring is crucial for ensuring security and performance. OpenZeppelin Monitor is a blockchain monitoring service that watches for specific on-chain activities and triggers notifications based on configurable conditions. The service offers multi-chain support with configurable monitoring schedules, flexible trigger conditions, and an extensible architecture for adding new chains.
1310

1411
[Install](https://docs.openzeppelin.com/monitor#getting_started) | [User Docs](https://docs.openzeppelin.com/monitor) | [Quickstart](https://docs.openzeppelin.com/monitor/quickstart) | [Crate Docs](https://docs.openzeppelin.com/monitor/rust_docs/doc/openzeppelin_monitor/)
1512

1613
## Features
1714

18-
- Multi-chain support
19-
- Configurable monitoring schedules
20-
- Flexible trigger conditions
21-
- Extensible architecture for adding new chains
15+
- **Real-time Monitoring**: Watch blockchain networks in real-time for specific events and transactions
16+
- **Smart Filtering**: Use flexible expressions to define exactly what you want to monitor
17+
- **Multi-notification Support**: Send alerts via Slack, Discord, Email, Telegram, Webhooks, or custom scripts
18+
- **Configurable Scheduling**: Set custom monitoring schedules using cron expressions
19+
- **Data Persistence**: Store monitoring data and resume from checkpoints
20+
- **Extensible Architecture**: Easy to add support for new blockchains and notification types
2221

2322
## Supported Networks
2423

25-
- EVM
26-
- Stellar
24+
- **EVM-Compatible Networks**
25+
- **Stellar**
2726

28-
## Supported Triggers
27+
## Notification Channels
2928

30-
- Slack notifications
31-
- Email notifications
32-
- Discord notifications
33-
- Telegram notifications
34-
- Webhook notifications
35-
- Script notifications
29+
- **Slack** - Send formatted messages to Slack channels
30+
- **Discord** - Post alerts to Discord channels via webhooks
31+
- **Email** - Send email notifications with SMTP support
32+
- **Telegram** - Send messages to Telegram chats via bot API
33+
- **Webhooks** - Send HTTP requests to custom endpoints
34+
- **Custom Scripts** - Execute Python, JavaScript, or Bash scripts
3635

3736
## For Users
3837

@@ -53,83 +52,79 @@ View the [Usage](https://docs.openzeppelin.com/monitor#running_the_monitor) docu
5352
The following diagram illustrates the architecture of the monitoring service, highlighting key components and their interactions.
5453

5554
```mermaid
56-
%%{init: {
57-
'theme': 'base',
58-
'themeVariables': {
59-
'background': '#ffffff',
60-
'mainBkg': '#ffffff',
61-
'primaryBorderColor': '#cccccc'
62-
}
63-
}}%%
6455
graph TD
65-
subgraph Blockchain Networks
66-
ETH[Ethereum RPC]
67-
POL[Polygon RPC]
68-
BSC[BSC RPC]
69-
end
56+
subgraph Entry Point
57+
MAIN[main.rs]
58+
end
7059
71-
subgraph Block Processing
72-
BW[BlockWatcherService]
73-
BS[(BlockStorage)]
74-
JS[JobScheduler]
60+
subgraph Bootstrap
61+
BOOTSTRAP[Bootstrap::initialize_service]
7562
end
7663
77-
subgraph Client Layer
78-
BC[BlockchainClient]
79-
EVM[EVMClient]
80-
STL[StellarClient]
64+
subgraph Block Processing
65+
BT[BlockTracker]
66+
BS[BlockStorage]
67+
BWS[BlockWatcherService]
68+
BH[create_block_handler]
8169
end
8270
83-
subgraph Processing Pipeline
84-
FS[FilterService]
71+
subgraph Core Services
72+
MS[MonitorService]
73+
NS[NetworkService]
8574
TS[TriggerService]
86-
NS[NotificationService]
75+
FS[FilterService]
76+
TES[TriggerExecutionService]
77+
NOTS[NotificationService]
8778
end
8879
89-
subgraph Notifications
90-
Slack
91-
Email
92-
Discord
93-
Telegram
94-
Webhook
95-
Script
80+
subgraph Client Layer
81+
CP[ClientPool]
82+
EVMC[EVMClient]
83+
SC[StellarClient]
9684
end
9785
98-
%% Block Processing Flow
99-
JS -->|Schedule Block Fetch| BW
100-
BW -->|Store Last Block| BS
101-
BW -->|Read Last Block| BS
102-
BW -->|Get New Blocks| BC
103-
104-
%% Client Connections
105-
BC --> EVM
106-
BC --> STL
107-
EVM -->|RPC Calls| ETH
108-
EVM -->|RPC Calls| POL
109-
EVM -->|RPC Calls| BSC
110-
111-
%% Processing Flow
112-
BW -->|New Block| FS
113-
FS -->|Matches| TS
114-
TS -->|Execute| NS
115-
NS --> Slack
116-
NS --> Email
117-
NS --> Discord
118-
NS --> Telegram
119-
NS --> Webhook
120-
NS --> Script
121-
122-
style STL fill:#f0f0f0
123-
124-
classDef rpc fill:#e1f5fe,stroke:#01579b
125-
classDef storage fill:#fff3e0,stroke:#ef6c00
126-
classDef service fill:#e8f5e9,stroke:#2e7d32
127-
classDef notification fill:#f3e5f5,stroke:#7b1fa2
128-
129-
class ETH,POL,BSC rpc
130-
class BS storage
131-
class BW,FS,TS,NS service
132-
class Slack,Email,Discord,Telegram,Webhook,Script notification
86+
%% Initialization Flow
87+
MAIN --> BOOTSTRAP
88+
BOOTSTRAP --> CP
89+
BOOTSTRAP --> NS
90+
BOOTSTRAP --> MS
91+
BOOTSTRAP --> TS
92+
BOOTSTRAP --> FS
93+
BOOTSTRAP --> TES
94+
BOOTSTRAP --> NOTS
95+
96+
%% Block Processing Setup
97+
BOOTSTRAP --> BT
98+
BOOTSTRAP --> BS
99+
BOOTSTRAP --> BWS
100+
BOOTSTRAP --> BH
101+
102+
%% Client Dependencies
103+
CP --> EVMC
104+
CP --> SC
105+
BWS --> CP
106+
107+
%% Service Dependencies
108+
BWS --> BS
109+
BWS --> BT
110+
MS --> NS
111+
MS --> TS
112+
FS --> TES
113+
TES --> NOTS
114+
115+
%% Block Handler Connection
116+
BH --> FS
117+
BWS --> BH
118+
119+
style MAIN fill:#e1f5fe,stroke:#01579b,color:#333333
120+
style BOOTSTRAP fill:#fff3e0,stroke:#ef6c00,color:#333333
121+
classDef blockProcessing fill:#e8f5e9,stroke:#2e7d32,color:#333333
122+
classDef coreServices fill:#f3e5f5,stroke:#7b1fa2,color:#333333
123+
classDef clients fill:#fce4ec,stroke:#c2185b,color:#333333
124+
125+
class BT,BS,BWS,BH blockProcessing
126+
class MS,NS,TS,FS,TES,NOTS coreServices
127+
class CP,EVMC,SC clients
133128
```
134129

135130
### Project Structure
@@ -153,24 +148,47 @@ openzeppelin-monitor/
153148
└── ... other root files (Cargo.toml, README.md, etc.)
154149
```
155150

156-
### Setup
151+
### Development Environment Setup
152+
153+
#### Prerequisites
157154

158-
To get started, run the following commands to install pre-commit hooks:
155+
- **Rust MSRV: 1.86** or later
156+
- **Git** for version control
157+
- **Python/pip** for pre-commit hooks
159158

160-
- Install pre-commit hooks:
159+
#### Initial Setup
161160

162-
```bash
163-
pip install pre-commit
164-
pre-commit install --install-hooks -t commit-msg -t pre-commit -t pre-push
165-
```
161+
```bash
162+
# Clone the repository
163+
git clone https://github.com/openzeppelin/openzeppelin-monitor
164+
cd openzeppelin-monitor
165+
166+
# Build the project
167+
cargo build
166168

167-
> :warning: If you encounter issues with pip, consider using [pipx](https://pipx.pypa.io/stable/installation/) for a global installation.
169+
# Set up environment variables
170+
cp .env.example .env
171+
```
168172

169-
- Install the toolchain:
173+
#### Install Pre-commit Hooks
170174

171-
```bash
172-
rustup component add rustfmt
173-
```
175+
**Required for code quality checks** including `rustfmt`, `clippy`, and commit message validation.
176+
177+
```bash
178+
# Install pre-commit (use pipx for global installation if preferred)
179+
pip install pre-commit
180+
181+
# Install and configure hooks for commit-msg, pre-commit, and pre-push
182+
pre-commit install --install-hooks -t commit-msg -t pre-commit -t pre-push
183+
```
184+
185+
> :warning: If you encounter issues with pip, consider using [pipx](https://pipx.pypa.io/stable/installation/) for a global installation.
186+
187+
#### Install Rust Toolchain Components
188+
189+
```bash
190+
rustup component add rustfmt
191+
```
174192

175193
### Run Tests
176194

@@ -219,19 +237,28 @@ RUST_TEST_THREADS=1 cargo +stable llvm-cov
219237

220238
## Contributing
221239

222-
We welcome contributions from the community! Here's how you can get involved:
240+
We welcome contributions from the community! Before contributing, please note these requirements:
241+
242+
### Key Requirements
243+
244+
- **Contributor License Agreement (CLA)**: All contributors must sign the CLA before contributing
245+
- **GPG-signed commits**: All commits must be GPG-signed for security
246+
- **Pre-commit hooks**: Required for code quality checks including `rustfmt`, `clippy`, and commit message validation
247+
248+
### Getting Started
223249

224250
1. Fork the repository
225-
2. Create your feature branch
226-
3. Commit your changes
227-
4. Push to the branch
228-
5. Create a Pull Request
251+
2. Clone your fork and set up development environment
252+
3. Install pre-commit hooks
253+
4. Create your feature branch
254+
5. Make your changes with proper testing
255+
6. Submit a Pull Request
229256

230257
If you are looking for a good place to start, find a good first issue [here](https://github.com/openzeppelin/openzeppelin-monitor/issues?q=is%3Aissue%20is%3Aopen%20label%3Agood-first-issue).
231258

232259
You can open an issue for a [bug report](https://github.com/openzeppelin/openzeppelin-monitor/issues/new?assignees=&labels=T-bug%2CS-needs-triage&projects=&template=bug.yml), [feature request](https://github.com/openzeppelin/openzeppelin-monitor/issues/new?assignees=&labels=T-feature%2CS-needs-triage&projects=&template=feature.yml), or [documentation request](https://github.com/openzeppelin/openzeppelin-monitor/issues/new?assignees=&labels=T-documentation%2CS-needs-triage&projects=&template=docs.yml).
233260

234-
You can find more details in our [Contributing](CONTRIBUTING.md) guide.
261+
For complete details including GitHub workflow, labeling guidelines, and advanced topics, see our [Contributing](CONTRIBUTING.md) guide.
235262

236263
Please read our [Code of Conduct](CODE_OF_CONDUCT.md) and check the [Security Policy](SECURITY.md) for reporting vulnerabilities.
237264

@@ -247,10 +274,12 @@ For security concerns, please refer to our [Security Policy](SECURITY.md).
247274

248275
If you have any questions, first see if the answer to your question can be found in the [User Documentation](https://docs.openzeppelin.com/monitor).
249276

250-
If the answer is not there:
277+
### Community Support
251278

252-
- Join the [Telegram](https://t.me/openzeppelin_tg/4) to get help, or
253-
- Open an issue with [the bug](https://github.com/openzeppelin/openzeppelin-monitor/issues/new?assignees=&labels=T-bug%2CS-needs-triage&projects=&template=bug.yml)
279+
- **Telegram**: [Join our community chat](https://t.me/openzeppelin_tg/4) for help and discussions
280+
- **GitHub Issues**: Open a [bug report](https://github.com/openzeppelin/openzeppelin-monitor/issues/new?assignees=&labels=T-bug%2CS-needs-triage&projects=&template=bug.yml) or [feature request](https://github.com/openzeppelin/openzeppelin-monitor/issues/new?assignees=&labels=T-feature%2CS-needs-triage&projects=&template=feature.yml)
281+
- **Good First Issues**: [Find beginner-friendly issues](https://github.com/openzeppelin/openzeppelin-monitor/issues?q=is%3Aissue+is%3Aopen+label%3Agood-first-issue)
282+
- **GitHub Discussions**: For questions and community interaction
254283

255284
We encourage you to reach out with any questions or feedback.
256285

docs/modules/ROOT/pages/index.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
= OpenZeppelin Monitor
44
:description: User guide for setting up and configuring OpenZeppelin Monitor
55

6-
CAUTION: This software is in alpha stage. Use in production environments at your own risk.
7-
86
== Overview
97

108
In the rapidly evolving world of blockchain technology, effective monitoring is crucial for ensuring security and performance. OpenZeppelin Monitor is a blockchain monitoring service that watches for specific on-chain activities and triggers notifications based on configurable conditions. The service offers multi-chain support with configurable monitoring schedules, flexible trigger conditions, and an extensible architecture for adding new chains.

0 commit comments

Comments
 (0)