Skip to content

Commit 42829e2

Browse files
authored
Merge pull request #66 from OpenZeppelin/update-relayer-docs
Update relayer docs
2 parents f2cbf59 + 3bb5b3d commit 42829e2

File tree

11 files changed

+2595
-40
lines changed

11 files changed

+2595
-40
lines changed

content/relayer/1.1.x/plugins/channels.mdx

Lines changed: 621 additions & 0 deletions
Large diffs are not rendered by default.
File renamed without changes.

content/relayer/1.1.x/plugins/launchtube.mdx

Lines changed: 499 additions & 0 deletions
Large diffs are not rendered by default.

content/relayer/configuration/index.mdx

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The OpenZeppelin Relayer supports two configuration approaches:
2121
- Changes take effect immediately (no container restart required)
2222
- See the ***API Reference*** page for detailed endpoints documentation
2323

24-
See [Storage Configuration](/relayer/configuration/storage) for detailed information about how file-based and API-based configurations work together, storage behavior, and best practices.
24+
See [Storage Configuration](./configuration/storage) for detailed information about how file-based and API-based configurations work together, storage behavior, and best practices.
2525

2626
For quick setup examples with pre-configured files, see the [examples directory](https://github.com/OpenZeppelin/openzeppelin-relayer/tree/main/examples) in our GitHub repository.
2727

@@ -42,12 +42,12 @@ This table lists the environment variables and their default values.
4242
| Environment Variable | Default Value | Accepted Values | Description |
4343
| --- | --- | --- | --- |
4444
| `RUST_LOG` | `info` | `info, debug, warn, error, trace` | Log level. |
45-
| `REPOSITORY_STORAGE_TYPE` | `in-memory` | `in-memory, redis` | Type of storage used for storing repository config and resources. See [Storage Configuration](/relayer/configuration/storage) for detailed information. |
46-
| `RESET_STORAGE_ON_START` | `false` | `bool` | Clears all resources from storage on startup and reloads entries from the config file. See [Storage Configuration](/relayer/configuration/storage) for usage details. |
47-
| `TRANSACTION_EXPIRATION_HOURS` | `4` | `number` | Number of hours after which transactions in a final state are removed from storage. See [Storage Configuration](/relayer/configuration/storage) for more information. |
45+
| `REPOSITORY_STORAGE_TYPE` | `in-memory` | `in-memory, redis` | Type of storage used for storing repository config and resources. See [Storage Configuration](./configuration/storage) for detailed information. |
46+
| `RESET_STORAGE_ON_START` | `false` | `bool` | Clears all resources from storage on startup and reloads entries from the config file. See [Storage Configuration](./configuration/storage) for usage details. |
47+
| `TRANSACTION_EXPIRATION_HOURS` | `4` | `number` | Number of hours after which transactions in a final state are removed from storage. See [Storage Configuration](./configuration/storage) for more information. |
4848
| `CONFIG_DIR` | `./config` | `<any relative file path where config.json is located>` | Relative path of directory where config files reside |
4949
| `CONFIG_FILE_NAME` | `config.json` | `<any file name>` | File Name of the configuration file. |
50-
| `RATE_LIMIT_RPS` | `100` | `<any value>` | Rate limit for the API in requests per second. |
50+
| `RATE_LIMIT_REQUESTS_PER_SECOND` | `100` | `<any value>` | Rate limit for the API in requests per second. |
5151
| `RATE_LIMIT_BURST_SIZE` | `300` | `<any value>` | Rate limit burst size. |
5252
| `API_KEY` | `` | `string`, | API key to use for authentication to the relayer server. Minimum length 32 characters. |
5353
| `WEBHOOK_SIGNING_KEY` | `` | `string` | Signing key to use for webhook notifications. Minimum length 32 characters. |
@@ -56,17 +56,26 @@ This table lists the environment variables and their default values.
5656
| `LOG_MAX_SIZE (in bytes)` | `1073741824` | `<any value in bytes>` | Size after which logs needs to be rolled. |
5757
| `METRICS_ENABLED` | `false` | `bool` | Enable metrics server for external tools to scrape metrics. |
5858
| `METRICS_PORT` | `8081` | `<any tcp port (preferably choose non-privileged ports i.e. (1024-65535))>` | Port to use for metrics server. |
59-
| `REDIS_URL` | `redis://localhost:6379` | `<redis connection string>` | Redis connection URL for the relayer. See [Storage Configuration](/relayer/configuration/storage) for Redis setup details. |
60-
| `REDIS_CONNECTION_TIMEOUT_MS` | `10000` | `<timeout in milliseconds>` | Connection timeout for Redis in milliseconds. See [Storage Configuration](/relayer/configuration/storage) for Redis configuration. |
61-
| `REDIS_KEY_PREFIX` | `oz-relayer` | `string` | Redis key prefix for namespacing. See [Storage Configuration](/relayer/configuration/storage) for more information. |
62-
| `STORAGE_ENCRYPTION_KEY` | `` | `string` | Encryption key used to encrypt data at rest in Redis storage. See [Storage Configuration](/relayer/configuration/storage) for security details. |
59+
| `REDIS_URL` | `redis://localhost:6379` | `<redis connection string>` | Redis connection URL for the relayer. See [Storage Configuration](./configuration/storage) for Redis setup details. |
60+
| `REDIS_CONNECTION_TIMEOUT_MS` | `10000` | `<timeout in milliseconds>` | Connection timeout for Redis in milliseconds. See [Storage Configuration](./configuration/storage) for Redis configuration. |
61+
| `REDIS_KEY_PREFIX` | `oz-relayer` | `string` | Redis key prefix for namespacing. See [Storage Configuration](./configuration/storage) for more information. |
62+
| `STORAGE_ENCRYPTION_KEY` | `` | `string` | Encryption key used to encrypt data at rest in Redis storage. See [Storage Configuration](./configuration/storage) for security details. |
6363
| `RPC_TIMEOUT_MS` | `10000` | `<timeout in milliseconds>` | Sets the maximum time to wait for RPC connections before timing out. |
6464
| `PROVIDER_MAX_RETRIES` | `3` | `<number of retries>` | Maximum number of retry attempts for provider operations. |
6565
| `PROVIDER_RETRY_BASE_DELAY_MS` | `100` | `<delay in milliseconds>` | Base delay between retry attempts in milliseconds. |
6666
| `PROVIDER_RETRY_MAX_DELAY_MS` | `2000` | `<delay in milliseconds>` | Maximum delay between retry attempts in milliseconds. |
6767
| `PROVIDER_MAX_FAILOVERS` | `3` | `<number of failovers>` | Maximum number of failovers (switching to different providers). |
6868
| `ENABLE_SWAGGER` | `false` | `true, false` | Enable or disable Swagger UI for API documentation. |
6969
| `KEYSTORE_PASSPHRASE` | `` | `<keystore passphrase>` | Passphrase for the keystore file used for signing transactions. |
70+
| `BACKGROUND_WORKER_TRANSACTION_REQUEST_CONCURRENCY` | `50` | `<any positive number>` | Maximum number of concurrent transaction request jobs that can be processed simultaneously. |
71+
| `BACKGROUND_WORKER_TRANSACTION_SENDER_CONCURRENCY` | `75` | `<any positive number>` | Maximum number of concurrent transaction submission jobs that can be processed simultaneously. |
72+
| `BACKGROUND_WORKER_TRANSACTION_STATUS_CHECKER_CONCURRENCY` | `50` | `<any positive number>` | Maximum number of concurrent generic/default transaction status check jobs that can be processed simultaneously. This worker handles Solana and any future networks that don’t have dedicated status checkers. |
73+
| `BACKGROUND_WORKER_TRANSACTION_STATUS_CHECKER_EVM_CONCURRENCY` | `100` | `<any positive number>` | Maximum number of concurrent EVM transaction status check invocations that can be processed simultaneously. EVM handles the highest volume (~75% of all status checks) and uses optimized retries (8-20s) to avoid triggering premature resubmission. |
74+
| `BACKGROUND_WORKER_TRANSACTION_STATUS_CHECKER_STELLAR_CONCURRENCY` | `50` | `<any positive number>` | Maximum number of concurrent Stellar transaction status checks that can be processed simultaneously. Stellar status checker uses fast retries (2-3s) optimized for Stellar’s faster block times. |
75+
| `BACKGROUND_WORKER_NOTIFICATION_SENDER_CONCURRENCY` | `30` | `<any positive number>` | Maximum number of concurrent notifications that can be processed simultaneously. |
76+
| `BACKGROUND_WORKER_SOLANA_TOKEN_SWAP_REQUEST_CONCURRENCY` | `10` | `<any positive number>` | Maximum number of concurrent Solana token swap requests that can be processed simultaneously. Low volume worker. |
77+
| `BACKGROUND_WORKER_TRANSACTION_CLEANUP_CONCURRENCY` | `1` | `<any positive number>` | Maximum number of concurrent transaction cleanup invocations that can be processed simultaneously. Defaults to 1 to avoid database conflicts. |
78+
| `BACKGROUND_WORKER_RELAYER_HEALTH_CHECK_CONCURRENCY` | `10` | `<any positive number>` | Maximum number of concurrent relayer health check invocations that can be processed simultaneously. Low volume worker. |
7079

7180
### Environment configuration example
7281

@@ -78,7 +87,7 @@ CONFIG_DIR=./config
7887
CONFIG_FILE_NAME=config.json
7988
WEBHOOK_SIGNING_KEY=e1d42480-6f74-4d0b-85f4-b7f0bb690fae
8089
API_KEY=5eefd216-0e44-4ca7-b421-2925f90d30d5
81-
RATE_LIMIT_RPS=100
90+
RATE_LIMIT_REQUESTS_PER_SECOND=100
8291
RATE_LIMIT_BURST_SIZE=300
8392
METRICS_ENABLED=true
8493
METRICS_PORT=8081
@@ -130,7 +139,7 @@ For comprehensive details on configuring all supported signer types including:
130139
* CDP signers
131140
* Security best practices and troubleshooting
132141

133-
See the dedicated [Signers Configuration](/relayer/configuration/signers) guide.
142+
See the dedicated [Signers Configuration](./configuration/signers) guide.
134143

135144

136145

@@ -218,16 +227,16 @@ Available configuration fields
218227
| network_type | String | Type of network the relayer will connect to (`evm`, `solana`) |
219228
| network | String | Network the relayer will connect to. Must match a network identifier defined in your network configuration files. See [Network Configuration](/relayer/network_configuration) for details on defining networks. |
220229
| custom_rpc_urls | list | Optional custom RPC URLs for the network. If provided, this will be used instead of the public RPC URLs. This is useful for using your own RPC node or a paid service provider. The first url of the list is going to be used as the default |
221-
| policies | list | Overrides default policies. Please refer to the [`Policies`](/relayer/configuration#network-policies) table |
230+
| policies | list | Overrides default policies. Please refer to the [`Policies`](./configuration#network-policies) table |
222231

223232
<a name="network_policies"></a>Policies
224233
| Network type | Policy | Type | Description |
225234
| --- | --- | --- | --- |
226-
| solana, evm | min_balance | unsigned 128 | Minimum balance (in lamports or wei) required for the relayer to operate. Optional. |
227-
| solana | fee_payment_strategy | enum(user,relayer) | Specifies who pays the fee. "user" (default) means the sender pays; "relayer" means the relayer pays. For "user", RPC methods add an instruction to transfer SPL tokens (calculated from the current SOL price plus a configurable margin) from the user to the relayer, ensuring fees are sustainably covered in tokens rather than SOL. |
228-
| solana | swap_config | SwapConfig | Optional object configuring automated token‐swaps on Solana. |
229-
| solana | fee_margin_percentage | f32 | Additional margin percentage added to estimated transaction fees to account for price fluctuations. For example, a value of 10 will add 10% to estimated fees. Optional. |
230-
| solana | max_allowed_fee_lamports | unsigned 64 | Maximum allowed fee (in lamports) for a transaction. Optional. |
235+
| solana, evm | min_balance | `unsigned 128` | Minimum balance (in lamports or wei) required for the relayer to operate. Optional. |
236+
| solana | fee_payment_strategy | `enum(user,relayer)` | Specifies who pays the fee. "user" (default) means the sender pays; "relayer" means the relayer pays. For "user", RPC methods add an instruction to transfer SPL tokens (calculated from the current SOL price plus a configurable margin) from the user to the relayer, ensuring fees are sustainably covered in tokens rather than SOL. |
237+
| solana | swap_config | `SwapConfig` | Optional object configuring automated token‐swaps on Solana. |
238+
| solana | fee_margin_percentage | `f32` | Additional margin percentage added to estimated transaction fees to account for price fluctuations. For example, a value of 10 will add 10% to estimated fees. Optional. |
239+
| solana | max_allowed_fee_lamports | `unsigned 64` | Maximum allowed fee (in lamports) for a transaction. Optional. |
231240
| solana | allowed_tokens | `Vector<AllowedToken>` | List of allowed tokens. Only these tokens are supported if provided. Optional. |
232241
| solana | allowed_programs | `Vector<String>` | List of allowed programs by their identifiers. Only these programs are supported if provided. |
233242
| solana | allowed_accounts | `Vector<String>` | List of allowed accounts by their public keys. The relayer will only operate with these accounts if provided. |
@@ -527,6 +536,6 @@ The OpenZeppelin Relayer supports two complementary approaches for configuration
527536
<Callout>
528537

529538

530-
See [Storage Configuration](/relayer/configuration/storage) for detailed information about how file-based and API-based configurations work together, storage behavior, and best practices.
539+
See [Storage Configuration](./configuration/storage) for detailed information about how file-based and API-based configurations work together, storage behavior, and best practices.
531540

532541
</Callout>

0 commit comments

Comments
 (0)