Skip to content

Commit

Permalink
Edit README.md testing section (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeny-stakewise authored Sep 11, 2024
1 parent ce8983e commit 90ef5fe
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ OBOL_KEYSTORES_DIR=validator_keys
# Template string. Variable 'node_index' should be used in template.
# node_index is 0-based
# If both OBOL_KEYSTORES_DIR and OBOL_KEYSTORES_DIR_TEMPLATE are present then OBOL_KEYSTORES_DIR_TEMPLATE has priority
# OBOL_KEYSTORES_DIR_TEMPLATE=keystores/{node_index}
# OBOL_KEYSTORES_DIR_TEMPLATE=node{node_index}/validator_keys

# Obol cluster lock file path
OBOL_CLUSTER_LOCK_FILE=cluster-lock.json
Expand Down
35 changes: 32 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,39 @@ DVT sidecar:

## Testing

This section is about integration testing, when sidecar works in conjunction with DVT Relayer and Stakewise Operator.

Running the whole cluster of DVT sidecars locally may be cumbersome.
For testing purpose single sidecar may work on behalf of several DVT operators.
To do that you have to fill `SHARE_INDEXES` in sidecar's environment. For example:
So there are 2 ways to initialize environment: one for production and another one for testing.

Example of production setup for Obol:

```ini
OBOL_KEYSTORES_DIR_TEMPLATE=node0/validator_keys
OBOL_NODE_INDEX=0
```

In testing setup you can parametrize keystores path so that single sidecar will be using multiple keystores:

```ini
OBOL_KEYSTORES_DIR_TEMPLATE=node{node_index}/validator_keys
OBOL_NODE_INDEXES=0,1,2,3
```

Example of production setup for SSV:

```ini
SSV_OPERATOR_KEY_FILE=encrypted_private_key.json
SSV_OPERATOR_PASSWORD_FILE=password.txt
SSV_OPERATOR_ID=123
```

In testing setup you can parametrize SSV operator key path.
So that sidecar will be acting on behalf of multiple SSV operators.

```text
SHARE_INDEXES=1,2,3,4
```ini
SSV_OPERATOR_KEY_FILE_TEMPLATE=operator-{operator_id}/encrypted_private_key.json
SSV_OPERATOR_PASSWORD_FILE_TEMPLATE=operator-{operator_id}/password.txt
SSV_OPERATOR_IDS=123,456
```

0 comments on commit 90ef5fe

Please sign in to comment.