Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rauljordan/engine-proxy
Proxy middleware server for Ethereum clients' engine API request/responses via JSON-RPC
https://github.com/rauljordan/engine-proxy
Last synced: 8 days ago
JSON representation
Proxy middleware server for Ethereum clients' engine API request/responses via JSON-RPC
- Host: GitHub
- URL: https://github.com/rauljordan/engine-proxy
- Owner: rauljordan
- License: mit
- Created: 2022-05-04T03:41:10.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-16T22:00:57.000Z (over 1 year ago)
- Last Synced: 2024-06-19T00:22:57.260Z (5 months ago)
- Language: Go
- Size: 87.9 KB
- Stars: 4
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ethereum Engine API Proxy
## Installation
- Go 1.18 installed
```
go install github.com/rauljordan/engine-proxy@latest
```## Usage
Launches a proxy middleware server for spoofing engine API calls between Ethereum consensus and execution clients via JSON-RPC. Allows for customizing in-flight responses using custom triggers.
Listens on localhost:8546 by default, so point a consensus client to http://localhost:8546 to see it in action. With default settings, it will just serve as a passthrough proxy to an execution client, so normal operations will be unaffected.
Supports passing in a -spoofing-config file path to a YAML file with the following format:
```yaml
requests:
- method: engine_newPayloadV1
fields:
parentHash: "0x0000000000000000000000000000000000000000000000000000000000000000"
responses:
- method: engine_exchangeTransitionConfigurationV1
fields:
terminalBlockHash: "0x0000000000000000000000000000000000000000000000000000000000000000"
```Specifying which fields of requests and/or responses to engine API calls we want to modify. **NOTE**: nested fields are not yet supported.
**Flags**
- --eth-rpc-endpoint string: execution client endpoint (default: "http://127.0.0.1:8545")
- --host string: host for the HTTP proxy server (default: "127.0.0.1")
- --port int: port for the HTTP proxy server (default: 8546)
- --spoofing-config string: path to a YAML file containing a spoofing config
- --jwt-secret string: path to file containing a JWT secret hex-string used for authentication via HTTP. WORK IN PROGRESS## Developing
Github actions run tests, lint, and building. Ensure your code is formatted with gofmt and goimports before submitting a pull request. Tests can be run with:
```
go test ./... -v
```## License
MIT