Skip to content

Commit

Permalink
docs: update proto urls to v1
Browse files Browse the repository at this point in the history
Follow-up to #3751.
  • Loading branch information
conorsch committed Feb 7, 2024
1 parent 8c3ee52 commit a5c3423
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions docs/guide/src/dev/rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ to a local devnet.
The [Buf Studio](https://studio.buf.build) webapp provides a polished GUI
and [comprehensive documentation](https://buf.build/docs/bsr/studio). However,
a significant limitation for use with Penumbra is that it lacks
support for streaming requests, such as [`penumbra.client.v1alpha1.CompactBlockRangeRequest`](https://buf.build/penumbra-zone/penumbra/docs/main:penumbra.client.v1alpha1#penumbra.client.v1alpha1.CompactBlockRangeRequest).
support for streaming requests, such as [`penumbra.core.component.compact_block.v1.CompactBlockRangeRequest`](https://buf.build/penumbra-zone/penumbra/docs/main:penumbra.core.component.compact_block.v1#penumbra.core.component.compact_block.v1.CompactBlockRangeRequest).

To get started with Buf Studio, you can use the publicly available gRPC endpoint
from the testnet deployments run by Penumbra Labs:
Expand All @@ -37,11 +37,11 @@ Click **Send** to submit the request and view response data in the right-hand pa

Regardless of which interface you choose, you can connect to an instance of `pd` running
on your machine, which can be useful while adding new features.
First, make sure you've [joined a testnet](https://guide.penumbra.zone/main/pd/join-testnet.html)
First, make sure you've [joined a testnet](../pd/join-testnet.md)
by setting up a node on your local machine. Once it's running, you can connect directly
to the pd port via `http://localhost:8080`.

Alternatively, you can use `pclientd`. First, make sure you've [configured pclientd locally](https://guide.penumbra.zone/main/pcli/pclientd.html)
Alternatively, you can use `pclientd`. First, make sure you've [configured pclientd locally](../pclientd/configure.md)
with your full viewing key. Once it's running, you can connect directly
to the pclient port via `http://localhost:8081`.

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/src/pcli/transaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,4 +221,4 @@ pcli tx withdraw --to <OSMOSIS_ADDRESS> --channel <CHANNEL_ID> 5gm --timeout-hei
Unfortunately the CLI tooling for Osmosis is cumbersome. For now, use `rly` as a user agent
for the Osmosis testnet, as described in the [IBC dev docs](../dev/ibc.md).

[Osmosis testnet]: https://docs.osmosis.zone/networks/join-testnet/
[Osmosis testnet]: https://docs.osmosis.zone/overview/endpoints#testnet-networks
10 changes: 5 additions & 5 deletions docs/guide/src/pclientd/build_transaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@ Using the view and custody services to construct a transaction has four steps.

## Plan the Transaction

Using the [`TransactionPlanner`](https://buf.build/penumbra-zone/penumbra/docs/60489c71c3b64f179b2537b24a587abe:penumbra.view.v1alpha1#penumbra.view.v1alpha1.ViewProtocolService.TransactionPlanner) RPC in the view service, compute a `TransactionPlan`.
Using the [`TransactionPlanner`](https://buf.build/penumbra-zone/penumbra/docs/main:penumbra.view.v1#penumbra.view.v1.ViewService.TransactionPlanner) RPC in the view service, compute a `TransactionPlan`.

This RPC translates a general intent, like "send these tokens to this address" into a fully deterministic plan of the exact transaction, with all spends and outputs, all blinding factors selected, and so on.

## Authorize the Transaction

With a `TransactionPlan` in hand, use the
[`Authorize`](https://buf.build/penumbra-zone/penumbra/docs/main:penumbra.custody.v1alpha1#penumbra.custody.v1alpha1.CustodyProtocolService.Authorize)
[`Authorize`](https://buf.build/penumbra-zone/penumbra/docs/main:penumbra.custody.v1#penumbra.custody.v1.CustodyService.Authorize)
RPC to request authorization of the transaction from the custody service.

Note that authorization happens on the cleartext transaction _plan_, not the shielded transaction, so that the custodian can inspect the transaction before signing it.

## Build the Transaction

With the `TransactionPlan` and `AuthorizationData` in hand, use the [`WitnessAndBuild`](https://buf.build/penumbra-zone/penumbra/docs/60489c71c3b64f179b2537b24a587abe:penumbra.view.v1alpha1#penumbra.view.v1alpha1.ViewProtocolService.WitnessAndBuild) RPC to have the view service build the transaction, using the latest witness data to construct the ZK proofs.
With the `TransactionPlan` and `AuthorizationData` in hand, use the [`WitnessAndBuild`](https://buf.build/penumbra-zone/penumbra/docs/main:penumbra.view.v1#penumbra.view.v1.ViewService.WitnessAndBuild) RPC to have the view service build the transaction, using the latest witness data to construct the ZK proofs.

## Broadcast the Transaction

With the resulting shielded `Transaction` complete, use the [`BroadcastTransaction`](https://buf.build/penumbra-zone/penumbra/docs/60489c71c3b64f179b2537b24a587abe:penumbra.view.v1alpha1#penumbra.view.v1alpha1.ViewProtocolService.BroadcastTransaction)
With the resulting shielded `Transaction` complete, use the [`BroadcastTransaction`](https://buf.build/penumbra-zone/penumbra/docs/main:penumbra.view.v1#penumbra.view.v1.ViewService.BroadcastTransaction)
request to broadcast the transaction to the network.

The `await_detection` parameter will wait for the transaction to be confirmed
on-chain. Using `await_detection` is a simple way to ensure that different
transactions can't conflict with each other.
transactions can't conflict with each other.
12 changes: 6 additions & 6 deletions docs/guide/src/pclientd/rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ link is preconfigured to make requests against a local `pclientd` instance with
the default `bind_addr`, but can be aimed at any endpoint.

[GRPCUI]: https://github.com/fullstorydev/grpcui
[buf-studio]: https://buf.build/studio/penumbra-zone/penumbra/penumbra.core.app.v1alpha1.QueryService/AppParameters?selectedProtocol=grpc-web&target=http%3A%2F%2Flocalhost%3A8081
[buf-studio]: https://buf.build/studio/penumbra-zone/penumbra/penumbra.core.app.v1.QueryService/AppParameters?selectedProtocol=grpc-web&target=http%3A%2F%2Flocalhost%3A8081

## Accessing public chain state

Expand All @@ -21,21 +21,21 @@ Documentation on these RPCs is available on Buf.build; follow the links in Buf S

## Accessing private chain state

Access to a user's private state is provided by the [`ViewService` RPC](https://buf.build/penumbra-zone/penumbra/docs/main:penumbra.view.v1alpha1#penumbra.view.v1alpha1.ViewProtocolService).
Access to a user's private state is provided by the [`ViewService` RPC](https://buf.build/penumbra-zone/penumbra/docs/main:penumbra.view.v1#penumbra.view.v1.ViewService).

In addition to ordinary queries, like
[`Balances`](https://buf.build/penumbra-zone/penumbra/docs/main:penumbra.view.v1alpha1#penumbra.view.v1alpha1.ViewProtocolService.Balances),
[`Balances`](https://buf.build/penumbra-zone/penumbra/docs/main:penumbra.view.v1#penumbra.view.v1.ViewService.Balances),
which gets a user's balances by account, the RPC also contains utility methods
that allow computations involving cryptography. For instance, the
[`AddressByIndex`](https://buf.build/penumbra-zone/penumbra/docs/main:penumbra.view.v1alpha1#penumbra.view.v1alpha1.ViewProtocolService.AddressByIndex)
[`AddressByIndex`](https://buf.build/penumbra-zone/penumbra/docs/main:penumbra.view.v1#penumbra.view.v1.ViewService.AddressByIndex)
request computes a public address from an account index, and the
[`IndexByAddress`](https://buf.build/penumbra-zone/penumbra/docs/main:penumbra.view.v1alpha1#penumbra.view.v1alpha1.ViewProtocolService.IndexByAddress)
[`IndexByAddress`](https://buf.build/penumbra-zone/penumbra/docs/main:penumbra.view.v1#penumbra.view.v1.ViewService.IndexByAddress)
request decrypts an address to its private index.

Finally, the view service can plan and build transactions, as described in [the next section](./build_transaction.md).

## Requesting transaction authorization

If `pclientd` was configured in custody mode, it exposes a [`CustodyService`](https://buf.build/penumbra-zone/penumbra/docs/main:penumbra.custody.v1alpha1#penumbra.custody.v1alpha1.CustodyProtocolService).
If `pclientd` was configured in custody mode, it exposes a [`CustodyService`](https://buf.build/penumbra-zone/penumbra/docs/main:penumbra.custody.v1#penumbra.custody.v1.CustodyService).

This allows authorization of a `TransactionPlan`, as described in [the next section](./build_transaction.md).

0 comments on commit a5c3423

Please sign in to comment.