Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spec: make actions sections easier to navigate #4229

Merged
merged 2 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 0 additions & 53 deletions docs/guide/src/pcli/governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,56 +270,3 @@ on the result of the vote: `proposal_N_passed`, `proposal_N_failed` or `proposal
proposal was not slashed (that is, it passed _or_ failed), this action will also produce the
original proposal deposit. Note that you _can_ claim a slashed proposal: you will receive the
slashed proposal result NFT, but you will not receive the original proposal deposit.

## Contributing To The Community Pool

Anyone can contribute any amount of any denomination to the Penumbra Community Pool. To do this, use the
command `pcli tx community-pool-deposit`, like so:

```bash
pcli tx community-pool-deposit 100penumbra
```

Funds contributed to the Community Pool cannot be withdrawn except by a successful Community Pool spend governance
proposal.

To query the current Community Pool balance, use `pcli query community-pool balance` with the **base denomination** of an
asset or its asset ID (display denominations are not currently accepted). For example:

```bash
pcli query Community Pool balance upenumbra
```

Community Pool spend proposals are only accepted for voting if they would not overdraw the current funds in the
Community Pool at the time the proposal is submitted, so it's worth checking this information before submitting
such a proposal.

### Sending Validator Funding Streams To The Community Pool

A validator may non-custodially send funds to the Community Pool, similarly to any other funding stream. To do
this, add a `[[funding_stream]]` section to your validator definition TOML file that declares the
Community Pool as a recipient for a funding stream. For example, your definition might look like this:

```toml
sequence_number = 0
enabled = true
name = "My Validator"
website = "https://example.com"
description = "An example validator"
identity_key = "penumbravalid1s6kgjgnphs99udwvyplwceh7phwt95dyn849je0jl0nptw78lcqqvcd65j"
governance_key = "penumbragovern1s6kgjgnphs99udwvyplwceh7phwt95dyn849je0jl0nptw78lcqqhknap5"

[consensus_key]
type = "tendermint/PubKeyEd25519"
value = "tDk3/k8zjEyDQjQC1jUyv8nJ1cC1B/MgrDzeWvBTGDM="

# Send a 1% commission to this address:
[[funding_stream]]
recipient = "penumbrav2t1hum845ches70c8kp8zfx7nerjwfe653hxsrpgwepwtspcp4jy6ytnxhe5kwn56sku684x6zzqcwp5ycrkee5mmg9kdl3jkr5lqn2xq3kqxvp4d7gwqdue5jznk2ter2t66mk4n"
rate_bps = 100

# Send another 1% commission to the Community Pool:
[[funding_stream]]
recipient = "CommunityPool"
rate_bps = 100
```
9 changes: 8 additions & 1 deletion docs/protocol/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
- [Transaction Actions](./dex/action.md)
- [`Swap`](./dex/action/swap.md)
- [`SwapClaim`](./dex/action/swap_claim.md)
- [`Position` Actions](./dex/actions/position.md)
- [`Position` Actions](./dex/action/position.md)
- [Staking and Delegation](./stake.md)
- [Staking Tokens](./stake/tokens.md)
- [Validator Rewards and Fees](./stake/validator-rewards.md)
Expand All @@ -83,7 +83,14 @@
- [Governance](./governance.md)
- [Transaction Actions](./governance/action.md)
- [`DelegatorVote`](./governance/action/delegator_vote.md)
- [`ValidatorVote`](./governance/action/validator_vote.md)
- [`Proposal` Actions](./governance/action/proposal.md)
- [IBC Integration](./ibc.md)
- [Transaction Actions](./ibc/action.md)
- [`IbcRelay`](./ibc/action/ibc_relay.md)
- [`Ics20Withdrawal`](./ibc/action/ics20_withdrawal.md)
- [Community Pool](./community_pool.md)
- [Transaction Actions](./community_pool/action.md)
- [`CommunityPoolSpend`](./community_pool/action/spend.md)
- [`CommunityPoolOutput`](./community_pool/action/output.md)
- [`CommunityPoolDeposit`](./community_pool/action/deposit.md)
60 changes: 60 additions & 0 deletions docs/protocol/src/community_pool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Community Pool

As with the Cosmos SDK, Penumbra also has a similar Community Pool feature.

## Making A Community Pool Spend Transaction Plan

Token holders can submit a governance community pool spend proposal. This proposal contains a _transaction plan_ containing a description of the spends to be performed if the proposal passes. This is described fully in the [governance section of the Penumbra protocol spec](./governance.md).

## Contributing To The Community Pool

Anyone can contribute any amount of any denomination to the Penumbra Community Pool. To do this, use the
command `pcli tx community-pool-deposit`, like so:

```bash
pcli tx community-pool-deposit 100penumbra
```

Funds contributed to the Community Pool cannot be withdrawn except by a successful Community Pool spend governance
proposal.

To query the current Community Pool balance, use `pcli query community-pool balance` with the **base denomination** of an
asset or its asset ID (display denominations are not currently accepted). For example:

```bash
pcli query Community Pool balance upenumbra
```

Community Pool spend proposals are only accepted for voting if they would not overdraw the current funds in the
Community Pool at the time the proposal is submitted, so it's worth checking this information before submitting
such a proposal.

### Sending Validator Funding Streams To The Community Pool

A validator may non-custodially send funds to the Community Pool, similarly to any other funding stream. To do
this, add a `[[funding_stream]]` section to your validator definition TOML file that declares the
Community Pool as a recipient for a funding stream. For example, your definition might look like this:

```toml
sequence_number = 0
enabled = true
name = "My Validator"
website = "https://example.com"
description = "An example validator"
identity_key = "penumbravalid1s6kgjgnphs99udwvyplwceh7phwt95dyn849je0jl0nptw78lcqqvcd65j"
governance_key = "penumbragovern1s6kgjgnphs99udwvyplwceh7phwt95dyn849je0jl0nptw78lcqqhknap5"

