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
|[`basic-example`](./examples/basic-example/)| Simple setup with Redis |
56
+
|[`redis-storage`](./examples/redis-storage/)| Simple setup with Redis for storage |
56
57
|[`basic-example-logging`](./examples/basic-example-logging/)| Configuration with file-based logging |
57
58
|[`basic-example-metrics`](./examples/basic-example-metrics/)| Setup with Prometheus and Grafana metrics |
58
-
|[`vault-secret-signer`](./examples/vault-secret-signer/)| Using HashiCorp Vault for key management |
59
-
|[`vault-transit-signer`](./examples/vault-transit-signer/)| Using Vault Transit for secure signing |
60
-
|[`evm-turnkey-signer`](./examples/evm-turnkey-signer/)| Using Turnkey Signer for EVM secure signing |
59
+
|[`vault-secret-signer`](./examples/vault-secret-signer/)| Using HashiCorp Vault for key management |
60
+
|[`vault-transit-signer`](./examples/vault-transit-signer/)| Using Vault Transit for secure signing |
61
+
|[`evm-turnkey-signer`](./examples/evm-turnkey-signer/)| Using Turnkey Signer for EVM secure signing |
61
62
|[`solana-turnkey-signer`](./examples/solana-turnkey-signer/)| Using Turnkey Signer for Solana secure signing |
62
63
|[`solana-google-cloud-kms-signer`](./examples/solana-google-cloud-kms-signer/)| Using Google Cloud KMS Signer for Solana secure signing |
63
64
|[`network-configuration-config-file`](./examples/network-configuration-config-file/)| Using Custom network configuration via config file |
@@ -286,6 +287,8 @@ Create `.env` with correct values according to your needs from `.env.example` fi
286
287
cp .env.example .env
287
288
```
288
289
290
+
> **Note**: After the service is running, all configuration components (relayers, signers, notifications) can also be managed via REST API endpoints for runtime changes. See the [Configuration Guide](https://docs.openzeppelin.com/relayer/configuration) for details on API-based configuration management.
291
+
289
292
### Creating a Signer
290
293
291
294
To create a new signer keystore, use the provided key generation tool:
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/configuration.adoc
+84-15Lines changed: 84 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,18 @@ Please ensure appropriate access permissions on all configuration files (for `./
8
8
9
9
[IMPORTANT]
10
10
====
11
-
The configuration system consists of two main components:
11
+
The OpenZeppelin Relayer supports two configuration approaches:
12
12
13
+
**File-based Configuration:**
13
14
1. **`config.json`**: Contains relayer definitions, signer configurations, and network policies
14
15
2. **`.env`** file: Contains environment variables like API keys and connection strings
15
16
16
-
Both files must be properly configured before starting the application. Changes to either file require restarting the container to take effect.
17
+
**API-based Configuration:**
18
+
- Full CRUD operations for relayers, signers, and notifications via REST API
19
+
- Changes take effect immediately (no container restart required)
20
+
- See the **API Reference** page for detailed endpoints documentation
21
+
22
+
See xref:storage.adoc[Storage Configuration] for detailed information about how file-based and API-based configurations work together, storage behavior, and best practices.
17
23
18
24
For quick setup examples with pre-configured files, see the https://github.com/OpenZeppelin/openzeppelin-relayer/tree/main/examples[examples directory] in our GitHub repository.
19
25
====
@@ -40,6 +46,21 @@ This table lists the environment variables and their default values.
40
46
| `info, debug, warn, error, trace`
41
47
| Log level.
42
48
49
+
| `REPOSITORY_STORAGE_TYPE`
50
+
| `in-memory`
51
+
| `in-memory, redis`
52
+
| Type of storage used for storing repository config and resources. See xref:storage.adoc[Storage Configuration] for detailed information.
53
+
54
+
| `RESET_STORAGE_ON_START`
55
+
| `false`
56
+
| `bool`
57
+
| Clears all resources from storage on startup and reloads entries from the config file. See xref:storage.adoc[Storage Configuration] for usage details.
58
+
59
+
| `TRANSACTION_EXPIRATION_HOURS`
60
+
| `4`
61
+
| `number`
62
+
| Number of hours after which transactions in a final state are removed from storage. See xref:storage.adoc[Storage Configuration] for more information.
63
+
43
64
| `CONFIG_DIR`
44
65
| `./config`
45
66
| `<any relative file path where config.json is located>`
@@ -98,18 +119,22 @@ This table lists the environment variables and their default values.
98
119
| `REDIS_URL`
99
120
| `redis://localhost:6379`
100
121
| `<redis connection string>`
101
-
| Redis connection URL for the relayer.
122
+
| Redis connection URL for the relayer. See xref:storage.adoc[Storage Configuration] for Redis setup details.
102
123
103
124
| `REDIS_CONNECTION_TIMEOUT_MS`
104
125
| `10000`
105
126
| `<timeout in milliseconds>`
106
-
| Connection timeout for Redis in milliseconds.
127
+
| Connection timeout for Redis in milliseconds. See xref:storage.adoc[Storage Configuration] for Redis configuration.
107
128
108
129
| `REDIS_KEY_PREFIX`
109
130
| `oz-relayer`
110
131
| `string`
111
-
| Redis key prefix
132
+
| Redis key prefix for namespacing. See xref:storage.adoc[Storage Configuration] for more information.
112
133
134
+
| `STORAGE_ENCRYPTION_KEY`
135
+
| ``
136
+
| `string`
137
+
| Encryption key used to encrypt data at rest in Redis storage. See xref:storage.adoc[Storage Configuration] for security details.
This file can exist in any directory, but the default location is `./config/config.json`.
181
210
182
-
Copy the example config file and update values according to your needs
183
-
184
-
[source,bash]
185
-
----
186
-
cp config/config.example.json config/config.json
187
-
----
211
+
[NOTE]
212
+
====
213
+
All components defined in `config.json` can also be managed via REST API endpoints. This provides runtime flexibility for adding, updating, or removing relayers, signers, and notifications without restarting the service. See the **API Reference** page for detailed endpoints documentation.
214
+
====
188
215
189
216
Key sections in this file include:
190
217
@@ -196,22 +223,28 @@ Key sections in this file include:
196
223
197
224
=== 1. Signers
198
225
199
-
Transaction signers are responsible for cryptographically signing transactions before they are submitted to blockchain networks. The `signers` array must contain at least one valid signer configuration.
226
+
Transaction signers are responsible for cryptographically signing transactions before they are submitted to blockchain networks.
200
227
201
228
For comprehensive details on configuring all supported signer types including:
202
229
203
230
- Local keystore file signers
204
-
- HashiCorp Vault (secret, cloud, and transit)
231
+
- HashiCorp Vault (secret and transit)
205
232
- Cloud KMS providers (Google Cloud, AWS)
206
233
- Turnkey signers
207
234
- Security best practices and troubleshooting
208
235
209
236
See the dedicated xref:signers.adoc[Signers Configuration] guide.
210
237
238
+
[TIP]
239
+
====
240
+
Signers can also be managed via API endpoints.
241
+
242
+
See the **API Reference** page for detailed endpoints documentation.
243
+
====
211
244
212
245
=== 2. Notifications
213
246
214
-
* `notifications` array, which should contain, at least, one valid configuration:
@@ -253,9 +286,16 @@ Available configuration fields
253
286
|Signing key value, env variable name, ...
254
287
|===
255
288
289
+
[TIP]
290
+
====
291
+
Notifications can also be managed via API endpoints.
292
+
293
+
See the **API Reference** page for detailed endpoints documentation.
294
+
====
295
+
256
296
=== 3. Relayers
257
297
258
-
* `relayers` array, containing at least one valid relayer configuration:
298
+
* `relayers` array, containing relayer entries:
259
299
260
300
[source,json]
261
301
----
@@ -469,6 +509,14 @@ When using custom RPC URLs:
469
509
* If a weight is not specified for an endpoint, it defaults to 100.
470
510
====
471
511
512
+
[TIP]
513
+
====
514
+
Relayers could also be managed via API endpoints.
515
+
516
+
See the **API Reference** page for detailed endpoints documentation.
517
+
====
518
+
519
+
472
520
=== 4. Plugins
473
521
474
522
For more information on how to write a plugin, please refer to the xref:plugins.adoc[Plugins] page.
@@ -684,3 +732,24 @@ Full `config/config.json` example with evm and solana relayers definitions using
684
732
]
685
733
}
686
734
----
735
+
736
+
== Configuration Management Approaches
737
+
738
+
The OpenZeppelin Relayer supports two complementary approaches for configuration management:
739
+
740
+
=== File-based Configuration
741
+
- Ideal for initial setup and deployment
742
+
- Configuration persists across restarts
743
+
- Requires container restart for changes to take effect
744
+
- Suitable for infrastructure-as-code workflows
745
+
746
+
=== API-based Configuration
747
+
- Enables runtime configuration changes
748
+
- No service restarts required
749
+
- Perfect for dynamic environments
750
+
- Supports automated configuration management
751
+
752
+
[NOTE]
753
+
====
754
+
See xref:storage.adoc[Storage Configuration] for detailed information about how file-based and API-based configurations work together, storage behavior, and best practices.
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/index.adoc
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -231,6 +231,7 @@ For quick setup with various configurations, check the https://github.com/OpenZe
231
231
* `evm-gcp-kms-signer`: Using Google Cloud KMS for EVM secure signing
232
232
* `evm-turnkey-signer`: Using Turnkey for EVM secure signing
233
233
* `solana-turnkey-signer`: Using Turnkey for Solana secure signing
234
+
* `redis-storage`: Using Redis for Storage
234
235
* `network-configuration-config-file`: Using Custom network configuration via config file
235
236
* `network-configuration-json-file`: Using Custom network configuration via JSON file
236
237
@@ -311,14 +312,22 @@ DOCKERFILE=Dockerfile.production docker compose up -d
311
312
312
313
== Configuration
313
314
314
-
OpenZeppelin Relayer requires proper configuration before starting. The configuration system uses two main files:
315
+
OpenZeppelin Relayer supports two configuration approaches:
315
316
317
+
**File-based Configuration:**
316
318
- **`config.json`**: Contains relayer definitions, signer configurations, and network policies
317
319
- **`.env`**: Contains environment variables like API keys and connection strings
318
320
321
+
**API-based Configuration:**
322
+
- Runtime configuration management via REST API
323
+
- No service restarts required for configuration changes
324
+
- Full CRUD operations for relayers, signers, and notifications
325
+
319
326
[IMPORTANT]
320
327
====
321
-
Both configuration files must be properly set up before starting the application. Changes to either file require restarting the container to take effect.
328
+
Both approaches can be used together. File-based configuration is loaded on startup, while API changes provide runtime flexibility. Changes to environment variables (`.env`) always require restarting the container.
329
+
330
+
When used together, API changes are not synced to file-based configuration. File-based configuration is loaded only once when using persistent storage mode.
322
331
323
332
For quick setup examples with pre-configured files, see the https://github.com/OpenZeppelin/openzeppelin-relayer/tree/main/examples[examples directory] in our GitHub repository.
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/signers.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
6
6
Signers are responsible for cryptographically signing transactions before they are submitted to blockchain networks. OpenZeppelin Relayer supports multiple signer types to accommodate different security requirements and infrastructure setups.
7
7
8
-
The `signers` array in your configuration must contain at least one valid signer configuration. Each signer is referenced by its `id` in relayer configurations.
8
+
Each signer is referenced by its `id` in relayer configurations.
0 commit comments