gRPC
Galene serves the modern Sui gRPC interface (sui.rpc.v2) over the same fork state as JSON-RPC. So
a gRPC client points at the local fork and reads forked mainnet state, submits transactions, and
streams the fork as it changes.
It runs alongside JSON-RPC. By default on 127.0.0.1:9000.
# served with the fork
galene start # gRPC on 127.0.0.1:9000
galene start --grpc-addr 0.0.0.0:9000 # bind elsewhere (also GALENE_GRPC_ADDR)
galene start --no-grpc # JSON-RPC onlyThe gRPC and JSON-RPC servers share one fork state. A cheatcode over JSON-RPC is visible to a gRPC client immediately, and the other way around.
Services
Served from the official Sui SDK protos.
LedgerService
RPC
sui.rpc.v2.LedgerService| Method | What it does |
|---|---|
GetServiceInfo | Chain id, epoch, and server info. |
GetObject | Read one object from the fork (copy-on-read on a miss). |
BatchGetObjects | Read many objects in one call. |
GetTransaction | Fetch a transaction and its effects. |
GetEpoch | The current epoch. |
GetCheckpoint | A checkpoint by sequence number. |
TransactionExecutionService
RPC
sui.rpc.v2.TransactionExecutionService| Method | What it does |
|---|---|
ExecuteTransaction | Submit a transaction. Galene forks every object it needs, then runs it. |
SimulateTransaction | Dry-run a transaction and roll it back. The fork is untouched. |
SubscriptionService
RPC
sui.rpc.v2.SubscriptionService| Method | What it does |
|---|---|
SubscribeCheckpoints | A live stream of the fork’s transactions as they land. |
Server reflection
The server registers reflection (both v1 and v1alpha), so clients discover the schema without
local .proto files. grpcurl and Postman work out of the box.
# list services
grpcurl -plaintext 127.0.0.1:9000 list
# describe a method
grpcurl -plaintext 127.0.0.1:9000 describe sui.rpc.v2.LedgerService.GetObject
# read an object
grpcurl -plaintext -d '{"object_id":"0x6"}' \
127.0.0.1:9000 sui.rpc.v2.LedgerService/GetObjectLast updated on