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
For full list, check out (primitives/src/util/tests/prep_db.rs#L29-L43)[./primitives/src/util/tests/prep_db.rs#L29-L43]
39
82
40
-
* With the DummyAdapter(replace the `DummyIdentity`):
83
+
#### Environment variables:
41
84
42
-
`export PORT=8006; cargo run -p sentry -- -a dummy -i DummyIdentity`
85
+
- `ENV`: `production` or `development` - pass this env. variable if you want to use the default configuration paths - [`docs/config/dev.toml`](./docs/config/dev.toml) (for development) or [`docs/config/prod.toml`](./docs/config/prod.toml) (for production)
86
+
- `PORT`
87
+
- `KEYSTORE_PWD`
88
+
- `POSTGRES_DB`
43
89
44
-
* With the EthereumAdapter:
90
+
### Running the Validator Worker
45
91
46
-
TODO
92
+
For a full list of all available CLI options on the Validator worker run `--help`:
47
93
48
-
### Bug
94
+
```bash
95
+
cargo run -p validator_worker -- --help
96
+
```
49
97
98
+
#### Using the `Ethereum Adapter`:
99
+
TODO: Update Keystore file and Keystore password for Leader/Follower as they are using the same at the moment.
50
100
101
+
The password for the Keystore file can be set using the environment variable `KEYSTORE_PWD`.
51
102
103
+
- Leader
104
+
Assuming you have [Sentry API running](#running-sentry-rest-api) for the **Leader** on port `8005`:
We use [cargo-make](https://github.com/sagiegurari/cargo-make) for running the checks and build project locally
60
-
as well as on CI. For a complete list of out-of-the-box commands you can check
137
+
We use [`cargo-make`](https://github.com/sagiegurari/cargo-make#overview) for running automated checks (tests, builds, formatting, code linting, etc.) and building the project locally
138
+
as well as on our Continuous Integration (CI). For a complete list of out-of-the-box commands you can check
Locally it's enough to ensure that `cargo make` command (it will execute the default dev. command) is passing.
64
-
It will run `rustfmt` for you, it will fail on `clippy` warnings and it will run all the tests.
141
+
### Local development
65
142
66
-
*Note:* You need to have setup Redis and Postgres as well.
143
+
Locally it's enough to ensure that the default development command is executing successfully:
144
+
145
+
```bash
146
+
cargo make
147
+
```
148
+
149
+
It will run `rustfmt` for you as well as `clippy` (it will fail on warnings) and it will run all the tests thanks to `cargo` (doc tests, unit tests, integration tests, etc.).
150
+
151
+
This will also run the [Automated tests](#automated-tests), so you must have `Redis` & `Postgres` running.
152
+
153
+
#### Automated tests
154
+
155
+
This requires [`cargo-make`](https://github.com/sagiegurari/cargo-make#overview) and since we have integration tests that require `Redis` ([see `Running Redis`](#running-redis)) & `Postgres` (see [`Running Postgres`](#running-postgres)), you need to be running those in order to run the automated tests:
156
+
157
+
`cargo make test`
67
158
68
-
You can related to the [Makefile.stable.toml](https://github.com/sagiegurari/cargo-make/blob/master/src/lib/Makefile.stable.toml)
159
+
You can relate to the [`Makefile.stable.toml`](https://github.com/sagiegurari/cargo-make/blob/master/src/lib/Makefile.stable.toml)
0 commit comments