In this tutorial, you will set up and secure your own private Ethereum node on GetBlock, taking advantage of GetBlock’s plug-and-play infrastructure, 99.9 % uptime, and multi-chain support so you can focus on building rather than maintaining hardware. private Ethereum node By the end of this guide, you will have a dedicated, access-token-protected Ethereum JSON-RPC endpoint running on GetBlock that only your applications can use. We’ll cover the following: Creating a GetBlock account and generating an access token Provisioning a dedicated Ethereum node endpoint Securing the RPC endpoint with IP and token restrictions Connecting and testing the endpoint with Postman, Web3 libraries, and MetaMask Creating a GetBlock account and generating an access token Provisioning a dedicated Ethereum node endpoint Securing the RPC endpoint with IP and token restrictions Connecting and testing the endpoint with Postman, Web3 libraries, and MetaMask Prerequisites Before you start, make sure you have the following in place: GetBlock account – sign up on the GetBlock dashboard with an email, Google, or GitHub account, then verify your email to unlock the dashboard features. Set up GetBlock Account API access token – generate a personal or team access token in Dashboard → Access Tokens and copy it somewhere safe; every JSON-RPC request to your node will include this token. Authentication with Access Tokens Basic understanding of Ethereum RPC and blockchain interactions – you should feel comfortable with common JSON-RPC methods such as eth_blockNumber, eth_getBalance, and eth_sendRawTransaction. If you’re new to Ethereum RPC, skim the GetBlock Ethereum API reference before proceeding. GetBlock account – sign up on the GetBlock dashboard with an email, Google, or GitHub account, then verify your email to unlock the dashboard features. Set up GetBlock Account GetBlock account Set up GetBlock Account Set up GetBlock Account Set up GetBlock Account API access token – generate a personal or team access token in Dashboard → Access Tokens and copy it somewhere safe; every JSON-RPC request to your node will include this token. Authentication with Access Tokens API access token Dashboard → Access Tokens Authentication with Access Tokens Authentication with Access Tokens Authentication with Access Tokens Basic understanding of Ethereum RPC and blockchain interactions – you should feel comfortable with common JSON-RPC methods such as eth_blockNumber, eth_getBalance, and eth_sendRawTransaction. If you’re new to Ethereum RPC, skim the GetBlock Ethereum API reference before proceeding. Basic understanding of Ethereum RPC and blockchain interactions eth_blockNumber eth_getBalance eth_sendRawTransaction Step 1: Creating a Dedicated Ethereum Node Endpoint What is a dedicated node endpoint? A dedicated node endpoint is a private API URL that links to a single Ethereum full or archive node hosted by GetBlock. Since the hardware and bandwidth are reserved just for your project, you don't have to deal with slow-downs from other users or public-RPC rate limits. GetBlock provides 24/7 support for each dedicated node and promises 100% availability, offering the privacy of a self-hosted node without the hassle of managing it yourself. dedicated node endpoint 100% availability Key benefits Key benefits Isolation & reliability – exclusive resources and guaranteed uptime. Customisation – choose the node type, client implementation, and API interface that best fit your stack. Scalability – add unlimited access tokens or spin up additional dedicated nodes as traffic grows. Isolation & reliability – exclusive resources and guaranteed uptime. Isolation & reliability Customisation – choose the node type, client implementation, and API interface that best fit your stack. Customisation Scalability – add unlimited access tokens or spin up additional dedicated nodes as traffic grows. Scalability Step-by-step: create the endpoint Log in to the GetBlock Dashboard. In My Endpoints, click Add Endpoint. Log in to the GetBlock Dashboard. In My Endpoints, click Add Endpoint. Select Ethereum in the protocol list. Select Ethereum in the protocol list. Pick Mainnet or a testnet (e.g., Sepolia). Pick Mainnet or a testnet (e.g., Sepolia). Mainnet testnet Choose the required API interface (HTTP JSON-RPC, WebSocket, or GraphQL). Choose the required API interface (HTTP JSON-RPC, WebSocket, or GraphQL). API interface Click Get. GetBlock immediately issues an endpoint URL and a fresh access token, e.g. https://go.getblock.io/<ACCESS-TOKEN>/. Click Get. GetBlock immediately issues an endpoint URL and a fresh access token, e.g. https://go.getblock.io/<ACCESS-TOKEN>/. https://go.getblock.io/<ACCESS-TOKEN>/ You can repeat these steps to generate any number of tokens; each one is an independent, rate-limited channel to the same node. Configuration options When the wizard opens, fine-tune the node before checkout: Option Purpose Typical choice Node type Full keeps recent state; Archive stores every historical state for deep analytics. Full for dApps, Archive for explorers/analytics Node client Pick the Ethereum implementation you prefer (e.g., Geth, Erigon, Nethermind). Geth for broad compatibility API interface Enable JSON-RPC, WebSocket, or GraphQL endpoints. JSON-RPC + WebSocket to support subscriptions Option Purpose Typical choice Node type Full keeps recent state; Archive stores every historical state for deep analytics. Full for dApps, Archive for explorers/analytics Node client Pick the Ethereum implementation you prefer (e.g., Geth, Erigon, Nethermind). Geth for broad compatibility API interface Enable JSON-RPC, WebSocket, or GraphQL endpoints. JSON-RPC + WebSocket to support subscriptions Option Purpose Typical choice Option Option Purpose Purpose Typical choice Typical choice Node type Full keeps recent state; Archive stores every historical state for deep analytics. Full for dApps, Archive for explorers/analytics Node type Node type Node type Full keeps recent state; Archive stores every historical state for deep analytics. Full keeps recent state; Archive stores every historical state for deep analytics. Full Archive Full for dApps, Archive for explorers/analytics Full for dApps, Archive for explorers/analytics Full Archive Node client Pick the Ethereum implementation you prefer (e.g., Geth, Erigon, Nethermind). Geth for broad compatibility Node client Node client Node client Pick the Ethereum implementation you prefer (e.g., Geth, Erigon, Nethermind). Pick the Ethereum implementation you prefer (e.g., Geth, Erigon, Nethermind). Geth Erigon Nethermind Geth for broad compatibility Geth for broad compatibility Geth API interface Enable JSON-RPC, WebSocket, or GraphQL endpoints. JSON-RPC + WebSocket to support subscriptions API interface API interface API interface Enable JSON-RPC, WebSocket, or GraphQL endpoints. Enable JSON-RPC, WebSocket, or GraphQL endpoints. JSON-RPC WebSocket GraphQL JSON-RPC + WebSocket to support subscriptions JSON-RPC + WebSocket to support subscriptions After you confirm the settings and complete payment, GetBlock provisions the node (usually in a few minutes). The new dedicated endpoint will appear under Dashboard → My Endpoints—ready for the security hardening we’ll perform in the next step. Dashboard → My Endpoints Step 2 — Configuring the Ethereum Node Understanding GetBlock configuration files GetBlock lets you attach a small configuration file to every dedicated node. The file is read by the underlying Ethereum client (Geth, Erigon or Nethermind) when the service starts, so you can keep all runtime flags, RPC-module choices and storage options in one place instead of hard-coding them in your app. Because the file lives inside the node container—not in your codebase—it also prevents you from accidentally committing credentials or IP addresses to a public repo. configuration file Typical sections you can place in the file include: Category What you control Examples* Network Chain ID, sync mode, checkpoint, peers --syncmode=snap, --bootnodes=<enode…> RPC / APIs Enabled modules, HTTP/WS ports, host allow-list --http.api=eth,net,trace, --ws.origins=* Storage Pruning depth, database-cache size, archive mode --gcmode=archive, --cache=4096 Security CORS domains, JWT secrets, rate limits --authrpc.jwtsecret=/data/secret Logging / Tracing Verbosity, debug tracer, log file path --verbosity=3, --trace=/data/trace.json Category What you control Examples* Network Chain ID, sync mode, checkpoint, peers --syncmode=snap, --bootnodes=<enode…> RPC / APIs Enabled modules, HTTP/WS ports, host allow-list --http.api=eth,net,trace, --ws.origins=* Storage Pruning depth, database-cache size, archive mode --gcmode=archive, --cache=4096 Security CORS domains, JWT secrets, rate limits --authrpc.jwtsecret=/data/secret Logging / Tracing Verbosity, debug tracer, log file path --verbosity=3, --trace=/data/trace.json Category What you control Examples* Category Category What you control What you control Examples* Examples* Network Chain ID, sync mode, checkpoint, peers --syncmode=snap, --bootnodes=<enode…> Network Network Network Chain ID, sync mode, checkpoint, peers Chain ID, sync mode, checkpoint, peers --syncmode=snap, --bootnodes=<enode…> --syncmode=snap, --bootnodes=<enode…> --syncmode=snap --bootnodes=<enode…> RPC / APIs Enabled modules, HTTP/WS ports, host allow-list --http.api=eth,net,trace, --ws.origins=* RPC / APIs RPC / APIs RPC / APIs Enabled modules, HTTP/WS ports, host allow-list Enabled modules, HTTP/WS ports, host allow-list --http.api=eth,net,trace, --ws.origins=* --http.api=eth,net,trace, --ws.origins=* --http.api=eth,net,trace --ws.origins=* Storage Pruning depth, database-cache size, archive mode --gcmode=archive, --cache=4096 Storage Storage Storage Pruning depth, database-cache size, archive mode Pruning depth, database-cache size, archive mode --gcmode=archive, --cache=4096 --gcmode=archive, --cache=4096 --gcmode=archive --cache=4096 Security CORS domains, JWT secrets, rate limits --authrpc.jwtsecret=/data/secret Security Security Security CORS domains, JWT secrets, rate limits CORS domains, JWT secrets, rate limits --authrpc.jwtsecret=/data/secret --authrpc.jwtsecret=/data/secret --authrpc.jwtsecret=/data/secret Logging / Tracing Verbosity, debug tracer, log file path --verbosity=3, --trace=/data/trace.json Logging / Tracing Logging / Tracing Logging / Tracing Verbosity, debug tracer, log file path Verbosity, debug tracer, log file path --verbosity=3, --trace=/data/trace.json --verbosity=3, --trace=/data/trace.json --verbosity=3 --trace=/data/trace.json *Parameter names follow upstream Geth syntax; Erigon and Nethermind expose the same concepts under their own flags. Good to know: If you skip the file, GetBlock boots the node with its battle-tested defaults. Adding a config file is optional and you can update it at any time. The new file is applied after an automatic restart that usually finishes in a couple of minutes. Good to know: Good to know: If you skip the file, GetBlock boots the node with its battle-tested defaults. Adding a config file is optional and you can update it at any time. The new file is applied after an automatic restart that usually finishes in a couple of minutes. Uploading a custom configuration Open the node in the Dashboard Go to Dashboard → My Endpoints, click the dedicated Ethereum node you created in Step 1, and choose Settings. Select “Configuration file” A pane appears where you can either drag-and-drop a file (config.toml, config.json, or plain text) or paste the contents directly. Save & Restart Press Save and confirm. GetBlock queues a seamless restart; once the status badge switches back to Running, the new parameters are live. Verify Call a lightweight method such as eth_blockNumber. If you changed an RPC port or disabled a module, the call will fail—letting you catch mis-configurations before main-net usage. Open the node in the Dashboard Go to Dashboard → My Endpoints, click the dedicated Ethereum node you created in Step 1, and choose Settings. Open the node in the Dashboard Go to Dashboard → My Endpoints, click the dedicated Ethereum node you created in Step 1, and choose Settings. Open the node in the Dashboard Dashboard → My Endpoints Settings Select “Configuration file” A pane appears where you can either drag-and-drop a file (config.toml, config.json, or plain text) or paste the contents directly. Select “Configuration file” A pane appears where you can either drag-and-drop a file (config.toml, config.json, or plain text) or paste the contents directly. Select “Configuration file” config.toml config.json Save & Restart Press Save and confirm. GetBlock queues a seamless restart; once the status badge switches back to Running, the new parameters are live. Save & Restart Press Save and confirm. GetBlock queues a seamless restart; once the status badge switches back to Running, the new parameters are live. Save & Restart Save Running Verify Call a lightweight method such as eth_blockNumber. If you changed an RPC port or disabled a module, the call will fail—letting you catch mis-configurations before main-net usage. Verify Call a lightweight method such as eth_blockNumber. If you changed an RPC port or disabled a module, the call will fail—letting you catch mis-configurations before main-net usage. Verify eth_blockNumber With the configuration in place, your dedicated Ethereum node now matches your project’s performance and security requirements. In the next section we’ll lock the endpoint down even further by restricting who can reach the JSON-RPC interface. Step 3 — Securing Your RPC Endpoint Why RPC security matters An exposed JSON-RPC interface is an open door to your node’s compute quota and—if you allow eth_sendRawTransaction—to the network’s mempool. Abuse can run up your GetBlock consumption units (CUs), leak sensitive on-chain data, or let attackers front-run pending trades. Treat the endpoint URL like a password and lock it down before you move to production. eth_sendRawTransaction Configuring access control in the Dashboard Generate a token Navigate to Dashboard → Endpoint → Add Access Token → New Token. Give it a name (e.g., prod-backend) and copy the 64-char string to your password manager. Add an IP allow-list In the same dialog, expand Allowed IP addresses. Enter a comma-separated list such as 203.0.113.10,198.51.100.0/24. Click Save—the token will now reject requests from any other source. Harden the node itself (optional) Open Dashboard → My Endpoints → Settings and toggle off unused API interfaces (e.g., GraphQL). If you uploaded a custom config in Step 2, make sure only the necessary RPC modules are enabled (eth,net,web3 is a safe default). Generate a token Navigate to Dashboard → Endpoint → Add Access Token → New Token. Give it a name (e.g., prod-backend) and copy the 64-char string to your password manager. Generate a token Navigate to Dashboard → Endpoint → Add Access Token → New Token. Give it a name (e.g., prod-backend) and copy the 64-char string to your password manager. Navigate to Dashboard → Endpoint → Add Access Token → New Token. Dashboard → Endpoint → Add Access Token → New Token Give it a name (e.g., prod-backend) and copy the 64-char string to your password manager. prod-backend Add an IP allow-list In the same dialog, expand Allowed IP addresses. Enter a comma-separated list such as 203.0.113.10,198.51.100.0/24. Click Save—the token will now reject requests from any other source. Add an IP allow-list In the same dialog, expand Allowed IP addresses. Enter a comma-separated list such as 203.0.113.10,198.51.100.0/24. Click Save—the token will now reject requests from any other source. In the same dialog, expand Allowed IP addresses. Allowed IP addresses Enter a comma-separated list such as 203.0.113.10,198.51.100.0/24. 203.0.113.10,198.51.100.0/24 Click Save—the token will now reject requests from any other source. Save Harden the node itself (optional) Open Dashboard → My Endpoints → Settings and toggle off unused API interfaces (e.g., GraphQL). If you uploaded a custom config in Step 2, make sure only the necessary RPC modules are enabled (eth,net,web3 is a safe default). Harden the node itself (optional) Open Dashboard → My Endpoints → Settings and toggle off unused API interfaces (e.g., GraphQL). If you uploaded a custom config in Step 2, make sure only the necessary RPC modules are enabled (eth,net,web3 is a safe default). Open Dashboard → My Endpoints → Settings and toggle off unused API interfaces (e.g., GraphQL). Open Dashboard → My Endpoints → Settings and toggle off unused API interfaces (e.g., GraphQL). Dashboard → My Endpoints → Settings If you uploaded a custom config in Step 2, make sure only the necessary RPC modules are enabled (eth,net,web3 is a safe default). If you uploaded a custom config in Step 2, make sure only the necessary RPC modules are enabled (eth,net,web3 is a safe default). eth,net,web3 Tip: Need to expose the endpoint briefly for local testing? Create a temporary token with no IP filter, set an expiry date, and delete it when you’re done. Tip: Tip: Need to expose the endpoint briefly for local testing? Create a temporary token with no IP filter, set an expiry date, and delete it when you’re done. temporary token Verifying that the endpoint is locked down Run the following command in your terminal. Run the following command in your terminal. curl -X POST https://go.getblock.io/<TOKEN>/ -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' curl -X POST https://go.getblock.io/<TOKEN>/ -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' Expected Output: "result":"0xA1B2C3" "result":"0xA1B2C3" For a more systematic check, import GetBlock’s ready-made Postman Collection and run the Ping and eth_blockNumber requests under your restricted network. They should succeed; the same calls from an unlisted IP will fail. Postman Collection Ping eth_blockNumber Once your endpoint passes these tests, you’re protected against drive-by traffic and credential leaks—ready to move on to functional testing in the next step. Step 4 — Testing the RPC Connection Use Postman for quick, repeatable tests Postman’s visual UI makes it easy to fire JSON-RPC calls at your brand-new endpoint without writing any code. GetBlock maintains an official Postman Collection that already contains sample requests for every supported chain and method. official Postman Collection official Postman Collection Import the collection Download the GetBlock.postman_collection.json file from the link above. In Postman, click Import → File and select the JSON file. A new workspace folder named GetBlock appears. Create an environment Click Environments → +. Add two variables: Import the collection Download the GetBlock.postman_collection.json file from the link above. In Postman, click Import → File and select the JSON file. A new workspace folder named GetBlock appears. Import the collection Download the GetBlock.postman_collection.json file from the link above. In Postman, click Import → File and select the JSON file. A new workspace folder named GetBlock appears. Download the GetBlock.postman_collection.json file from the link above. GetBlock.postman_collection.json In Postman, click Import → File and select the JSON file. A new workspace folder named GetBlock appears. Import → File GetBlock Create an environment Click Environments → +. Add two variables: Create an environment Click Environments → +. Add two variables: Click Environments → +. Environments → + Add two variables: Variable Initial value BASE_URL https://go.getblock.io/ACCESS_TOKEN/ ADDRESS 0xYourWalletAddress Variable Initial value BASE_URL https://go.getblock.io/ACCESS_TOKEN/ ADDRESS 0xYourWalletAddress Variable Initial value Variable Variable Initial value Initial value BASE_URL https://go.getblock.io/ACCESS_TOKEN/ BASE_URL BASE_URL BASE_URL https://go.getblock.io/ACCESS_TOKEN/ https://go.getblock.io/ACCESS_TOKEN/ https://go.getblock.io/ACCESS_TOKEN/ ADDRESS 0xYourWalletAddress ADDRESS ADDRESS ADDRESS 0xYourWalletAddress 0xYourWalletAddress 0xYourWalletAddress Save and select the environment at the top-right corner of Postman. Save and select the environment at the top-right corner of Postman. Save and select the environment at the top-right corner of Postman. Send your first request Open Ethereum → eth_blockNumber in the imported collection. Click Send. If the connection is healthy, the response body looks like: { "jsonrpc": "2.0", "id": "getblock.io", "result": "0xA1B2C3" // latest block height in hex } Send your first request Open Ethereum → eth_blockNumber in the imported collection. Click Send. If the connection is healthy, the response body looks like: { "jsonrpc": "2.0", "id": "getblock.io", "result": "0xA1B2C3" // latest block height in hex } Send your first request Open Ethereum → eth_blockNumber in the imported collection. Click Send. If the connection is healthy, the response body looks like: { "jsonrpc": "2.0", "id": "getblock.io", "result": "0xA1B2C3" // latest block height in hex } Open Ethereum → eth_blockNumber in the imported collection. Open Ethereum → eth_blockNumber in the imported collection. Ethereum → eth_blockNumber Click Send. If the connection is healthy, the response body looks like: { "jsonrpc": "2.0", "id": "getblock.io", "result": "0xA1B2C3" // latest block height in hex } Click Send. If the connection is healthy, the response body looks like: Send { "jsonrpc": "2.0", "id": "getblock.io", "result": "0xA1B2C3" // latest block height in hex } { "jsonrpc": "2.0", "id": "getblock.io", "result": "0xA1B2C3" // latest block height in hex } Example RPC Tests You can verify that your endpoint is both reachable and fully synchronized by making simple JSON-RPC calls. For instance, calling the eth_blockNumber method checks the current block height and confirms that the node is up-to-date; the request body looks like this: eth_blockNumber {"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":"1"} {"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":"1"} To inspect the ETH balance of a specific account at the latest block, use the eth_getBalance method. Simply replace {{ADDRESS}} with the account you want to query: eth_getBalance {{ADDRESS}} {"jsonrpc":"2.0","method":"eth_getBalance","params":["{{ADDRESS}}","latest"],"id":"1"} {"jsonrpc":"2.0","method":"eth_getBalance","params":["{{ADDRESS}}","latest"],"id":"1"} Each of these calls consumes just one computation unit (CU) and should return a response almost instantly on a healthy dedicated endpoint. For a complete list of supported Ethereum JSON-RPC methods, refer to the GetBlock API reference. Troubleshooting Common Errors A common problem you might face is an HTTP 403 response with the message “Invalid Project or Token.” This usually means the access token you used is wrong or expired. To fix it, check that the token matches exactly with the one in your dashboard. If needed, create a new token by going to Dashboard → Access Tokens. If you get an HTTP 403 error saying “IP address is not allowed,” it means your IP isn't on the token’s allow-list. You can fix this by adding your computer’s IP address or a suitable CIDR range to the token’s settings. Another option is to use a VPN that routes requests through an approved address.address. Sometimes your JSON-RPC call will return null. This usually happens because of a typo in your request or using a method the node doesn't support. Check your request carefully against the examples in the Postman collection to find any mistakes, and ensure you're using one of the documented methods. null Finally, if responses are slow or time out, it might be because you're asking for a very large block of data or there's network congestion. In this case, try switching from HTTP to WebSocket, which can handle larger, streaming responses better. You can also check the problem by making a simple call, like eth_blockNumber, to see if it's a network issue or a problem with the specific method you're using. eth_blockNumber Once both eth_blockNumber and eth_getBalance return cleanly, you’ve confirmed that: eth_blockNumber eth_getBalance Your access token is valid. The node is reachable through HTTPS. The RPC interface delivers correct data. Your access token is valid. The node is reachable through HTTPS. The RPC interface delivers correct data. With confidence in your connection, you’re ready to automate requests from code—or explore advanced integrations in the next steps. Step 5 — Integrating Web3 Libraries (optional advanced step) (optional advanced step) Modern dApps rarely call JSON-RPC “by hand.” Instead, they use JavaScript helpers such as Web3.js or Ethers.js that wrap raw RPC in a friendly, promise-based API. Below are two quick start paths; pick whichever library your stack already uses. Web3.js Ethers.js Using Web3.js (in a Node/React project) Install the package npm install web3 # or: yarn add web3 Instantiate Web3 with your GetBlock endpoint const Web3 = require('web3'); Install the package npm install web3 # or: yarn add web3 Install the package Install the package npm install web3 # or: yarn add web3 npm install web3 # or: yarn add web3 Instantiate Web3 with your GetBlock endpoint const Web3 = require('web3'); Instantiate Web3 with your GetBlock endpoint Instantiate Web3 with your GetBlock endpoint const Web3 = require('web3'); const Web3 = require('web3'); Warning ⚠️: never hard-code your token — load from env vars or a secret manager const web3 = new Web3('https://go.getblock.io/<ACCESS-TOKEN>/'); Warning ⚠️: never hard-code your token — load from env vars or a secret manager const web3 = new Web3('https://go.getblock.io/<ACCESS-TOKEN>/'); https://go.getblock.io/ Smoke-test the connection Smoke-test the connection Smoke-test the connection const latest = await web3.eth.getBlockNumber(); console.log('Current block:', latest); const latest = await web3.eth.getBlockNumber(); console.log('Current block:', latest); Create a throw-away account const acc = web3.eth.accounts.create(); console.log(acc.address, acc.privateKey); Send a simple value transfer (testnet) const tx = { to: '0xReceiverAddress', value: web3.utils.toWei('0.001', 'ether'), gas: 21_000, }; const signed = await web3.eth.accounts.signTransaction(tx, acc.privateKey); const { transactionHash } = await web3.eth.sendSignedTransaction(signed.rawTransaction); console.log('Tx hash:', transactionHash); Create a throw-away account const acc = web3.eth.accounts.create(); console.log(acc.address, acc.privateKey); Create a throw-away account Create a throw-away account const acc = web3.eth.accounts.create(); console.log(acc.address, acc.privateKey); const acc = web3.eth.accounts.create(); console.log(acc.address, acc.privateKey); Send a simple value transfer (testnet) const tx = { to: '0xReceiverAddress', value: web3.utils.toWei('0.001', 'ether'), gas: 21_000, }; const signed = await web3.eth.accounts.signTransaction(tx, acc.privateKey); const { transactionHash } = await web3.eth.sendSignedTransaction(signed.rawTransaction); console.log('Tx hash:', transactionHash); Send a simple value transfer (testnet) Send a simple value transfer (testnet) const tx = { to: '0xReceiverAddress', value: web3.utils.toWei('0.001', 'ether'), gas: 21_000, }; const signed = await web3.eth.accounts.signTransaction(tx, acc.privateKey); const { transactionHash } = await web3.eth.sendSignedTransaction(signed.rawTransaction); console.log('Tx hash:', transactionHash); const tx = { to: '0xReceiverAddress', value: web3.utils.toWei('0.001', 'ether'), gas: 21_000, }; const signed = await web3.eth.accounts.signTransaction(tx, acc.privateKey); const { transactionHash } = await web3.eth.sendSignedTransaction(signed.rawTransaction); console.log('Tx hash:', transactionHash); Using Ethers.js (in a Node/TypeScript/Vite project) Install Ethers npm install ethers # or: yarn add ethers Create a provider import { ethers } from 'ethers'; // Environment variable keeps the token out of Git const provider = new ethers.JsonRpcProvider( `https://go.getblock.io/${process.env.GETBLOCK_TOKEN}/` ); Query the chain const block = await provider.getBlockNumber(); console.log('Block height:', block); Send a raw transaction const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!, provider); const txResp = await wallet.sendTransaction({ to: '0xReceiverAddress', value: ethers.parseEther('0.001'), }); const receipt = await txResp.wait(); console.log('Mined in block', receipt.blockNumber); Install Ethers npm install ethers # or: yarn add ethers Install Ethers Install Ethers npm install ethers # or: yarn add ethers npm install ethers # or: yarn add ethers Create a provider import { ethers } from 'ethers'; // Environment variable keeps the token out of Git const provider = new ethers.JsonRpcProvider( `https://go.getblock.io/${process.env.GETBLOCK_TOKEN}/` ); Create a provider Create a provider import { ethers } from 'ethers'; // Environment variable keeps the token out of Git const provider = new ethers.JsonRpcProvider( `https://go.getblock.io/${process.env.GETBLOCK_TOKEN}/` ); import { ethers } from 'ethers'; // Environment variable keeps the token out of Git const provider = new ethers.JsonRpcProvider( `https://go.getblock.io/${process.env.GETBLOCK_TOKEN}/` ); Query the chain const block = await provider.getBlockNumber(); console.log('Block height:', block); Query the chain Query the chain const block = await provider.getBlockNumber(); console.log('Block height:', block); const block = await provider.getBlockNumber(); console.log('Block height:', block); Send a raw transaction const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!, provider); const txResp = await wallet.sendTransaction({ to: '0xReceiverAddress', value: ethers.parseEther('0.001'), }); const receipt = await txResp.wait(); console.log('Mined in block', receipt.blockNumber); Send a raw transaction Send a raw transaction const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!, provider); const txResp = await wallet.sendTransaction({ to: '0xReceiverAddress', value: ethers.parseEther('0.001'), }); const receipt = await txResp.wait(); console.log('Mined in block', receipt.blockNumber); const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!, provider); const txResp = await wallet.sendTransaction({ to: '0xReceiverAddress', value: ethers.parseEther('0.001'), }); const receipt = await txResp.wait(); console.log('Mined in block', receipt.blockNumber); When using Ethereum libraries, pick one that suits your code and preferences. If you're handling older projects or prefer the classic Web3.js callback style, then Web3.js is a good choice. But if you're creating new apps in TypeScript and need strong BigInt support with a modern signer interface, Ethers.js is the better choice. Both libraries charge the same Compute Units (CUs) per RPC call, so the choice is mostly ergonomic. In either case, remember to: Compute Units (CUs) Keep the ACCESS TOKEN in a secure place (dotenv, AWS Secrets Manager, GitHub Actions secret). Prefer WebSocket URLs for real-time events (eth_subscribe) and fall back to HTTPS for normal queries. Re-use the provider or Web3 instance across your app to avoid unnecessary TCP handshakes. Keep the ACCESS TOKEN in a secure place (dotenv, AWS Secrets Manager, GitHub Actions secret). ACCESS TOKEN Prefer WebSocket URLs for real-time events (eth_subscribe) and fall back to HTTPS for normal queries. WebSocket eth_subscribe Re-use the provider or Web3 instance across your app to avoid unnecessary TCP handshakes. With a working provider in code, your application can now read on-chain data, sign messages, and broadcast transactions through your private GetBlock node. Next up: optionally wiring the endpoint into MetaMask for local debugging and front-end testing. Step 6 — Connecting MetaMask to Your Private Ethereum Node (optional) (optional) Why plug MetaMask into your node? By connecting MetaMask to your own node, you can sign and send transactions right from your browser or mobile wallet without using a shared public RPC pool. This gives you true end-to-end testing. Your dApp’s frontend, backend services, and wallet all use the same endpoint, so block numbers and gas price estimates stay in sync, ensuring a smooth user experience. During high network demand, you won't face congestion or throttling like with public gateways such as Infura, because your requests go through your private node. One-time setup guide A. Add GetBlock RPC to an existing network existing Copy your HTTPS endpoint, e.g. https://go.getblock.io/<ACCESS-TOKEN>/ In MetaMask click the network selector (e.g., “Ethereum Mainnet”). Copy your HTTPS endpoint, e.g. https://go.getblock.io/<ACCESS-TOKEN>/ https://go.getblock.io/<ACCESS-TOKEN>/ In MetaMask click the network selector (e.g., “Ethereum Mainnet”). Press ▼ ➝ Add RPC URL. Press ▼ ➝ Add RPC URL. ▼ Add RPC URL Paste the endpoint, give it a label such as GetBlock API, and hit Add URL. Paste the endpoint, give it a label such as GetBlock API, and hit Add URL. GetBlock API Add URL You can now toggle between MetaMask’s default RPC and your private node at any time. B. Add a new custom network (if it isn’t listed) new Click the network dropdown ➝ Add a custom network. Fill the form: Click the network dropdown ➝ Add a custom network. Add a custom network Fill the form: Field Value Network name Anything (e.g. Sepolia GB) RPC URL https://go.getblock.io/<ACCESS-TOKEN>/ Chain ID Run eth_chainId against the endpoint (see curl below) or look it up in Chainlist Currency symbol ETH (or native coin) Block explorer Optional (e.g. https://sepolia.etherscan.io) Field Value Network name Anything (e.g. Sepolia GB) RPC URL https://go.getblock.io/<ACCESS-TOKEN>/ Chain ID Run eth_chainId against the endpoint (see curl below) or look it up in Chainlist Currency symbol ETH (or native coin) Block explorer Optional (e.g. https://sepolia.etherscan.io) Field Value Field Field Value Value Network name Anything (e.g. Sepolia GB) Network name Network name Network name Anything (e.g. Sepolia GB) Anything (e.g. Sepolia GB) Sepolia GB RPC URL https://go.getblock.io/<ACCESS-TOKEN>/ RPC URL RPC URL RPC URL https://go.getblock.io/<ACCESS-TOKEN>/ https://go.getblock.io/<ACCESS-TOKEN>/ https://go.getblock.io/<ACCESS-TOKEN>/ Chain ID Run eth_chainId against the endpoint (see curl below) or look it up in Chainlist Chain ID Chain ID Chain ID Run eth_chainId against the endpoint (see curl below) or look it up in Chainlist Run eth_chainId against the endpoint (see curl below) or look it up in Chainlist eth_chainId Currency symbol ETH (or native coin) Currency symbol Currency symbol Currency symbol ETH (or native coin) ETH (or native coin) ETH Block explorer Optional (e.g. https://sepolia.etherscan.io) Block explorer Block explorer Block explorer Optional (e.g. https://sepolia.etherscan.io) Optional (e.g. https://sepolia.etherscan.io) https://sepolia.etherscan.io Click Save – the wallet switches to the new network immediately. Click Save – the wallet switches to the new network immediately. Save # Optional: fetch the chain ID over RPC curl -X POST https://go.getblock.io/<ACCESS-TOKEN>/ \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":"getblock.io"}' # Optional: fetch the chain ID over RPC curl -X POST https://go.getblock.io/<ACCESS-TOKEN>/ \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":"getblock.io"}' Quick verification For a quick verification, first confirm that the ETH balance displayed in MetaMask matches the balance you fetched with eth_getBalance in Step 4. Then ensure that the next transaction nonce shown in MetaMask aligns exactly with the result of your eth_getTransactionCount call. Finally, expand the “Advanced options” in MetaMask’s send form and verify that the displayed gas price is the same as what you retrieved via eth_gasPrice. If any of these values diverge, double-check that MetaMask is pointed to the identical endpoint URL—including the correct access token. eth_getBalance eth_getTransactionCount eth_gasPrice Connecting MetaMask completes the full development loop: ledger data from GetBlock, transactions signed in the browser, and broadcasts funneled back through your dedicated node—no public RPCs required. Common Ethereum RPC Methods Overview (Reference) Below is a concise reference for the JSON-RPC calls you’ll use most often against your private GetBlock endpoint. Each example assumes you have exported your access token in the GETBLOCK_TOKEN environment variable so you never hard-code it in source control. GETBLOCK_TOKEN The eth_call method lets you execute a read-only smart-contract function without sending a transaction or incurring any gas cost. It’s ideal for invoking view or pure Solidity functions. A minimal request body looks like: eth_call view pure {"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0xToken","data":"0x70a082310000…"},"latest"],"id":"1"} {"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0xToken","data":"0x70a082310000…"},"latest"],"id":"1"} and the response returns the ABI-encoded result directly. When you need to fetch an entire block by its number or tag (for example, "latest" or "pending"), use eth_getBlockByNumber. You can request only header fields plus transaction hashes, or set the second parameter to true to retrieve full transaction objects. A typical call is: "latest" "pending" eth_getBlockByNumber true {"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest",false],"id":"1"} {"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest",false],"id":"1"} and you’ll receive the block header along with the list of transactions. To broadcast a signed transaction—whether you signed it locally via Web3.js, Ethers.js, or a hardware wallet—use eth_sendRawTransaction. Pass the RLP-encoded hex payload as your parameter: eth_sendRawTransaction {"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0x02f8…"],"id":"1"} {"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0x02f8…"],"id":"1"} and the node responds with the new transaction hash. Once you have a transaction hash, call eth_getTransactionReceipt to retrieve execution details such as success status, gas used, and event logs. Poll this endpoint until its result field is non-null: eth_getTransactionReceipt result {"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0xHash"],"id":"1"} {"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0xHash"],"id":"1"} and you’ll receive the full receipt JSON. To read an account’s ETH balance at a given block (defaulting to "latest"), the eth_getBalance method is your tool of choice. By supplying the address and block tag, you get back the balance in Wei (hex-encoded): "latest" eth_getBalance {"jsonrpc":"2.0","method":"eth_getBalance","params":["0xAddr","latest"],"id":"1"} {"jsonrpc":"2.0","method":"eth_getBalance","params":["0xAddr","latest"],"id":"1"} Finally, eth_gasPrice returns the network’s median gas price over the last 100 blocks, which helps you set sensible default fees: eth_gasPrice {"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":"1"} {"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":"1"} and the node replies with the suggested gas price in hex-encoded Wei. On GetBlock, each of these calls consumes one Compute Unit—except when you request a full transaction list via eth_getBlockByNumber, which costs more due to the larger response payload. Feel free to extend your toolkit with methods such as eth_estimateGas, WebSocket subscriptions via eth_subscribe, or network chain ID queries with net_version. For the complete Ethereum JSON-RPC reference, consult the GetBlock Ethereum API documentation. eth_getBlockByNumber eth_estimateGas eth_subscribe net_version Conclusion In this guide, you started by setting up your infrastructure: you created a GetBlock account, got an access token, and set up a dedicated Ethereum endpoint for your project. Then, you customized the node by picking the client implementation, choosing between full or archive storage modes, and turning on the necessary RPC modules for best performance. For security, you managed tokens carefully and set up IP allow-lists so only trusted back-ends and wallets can access your JSON-RPC interface. You checked functionality by running calls like eth_blockNumber and eth_getBalance using the official Postman collection, making sure your node stays in sync and meets GetBlock’s 99.9% uptime promise. Finally, you connected the endpoint to your applications: integrating it with Web3.js or Ethers.js for automated interactions and setting MetaMask to use the same URL for smooth front-end testing. eth_blockNumber eth_getBalance Recommended Next Steps To keep an eye on your endpoint's health, turn on monitoring and alerts in the dashboard's Monitoring and Analytics section. Here, you can check compute-unit usage, response times, and error rates. Set up email or webhook alerts to get notified before you reach your plan limits. For more control over node behavior, look into advanced settings like pruning options, tracing modes, or JWT-based Engine API authentication. If you need more capacity, add more dedicated nodes or switch to cluster mode to share the load. Keep important documents handy for daily tasks: the endpoint setup guide, the error catalog, and the full Ethereum API reference. By doing this, you'll keep your private Ethereum node secure, easy to monitor, and ready to support everything from internal analytics to production-grade dApps. endpoint's health