[consensus_key]
type = "tendermint/PubKeyEd25519"
value = "tDk3/k8zjEyDQjQC1jUyv8nJ1cC1B/MgrDzeWvBTGDM="

# Send a 1% commission to this address:
[[funding_stream]]
recipient = "penumbrav2t1hum845ches70c8kp8zfx7nerjwfe653hxsrpgwepwtspcp4jy6ytnxhe5kwn56sku684x6zzqcwp5ycrkee5mmg9kdl3jkr5lqn2xq3kqxvp4d7gwqdue5jznk2ter2t66mk4n"
rate_bps = 100

# Send another 1% commission to the Community Pool:
[[funding_stream]]
recipient = "CommunityPool"
rate_bps = 100
```
7 changes: 7 additions & 0 deletions docs/protocol/src/community_pool/action.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Transaction Actions

The community pool component defines the following actions:

- [`core.component.governance.v1.CommunityPoolDeposit`](./action/deposit.md)
- [`core.component.governance.v1.CommunityPoolOutput`](./action/output.md)
- [`core.component.governance.v1.CommunityPoolSpend`](./action/spend.md)
1 change: 1 addition & 0 deletions docs/protocol/src/community_pool/action/deposit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# CommunityPoolDeposit
1 change: 1 addition & 0 deletions docs/protocol/src/community_pool/action/output.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# CommunityPoolOutput
1 change: 1 addition & 0 deletions docs/protocol/src/community_pool/action/spend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# CommunityPoolSpend
9 changes: 9 additions & 0 deletions docs/protocol/src/dex/action.md
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
# Transaction Actions

The decentralized exchange component defines the following actions:

- [`core.component.dex.v1.Swap`](./action/swap.md)
- [`core.component.dex.v1.SwapClaim`](./action/swap_claim.md)
- [`core.component.dex.v1.PositionOpen`](./action/position.md)
- [`core.component.dex.v1.PositionClose`](./action/position.md)
- [`core.component.dex.v1.PositionWithdraw`](./action/position.md)
- [`core.component.dex.v1.PositionRewardClaim`](./action/position.md)
8 changes: 8 additions & 0 deletions docs/protocol/src/governance/action.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# Transaction Actions

The governance component defines the following actions:

- [`core.component.governance.v1.ValidatorVote`](./action/validator_vote.md)
- [`core.component.governance.v1.DelegatorVote`](./action/delegator_vote.md)
- [`core.component.governance.v1.ProposalSubmit`](./action/proposal.md)
- [`core.component.governance.v1.ProposalWithdraw`](./action/proposal.md)
- [`core.component.governance.v1.ProposalDepositClaim`](./action/proposal.md)
1 change: 1 addition & 0 deletions docs/protocol/src/governance/action/proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Proposal Actions
1 change: 1 addition & 0 deletions docs/protocol/src/governance/action/validator_vote.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# ValidatorVote
5 changes: 5 additions & 0 deletions docs/protocol/src/ibc/action.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
# Transaction Actions

The IBC component defines the following actions:

- [`core.component.ibc.v1.IbcRelay`](./action/ibc_relay.md)
- [`core.component.ibc.v1.Ics20Withdrawal`](./action/ics20_withdrawal.md)
6 changes: 6 additions & 0 deletions docs/protocol/src/stake/action.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# Transaction Actions

The staking component defines the following actions:

- [`core.component.stake.v1.Delegate`](./action/delegate.md)
- [`core.component.stake.v1.Undelegate`](./action/undelegate.md)
- [`core.component.stake.v1.UndelegateClaim`](./action/undelegate_claim.md)
Loading