@@ -63,6 +63,48 @@ We perform these updates on best-effort basis, so it's OK if the updates lag som
63
63
Ideally we'd automate the process (https://github.com/penumbra-zone/galileo/issues/17 ),
64
64
but until then, we'll perform it manually, say, every other testnet.
65
65
66
+ ## 🔭 Running as a gRPC service
67
+
68
+ Galileo can be run as a gRPC service, using the ` serve-rpc ` command. This endpoint supports
69
+ reflection, and automatic HTTPS.
70
+
71
+ ``` sh
72
+ # As galileo, run the RPC service, over plaintext on `localhost:8080`.
73
+ cargo run --release -- serve-rpc --account-count=1 1penumbra
74
+ ```
75
+
76
+ ` grpcurl ` can be used to inspect what RPCs are available:
77
+
78
+ ``` sh
79
+ ; grpcurl -plaintext localhost:8080 list
80
+ ```
81
+
82
+ A request that the faucet send funds to your address can be made using ` grpcurl ` , like so:
83
+
84
+ ``` sh
85
+ # Run `pcli` to acquire a wallet address.
86
+ ; ADDRESS=$( PCLI_UNLEASH_DANGER=1 pcli view address)
87
+
88
+ # Call the RPC over plaintext, providing the address:
89
+ ; grpcurl -plaintext -d @ localhost:8080 galileo.faucet.v1.FaucetService.SendFunds << EOM
90
+ {
91
+ "address": {
92
+ "alt_bech32m": "$ADDRESS "
93
+ }
94
+ }
95
+ EOM
96
+ ```
97
+
98
+ Alternatively, Rust programs use the facilities in ` galileo::proto ` to construct a client that can
99
+ send requests to the faucet service.
100
+
101
+ Use ` --grpc-auto-https ` to configure an HTTPS domain, provisioning certificates via LetsEncrypt.
102
+ When configuring TLS certificates, it may be wise to use the ` --acme-staging ` option, to prevent
103
+ being rate-limited by the LetsEncrypt API.
104
+
105
+ ❗ ** NOTE:** be careful not to expose this RPC on the public internet without proper
106
+ authentication.
107
+
66
108
## Re-deploying after a testnet release
67
109
When we deploy a new testnet, we must bounce Galileo to keep the faucet working.
68
110
The steps are:
0 commit comments