Skip to content
Snippets Groups Projects
Commit c2d1e30b authored by Anthony GRAIGNIC's avatar Anthony GRAIGNIC
Browse files

Update README with updated components

parent 7b4a704f
No related branches found
No related tags found
1 merge request!3Change API to CLI
# Testnet injector
A simple HTTP API to inject transactions or behaviors in an EcoMobiCoin test network.
A CLI tool to inject transactions or behaviors in an EcoMobiCoin blockchain.
## Features
## Components
This project heavily use the forked and adapted [ethers-rs](https://gitlab.limos.fr/ecomobicoin/ethers-rs).
# Simulate tx & bx
### ETL
- Extract CSV file e.g. `dataset-extract.csv` to `MobilityRecord`
- Transform it with simulation params (relative time from earliest entry and behavior attributes)
- Load in local DB
### Sending Queue
## Usage
### Simulate tx & bx
To simulate Behaviors from a CSV Mobility dataset, run `cargo run simulate-bx-from-csv < data/dataset-extract.csv`
Options:
- dataset e.g. CSV file
- `total_simulation_duration` in seconds (or minutes ?)
### Send
Send tx or bx
Options:
- `time_period` in seconds
- `n` number e.g. 10
- `tx | bx | txbx` sending tx, bx or both
## Env vars
Copy the env example file to `.env` with the following command: `cp .env.example .env`
## Ecomobicoin Simulation
> WORK IN PROGRESS
```mermaid
flowchart LR
subgraph Configuration
A[CSV Dataset] --> B[Simulation config]
AA[Nodes & Miner config] --> B
AAA[Chainspec] --> B
end
subgraph S[Simulation]
subgraph D[Deployments]
B --> D1[Deploy nodes]
B --> D21[Deploy txbx CSV injector]
B --> D22[Deploy txbx injectors cli]
B --> D3[Deploy block explorer]
end
D --> E[Run]
end
subgraph R[Reporting]
E --> R1[Report]
end
```
## Development
### Auto-Reloading Development Server
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment