# Solana RPC Working Principles

Solana RPC (Remote Procedure Call) serves as a critical interface for applications to interact with the Solana blockchain. Based on the JSON-RPC 2.0 protocol, it allows developers to access blockchain data and submit new transactions via RPC nodes. The working principles are as follows:

## **Basic Architecture**

Solana RPC provides standardized API interfaces with primary functions including:

* **Data Query**:
  * `getBlock` to fetch block information.
  * `getBalance` to retrieve account balances.
* **Transaction Submission**:
  * `sendTransaction` to send signed transactions.
* **Event Subscription**:
  * WebSocket for real-time on-chain activity monitoring (e.g., account changes, log updates).

## **Node Types and Roles**

The Solana network includes two node types:

1. **Validator Nodes**: Participate in consensus and maintain blockchain state, typically not exposing RPC interfaces directly.
2. **RPC Nodes**: Designed for external requests, divided into:
   * **Public RPC**: Free to use but rate-limited (e.g., Solana official endpoint `api.mainnet-beta.solana.com`).
   * **Dedicated RPC**: Provided by service providers, supporting high concurrency and low latency at a cost.

## **Request Processing Flow**

1. **Request Submission**: Developers send requests to RPC nodes via APIs.
2. **Validation**: Nodes verify request legitimacy.
3. **Data Query**: Nodes retrieve local data (blocks, transactions, accounts, etc.).
4. **Response**: Results are returned to developers in JSON format:
   * Successful requests yield corresponding data.
   * Failed requests return error codes.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gtokentool.com/en/solana-rpc-working-principles.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
