diff --git a/docs/developers/quickstart/info-contracts.mdx b/docs/developers/quickstart/info-contracts.mdx index b5567a5f6..c2214d310 100644 --- a/docs/developers/quickstart/info-contracts.mdx +++ b/docs/developers/quickstart/info-contracts.mdx @@ -65,9 +65,9 @@ import TabItem from "@theme/TabItem"; ## Connect with node providers -If your dapp is using public endpoints, it may encounter rate limiting. You can find Linea node providers [here](/developers/tooling/node-providers.md). +If your dapp is using public endpoints, it may encounter rate limiting. You can find Linea node providers [here](/developers/tooling/node-providers). -We recommend connecting to Linea via [private RPCs](/developers/tooling/node-providers.md). +We recommend connecting to Linea via [private RPCs](/developers/tooling/node-providers#private-rpc-endpoints). ## Deployed contracts diff --git a/docs/developers/tooling/node-providers/_category_.json b/docs/developers/tooling/node-providers/_category_.json new file mode 100644 index 000000000..bf65e86de --- /dev/null +++ b/docs/developers/tooling/node-providers/_category_.json @@ -0,0 +1,3 @@ +{ + "label": "Node Providers" +} \ No newline at end of file diff --git a/docs/developers/tooling/node-providers/erpc.md b/docs/developers/tooling/node-providers/erpc.md new file mode 100644 index 000000000..72b8ddb82 --- /dev/null +++ b/docs/developers/tooling/node-providers/erpc.md @@ -0,0 +1,75 @@ +--- +title: eRPC +image: /img/socialCards/linea-rpc-proxy-and-caching.jpg +--- + +# Linea RPC Proxy and Caching + +[eRPC](https://erpc.cloud/) is a fault-tolerant EVM RPC proxy and re-org aware permanent caching solution. It is built with read-heavy use-cases in mind such as data indexing and high-load frontend usage. + +- [Github](https://github.com/erpc/erpc) +- [Docs](https://docs.erpc.cloud/) +- [Telegram](https://t.me/erpc_cloud) + +![Architecture](https://github.com/erpc/erpc/raw/main/assets/hla-diagram.svg) + +
+ +# Quickstart + +1. Create your [`erpc.yaml`](https://docs.erpc.cloud/config/example) configuration file: + +```yaml filename="erpc.yaml" +logLevel: debug +projects: + - id: main + upstreams: + # You don't need to define architecture (e.g. evm) or chain id (e.g. 59144) + # as they will be detected automatically by eRPC. + - endpoint: https://linea-mainnet.blastapi.io/xxxx + - endpoint: evm+alchemy://xxxx-my-alchemy-api-key-xxxx +``` + +See [a complete config example](https://docs.erpc.cloud/config/example) for inspiration. + +2. Use the Docker image: + +```bash +docker run -v $(pwd)/erpc.yaml:/root/erpc.yaml -p 4000:4000 -p 4001:4001 ghcr.io/erpc/erpc:latest +``` + +3. Send your first request: + +```bash +curl --location 'http://localhost:4000/main/evm/59144' \ +--header 'Content-Type: application/json' \ +--data '{ + "method": "eth_getBlockByNumber", + "params": [ + "0x7340c3", + false + ], + "id": 9199, + "jsonrpc": "2.0" +}' +``` + +4. Bring up monitoring stack (Prometheus, Grafana) using docker-compose: + +```bash +# clone the repo if you haven't +git clone https://github.com/erpc/erpc.git +cd erpc + +# bring up the monitoring stack +docker-compose up -d +``` + +5. Open Grafana at [http://localhost:3000](http://localhost:3000) and login with the following credentials: + +- username: `admin` +- password: `admin` + +6. Send more requests and watch the metrics being collected and visualized in Grafana. + +![eRPC Grafana Dashboard](https://docs.erpc.cloud/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fmonitoring-example-erpc.2cb040a1.png&w=3840&q=75) diff --git a/docs/developers/tooling/node-providers.md b/docs/developers/tooling/node-providers/index.mdx similarity index 97% rename from docs/developers/tooling/node-providers.md rename to docs/developers/tooling/node-providers/index.mdx index 88a7ce526..fbff0fdc4 100644 --- a/docs/developers/tooling/node-providers.md +++ b/docs/developers/tooling/node-providers/index.mdx @@ -23,6 +23,9 @@ image: /img/socialCards/node-providers.jpg - [One-click deploy with Mintair](https://mintair.xyz/) - [One-click deploy with RapidNode](https://rapidnode.xyz) +## Use RPC proxy and caching +- [eRPC](./erpc.md) + ## Public RPC endpoints :::caution diff --git a/project-words.txt b/project-words.txt index c61f162e8..60fe924fd 100644 --- a/project-words.txt +++ b/project-words.txt @@ -232,6 +232,7 @@ entrypoints envio envr epochlength +erpc errnametoolong esbenp esbuild @@ -257,6 +258,7 @@ execa Extc externalwaiting failfast +failovers fallocate Farcaster FAUCETME diff --git a/sidebars.js b/sidebars.js index e07bc44ee..2b46e5110 100644 --- a/sidebars.js +++ b/sidebars.js @@ -262,7 +262,7 @@ const sidebars = { }, { type: "category", - label: "Contracts templates", + label: "Contract templates", link: { type: "doc", id: "developers/tooling/contracts-templates/index", @@ -347,6 +347,17 @@ const sidebars = { "developers/tooling/libraries/wallet-connect", ], }, + { + type: "category", + label: "Node providers", + link: { + type: "doc", + id: "developers/tooling/node-providers/index", + }, + items: [ + "developers/tooling/node-providers/erpc", + ], + }, { type: "category", label: "Oracles", @@ -417,7 +428,6 @@ const sidebars = { "developers/tooling/social-login/openfort", ], }, - "developers/tooling/node-providers", ], }, { diff --git a/static/img/socialCards/linea-rpc-proxy-and-caching.jpg b/static/img/socialCards/linea-rpc-proxy-and-caching.jpg new file mode 100644 index 000000000..bcb430531 Binary files /dev/null and b/static/img/socialCards/linea-rpc-proxy-and-caching.jpg differ