From 9e4b2a5eb1f73078a8117c5c5d1ee36dc70e0c8e Mon Sep 17 00:00:00 2001 From: Richard Gregory Date: Mon, 26 Aug 2024 13:09:47 +0100 Subject: [PATCH 01/12] Create chain operators section --- pages/stack/_meta.json | 3 ++- pages/stack/operators/_meta.json | 3 +++ pages/stack/operators/features/_meta.json | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 pages/stack/operators/_meta.json create mode 100644 pages/stack/operators/features/_meta.json diff --git a/pages/stack/_meta.json b/pages/stack/_meta.json index 917de8768..a56d9ee02 100644 --- a/pages/stack/_meta.json +++ b/pages/stack/_meta.json @@ -7,5 +7,6 @@ "design-principles": "Design Philosophy & Principles", "protocol": "Protocol", "transactions": "Transactions", - "security": "Security" + "security": "Security", + "operators": "Operators" } diff --git a/pages/stack/operators/_meta.json b/pages/stack/operators/_meta.json new file mode 100644 index 000000000..274405469 --- /dev/null +++ b/pages/stack/operators/_meta.json @@ -0,0 +1,3 @@ +{ + "features": "Features" +} \ No newline at end of file diff --git a/pages/stack/operators/features/_meta.json b/pages/stack/operators/features/_meta.json new file mode 100644 index 000000000..91f5e9e5c --- /dev/null +++ b/pages/stack/operators/features/_meta.json @@ -0,0 +1,3 @@ +{ + "proxyd": "proxyd" +} \ No newline at end of file From b177886947260ddc81aa09c0c9db02ce3dcc3792 Mon Sep 17 00:00:00 2001 From: Richard Gregory Date: Mon, 26 Aug 2024 13:24:24 +0100 Subject: [PATCH 02/12] Add overview of proxyd --- pages/stack/operators/features/proxyd.mdx | 48 +++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 pages/stack/operators/features/proxyd.mdx diff --git a/pages/stack/operators/features/proxyd.mdx b/pages/stack/operators/features/proxyd.mdx new file mode 100644 index 000000000..90e62a723 --- /dev/null +++ b/pages/stack/operators/features/proxyd.mdx @@ -0,0 +1,48 @@ +--- +title: proxyd +lang: en-US +description: Learn about the proxyd service and how to configure it for use in the OP Stack. +--- + +# proxyd + +`proxyd` is a critical RPC request router and proxy used within the OP Stack infrastructure. It enables operators to efficiently route and manage RPC requests across multiple backend services, ensuring performance, fault tolerance, and security. + +## Key Features + +* **RPC Method Whitelisting**: Define a list of allowed RPC methods to ensure only authorized requests are processed. +* **Backend Request Routing**: Routes RPC methods to specific backend service groups. +* **Automatic Retries**: Automatically retries failed backend requests, improving reliability. +* **Consensus Tracking**: Monitors backend consensus states, such as latest, safe, and finalized blocks, to ensure consistent responses. +* **Request/Response Rewriting**: Enforces consensus by rewriting requests and responses to match the resolved consensus state. +* **Load Balancing**: Distributes traffic evenly across backend services to optimize performance and prevent bottlenecks. +* **Caching**: Caches immutable responses from backends to reduce redundant processing. +* **Metrics**: Provides metrics for tracking request latency, error rates, and backend health. + +## Usage + +To start using `proxyd`, follow these steps: + +1. **Build the Binary**: + ```bash + make proxyd + ``` +This will build the proxyd binary. No additional dependencies are required. + +2. Configure `proxyd`: Create a configuration file to define your proxy backends and routing rules. Refer to [example.config.toml](https://github.com/ethereum-optimism/infra/blob/main/proxyd/example.config.toml) for a full list of options with commentary. + +3. Start the Service: Once the configuration file is ready, start the proxyd service using: +``` +proxyd .toml +``` + +## Consensus Awareness +Starting with version 4.0.0, `proxyd` includes consensus awareness to minimize chain reorganizations for clients. By setting `consensus_aware` to true in the configuration, `proxyd` will: + +* Poll backends for consensus data (latest block, safe block, peer count, etc.). +* Resolve a consensus group based on the healthiest backends. +* Enforce consensus state across client requests. + +## Caching and Metrics +* **Cacheable Methods:** Certain immutable methods, such as `eth_chainId` and `eth_getBlockByHash`, can be cached using Redis to optimize performance. +* **Metrics:** Extensive metrics are available to monitor request latency, error rates, backend health, and more. These can be configured via `metrics.port` and `metrics.host` in the configuration file. From 54a0c69f4e95ea644c9778a9ce104b66e03a8cb7 Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Mon, 26 Aug 2024 20:31:46 +0100 Subject: [PATCH 03/12] fix liniting issues --- pages/stack/operators/features/proxyd.mdx | 36 +++++++++++++---------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/pages/stack/operators/features/proxyd.mdx b/pages/stack/operators/features/proxyd.mdx index 90e62a723..4531b815d 100644 --- a/pages/stack/operators/features/proxyd.mdx +++ b/pages/stack/operators/features/proxyd.mdx @@ -10,39 +10,43 @@ description: Learn about the proxyd service and how to configure it for use in t ## Key Features -* **RPC Method Whitelisting**: Define a list of allowed RPC methods to ensure only authorized requests are processed. -* **Backend Request Routing**: Routes RPC methods to specific backend service groups. -* **Automatic Retries**: Automatically retries failed backend requests, improving reliability. -* **Consensus Tracking**: Monitors backend consensus states, such as latest, safe, and finalized blocks, to ensure consistent responses. -* **Request/Response Rewriting**: Enforces consensus by rewriting requests and responses to match the resolved consensus state. -* **Load Balancing**: Distributes traffic evenly across backend services to optimize performance and prevent bottlenecks. -* **Caching**: Caches immutable responses from backends to reduce redundant processing. -* **Metrics**: Provides metrics for tracking request latency, error rates, and backend health. +* **RPC Method Whitelisting**: Define a list of allowed RPC methods to ensure only authorized requests are processed. +* **Backend Request Routing**: Routes RPC methods to specific backend service groups. +* **Automatic Retries**: Automatically retries failed backend requests, improving reliability. +* **Consensus Tracking**: Monitors backend consensus states, such as latest, safe, and finalized blocks, to ensure consistent responses. +* **Request/Response Rewriting**: Enforces consensus by rewriting requests and responses to match the resolved consensus state. +* **Load Balancing**: Distributes traffic evenly across backend services to optimize performance and prevent bottlenecks. +* **Caching**: Caches immutable responses from backends to reduce redundant processing. +* **Metrics**: Provides metrics for tracking request latency, error rates, and backend health. ## Usage To start using `proxyd`, follow these steps: -1. **Build the Binary**: +1. **Build the Binary**: ```bash make proxyd ``` + This will build the proxyd binary. No additional dependencies are required. -2. Configure `proxyd`: Create a configuration file to define your proxy backends and routing rules. Refer to [example.config.toml](https://github.com/ethereum-optimism/infra/blob/main/proxyd/example.config.toml) for a full list of options with commentary. +2. Configure `proxyd`: Create a configuration file to define your proxy backends and routing rules. Refer to [example.config.toml](https://github.com/ethereum-optimism/infra/blob/main/proxyd/example.config.toml) for a full list of options with commentary. + +3. Start the Service: Once the configuration file is ready, start the proxyd service using: -3. Start the Service: Once the configuration file is ready, start the proxyd service using: ``` proxyd .toml ``` ## Consensus Awareness + Starting with version 4.0.0, `proxyd` includes consensus awareness to minimize chain reorganizations for clients. By setting `consensus_aware` to true in the configuration, `proxyd` will: -* Poll backends for consensus data (latest block, safe block, peer count, etc.). -* Resolve a consensus group based on the healthiest backends. -* Enforce consensus state across client requests. +* Poll backends for consensus data (latest block, safe block, peer count, etc.). +* Resolve a consensus group based on the healthiest backends. +* Enforce consensus state across client requests. ## Caching and Metrics -* **Cacheable Methods:** Certain immutable methods, such as `eth_chainId` and `eth_getBlockByHash`, can be cached using Redis to optimize performance. -* **Metrics:** Extensive metrics are available to monitor request latency, error rates, backend health, and more. These can be configured via `metrics.port` and `metrics.host` in the configuration file. + +* **Cacheable Methods:** Certain immutable methods, such as `eth_chainId` and `eth_getBlockByHash`, can be cached using Redis to optimize performance. +* **Metrics:** Extensive metrics are available to monitor request latency, error rates, backend health, and more. These can be configured via `metrics.port` and `metrics.host` in the configuration file. From 8236d5f4809e9dd7263dc9286d688e313f03e705 Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Tue, 27 Aug 2024 12:17:24 +0100 Subject: [PATCH 04/12] Update pages/stack/operators/features/proxyd.mdx --- pages/stack/operators/features/proxyd.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/stack/operators/features/proxyd.mdx b/pages/stack/operators/features/proxyd.mdx index 4531b815d..1ba7a10c6 100644 --- a/pages/stack/operators/features/proxyd.mdx +++ b/pages/stack/operators/features/proxyd.mdx @@ -6,7 +6,7 @@ description: Learn about the proxyd service and how to configure it for use in t # proxyd -`proxyd` is a critical RPC request router and proxy used within the OP Stack infrastructure. It enables operators to efficiently route and manage RPC requests across multiple backend services, ensuring performance, fault tolerance, and security. +`proxyd` is an important RPC request router and proxy used within the OP Stack infrastructure. It enables operators to efficiently route and manage RPC requests across multiple backend services, ensuring performance, fault tolerance, and security. ## Key Features From 508cbdc691d0731874845c43d98327a541aa731e Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Tue, 27 Aug 2024 13:50:35 +0100 Subject: [PATCH 05/12] updated contents --- pages/stack/operators/features/proxyd.mdx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pages/stack/operators/features/proxyd.mdx b/pages/stack/operators/features/proxyd.mdx index 4531b815d..6e8a4b065 100644 --- a/pages/stack/operators/features/proxyd.mdx +++ b/pages/stack/operators/features/proxyd.mdx @@ -10,14 +10,15 @@ description: Learn about the proxyd service and how to configure it for use in t ## Key Features -* **RPC Method Whitelisting**: Define a list of allowed RPC methods to ensure only authorized requests are processed. -* **Backend Request Routing**: Routes RPC methods to specific backend service groups. -* **Automatic Retries**: Automatically retries failed backend requests, improving reliability. -* **Consensus Tracking**: Monitors backend consensus states, such as latest, safe, and finalized blocks, to ensure consistent responses. -* **Request/Response Rewriting**: Enforces consensus by rewriting requests and responses to match the resolved consensus state. -* **Load Balancing**: Distributes traffic evenly across backend services to optimize performance and prevent bottlenecks. -* **Caching**: Caches immutable responses from backends to reduce redundant processing. -* **Metrics**: Provides metrics for tracking request latency, error rates, and backend health. +* RPC method whitelisting +* Backend request routing +* Automatic retries for failed backend requests +* Consensus tracking (latest, safe, and finalized blocks) +* Request/response rewriting to enforce consensus +* Load balancing across backend services +* Caching of immutable responses +* Metrics for request latency, error rates, and backend health + ## Usage From cc37459c315c8ee8e2b201ce83c1432ab1bedd02 Mon Sep 17 00:00:00 2001 From: Richard Gregory Date: Wed, 28 Aug 2024 07:15:23 +0100 Subject: [PATCH 06/12] Breakdown caching and metrics into sections. --- pages/stack/operators/features/proxyd.mdx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pages/stack/operators/features/proxyd.mdx b/pages/stack/operators/features/proxyd.mdx index 1ba7a10c6..b89a8fc5e 100644 --- a/pages/stack/operators/features/proxyd.mdx +++ b/pages/stack/operators/features/proxyd.mdx @@ -48,5 +48,9 @@ Starting with version 4.0.0, `proxyd` includes consensus awareness to minimize c ## Caching and Metrics -* **Cacheable Methods:** Certain immutable methods, such as `eth_chainId` and `eth_getBlockByHash`, can be cached using Redis to optimize performance. -* **Metrics:** Extensive metrics are available to monitor request latency, error rates, backend health, and more. These can be configured via `metrics.port` and `metrics.host` in the configuration file. +### Cacheable Methods +Certain immutable methods, such as `eth_chainId` and `eth_getBlockByHash`, can be cached using Redis to optimize performance. + +### Metrics + Extensive metrics are available to monitor request latency, error rates, backend health, and more. These can be configured via `metrics.port` and `metrics.host` in the configuration file. + \ No newline at end of file From 96811a15c684a3a61709fcff91d7ec8da5cf5260 Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Wed, 28 Aug 2024 18:31:47 +0100 Subject: [PATCH 07/12] Update pages/stack/operators/features/proxyd.mdx --- pages/stack/operators/features/proxyd.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/stack/operators/features/proxyd.mdx b/pages/stack/operators/features/proxyd.mdx index b89a8fc5e..bb4df5f92 100644 --- a/pages/stack/operators/features/proxyd.mdx +++ b/pages/stack/operators/features/proxyd.mdx @@ -43,7 +43,7 @@ proxyd .toml Starting with version 4.0.0, `proxyd` includes consensus awareness to minimize chain reorganizations for clients. By setting `consensus_aware` to true in the configuration, `proxyd` will: * Poll backends for consensus data (latest block, safe block, peer count, etc.). -* Resolve a consensus group based on the healthiest backends. +* Resolving consensus groups based on healthiest backends * Enforce consensus state across client requests. ## Caching and Metrics From b963009827dfec8802cec8289199e1e42b4364af Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Wed, 28 Aug 2024 18:31:53 +0100 Subject: [PATCH 08/12] Update pages/stack/operators/features/proxyd.mdx --- pages/stack/operators/features/proxyd.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/stack/operators/features/proxyd.mdx b/pages/stack/operators/features/proxyd.mdx index bb4df5f92..3c15955ac 100644 --- a/pages/stack/operators/features/proxyd.mdx +++ b/pages/stack/operators/features/proxyd.mdx @@ -42,7 +42,7 @@ proxyd .toml Starting with version 4.0.0, `proxyd` includes consensus awareness to minimize chain reorganizations for clients. By setting `consensus_aware` to true in the configuration, `proxyd` will: -* Poll backends for consensus data (latest block, safe block, peer count, etc.). +* Polling backends for consensus data (latest block, safe block, peer count, etc.). * Resolving consensus groups based on healthiest backends * Enforce consensus state across client requests. From 282241d64ed2cc9726b335bb6e0f7a9de9c8bc7d Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Wed, 28 Aug 2024 18:32:46 +0100 Subject: [PATCH 09/12] Update pages/stack/operators/features/proxyd.mdx --- pages/stack/operators/features/proxyd.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/stack/operators/features/proxyd.mdx b/pages/stack/operators/features/proxyd.mdx index 3c15955ac..ee88fad3b 100644 --- a/pages/stack/operators/features/proxyd.mdx +++ b/pages/stack/operators/features/proxyd.mdx @@ -44,7 +44,7 @@ Starting with version 4.0.0, `proxyd` includes consensus awareness to minimize c * Polling backends for consensus data (latest block, safe block, peer count, etc.). * Resolving consensus groups based on healthiest backends -* Enforce consensus state across client requests. +* Enforcing consensus state across client requests ## Caching and Metrics From d1c1e717ae80564658da0e97fca40e0ab1e0e2e5 Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Wed, 28 Aug 2024 18:33:20 +0100 Subject: [PATCH 10/12] Update pages/stack/operators/features/proxyd.mdx --- pages/stack/operators/features/proxyd.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pages/stack/operators/features/proxyd.mdx b/pages/stack/operators/features/proxyd.mdx index ee88fad3b..7e6b18035 100644 --- a/pages/stack/operators/features/proxyd.mdx +++ b/pages/stack/operators/features/proxyd.mdx @@ -39,9 +39,7 @@ proxyd .toml ``` ## Consensus Awareness - -Starting with version 4.0.0, `proxyd` includes consensus awareness to minimize chain reorganizations for clients. By setting `consensus_aware` to true in the configuration, `proxyd` will: - +Version 4.0.0 and later include consensus awareness to minimize chain reorganizations. Set `consensus_aware` to `true` in the configuration to enable: * Polling backends for consensus data (latest block, safe block, peer count, etc.). * Resolving consensus groups based on healthiest backends * Enforcing consensus state across client requests From 896671d5e7f19dcb2cd7a663b72c2eee5802810d Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Thu, 29 Aug 2024 20:19:04 +0100 Subject: [PATCH 11/12] Added new line --- pages/stack/operators/features/proxyd.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/stack/operators/features/proxyd.mdx b/pages/stack/operators/features/proxyd.mdx index d6f3a283e..daa5f28cb 100644 --- a/pages/stack/operators/features/proxyd.mdx +++ b/pages/stack/operators/features/proxyd.mdx @@ -51,5 +51,5 @@ Version 4.0.0 and later include consensus awareness to minimize chain reorganiza Certain immutable methods, such as `eth_chainId` and `eth_getBlockByHash`, can be cached using Redis to optimize performance. ### Metrics - Extensive metrics are available to monitor request latency, error rates, backend health, and more. These can be configured via `metrics.port` and `metrics.host` in the configuration file. - \ No newline at end of file +Extensive metrics are available to monitor request latency, error rates, backend health, and more. These can be configured via `metrics.port` and `metrics.host` in the configuration file. + From 145c504f5203dcff64b0e9c4c71cd066c2a8741c Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Thu, 29 Aug 2024 21:47:29 +0100 Subject: [PATCH 12/12] introduced next steps --- pages/stack/operators/features/proxyd.mdx | 48 +++++++++++++++++------ 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/pages/stack/operators/features/proxyd.mdx b/pages/stack/operators/features/proxyd.mdx index daa5f28cb..51476b581 100644 --- a/pages/stack/operators/features/proxyd.mdx +++ b/pages/stack/operators/features/proxyd.mdx @@ -4,6 +4,8 @@ lang: en-US description: Learn about the proxyd service and how to configure it for use in the OP Stack. --- +import { Steps } from 'nextra/components' + # proxyd `proxyd` is an important RPC request router and proxy used within the OP Stack infrastructure. It enables operators to efficiently route and manage RPC requests across multiple backend services, ensuring performance, fault tolerance, and security. @@ -19,28 +21,39 @@ description: Learn about the proxyd service and how to configure it for use in t * Caching of immutable responses * Metrics for request latency, error rates, and backend health - -## Usage +## How it works To start using `proxyd`, follow these steps: -1. **Build the Binary**: - ```bash - make proxyd - ``` + + ### **Build the Binary**: + + * Run the following command to build the `proxyd` binary: + ```bash + make proxyd + ``` + * This will build the `proxyd` binary. No additional dependencies are required. -This will build the proxyd binary. No additional dependencies are required. + ### **Configure `proxyd`**: -2. Configure `proxyd`: Create a configuration file to define your proxy backends and routing rules. Refer to [example.config.toml](https://github.com/ethereum-optimism/infra/blob/main/proxyd/example.config.toml) for a full list of options with commentary. + * Create a configuration file to define your proxy backends and routing rules. + * Refer to [example.config.toml](https://github.com/ethereum-optimism/infra/blob/main/proxyd/example.config.toml) for a full list of options with commentary. -3. Start the Service: Once the configuration file is ready, start the proxyd service using: + ### **Start the Service**: -``` -proxyd .toml -``` + Once the configuration file is ready, start the `proxyd` service using the following command: + + ```bash + proxyd + ``` + ## Consensus Awareness -Version 4.0.0 and later include consensus awareness to minimize chain reorganizations. Set `consensus_aware` to `true` in the configuration to enable: + +Version 4.0.0 and later include consensus awareness to minimize chain reorganizations. + +Set `consensus_aware` to `true` in the configuration to enable: + * Polling backends for consensus data (latest block, safe block, peer count, etc.). * Resolving consensus groups based on healthiest backends * Enforcing consensus state across client requests @@ -48,8 +61,17 @@ Version 4.0.0 and later include consensus awareness to minimize chain reorganiza ## Caching and Metrics ### Cacheable Methods + Certain immutable methods, such as `eth_chainId` and `eth_getBlockByHash`, can be cached using Redis to optimize performance. ### Metrics + Extensive metrics are available to monitor request latency, error rates, backend health, and more. These can be configured via `metrics.port` and `metrics.host` in the configuration file. +## Next Steps + +* Read about the [OP Stack chain architecture](/builders/chain-operators/architecture). +* Find out how you can support [snap sync](/builders/chain-operators/management/snap-sync). + on your chain. +* Find out how you can utilize [blob space](/builders/chain-operators/management/blobs) + to reduce the transaction fee cost on your chain.