-
Notifications
You must be signed in to change notification settings - Fork 268
[DOCS] Add information about proxyd #857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
9e4b2a5
Create chain operators section
richardgreg b177886
Add overview of proxyd
richardgreg 54a0c69
fix liniting issues
krofax 8236d5f
Update pages/stack/operators/features/proxyd.mdx
krofax 508cbdc
updated contents
krofax cc37459
Breakdown caching and metrics into sections.
richardgreg 96811a1
Update pages/stack/operators/features/proxyd.mdx
krofax b963009
Update pages/stack/operators/features/proxyd.mdx
krofax 282241d
Update pages/stack/operators/features/proxyd.mdx
krofax d1c1e71
Update pages/stack/operators/features/proxyd.mdx
krofax 64ab48e
fix liniting issues
krofax 896671d
Added new line
krofax 145c504
introduced next steps
krofax File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"features": "Features" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"proxyd": "proxyd" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
title: proxyd | ||
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. | ||
|
||
## Key Features | ||
|
||
* 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 | ||
|
||
## How it works | ||
|
||
To start using `proxyd`, follow these steps: | ||
|
||
<Steps> | ||
### **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. | ||
|
||
### **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. | ||
|
||
### **Start the Service**: | ||
|
||
Once the configuration file is ready, start the `proxyd` service using the following command: | ||
|
||
```bash | ||
proxyd <path-to-config.toml> | ||
``` | ||
</Steps> | ||
|
||
## 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: | ||
|
||
* 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 | ||
|
||
## 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. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.