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

Various vspd updates. #1171

Merged
merged 1 commit into from
May 19, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 9 additions & 7 deletions docs/advanced/operating-a-vsp.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,33 @@ This is a high level guide of how to set up a VSP, and the steps required to lis

## Operator Requirements

* Familiarity with system administration work on Linux, e.g. configuring and running nginx, MySQL, ssh, IPSec, duplicity, monit
* Familiarity with system administration work on Linux, e.g. configuring and running nginx, ssh, IPSec, duplicity, monit
* Familiarity with compiling from source, setting up and maintaining `dcrd` and `dcrwallet`
* Ability to effectively communicate in English
* Willingness to stay in touch with the Decred community for important news and updates
* Availability to update VSP binaries when new releases are produced
* Operators should be pairs of individuals or larger groups, e.g. corporate entities, so that the unavailability of a single person does not lead to extended outages in their absence.
* Operators should ideally be pairs of individuals or larger groups, e.g. corporate entities, so that the unavailability of a single person does not lead to extended outages in their absence

---

## VSP Requirements

There are several requirements for the VSP configuration:

* At least one machine to host the web front end, handling web connections from VSP users and allowing them to configure their account.
* At least one machine to host the web front end, handling web connections from VSP users.
* At least three machines to host voting wallets. Necessary because at least one voting wallet needs to be connected to the network and ready to vote at any time.
* Each voting wallet should be connected to a dedicated instance of `dcrd`.
* Each voting wallet should be connected to a dedicated local instance of `dcrd`.
* The physical or virtual machines used to host the configuration must be spread across 3 or more physical locations.
* More specifically, voting wallets must be in 3+ physically separate locations.
* The web frontend must have an IP that is distinct from those of the voting wallets, and is ideally located in another physical location.
* Source code for the VSP is available [on GitHub](https://github.com/decred/dcrstakepool) and binaries must be compiled from source.
* Source code for the VSP is available [on GitHub](https://github.com/decred/vspd) and binaries must be compiled from source.
* The VSP must be run on testnet for 1 week to confirm it is working properly. Uptime and number of votes made versus missed will be checked.
* The VSP must be run on mainnet in test mode (no public access) until a VSP operator demonstrates they have successfully voted 1 ticket of their own using the VSP.
* The operator must demonstrate their monitoring solution by temporarily sending alerts to a specified email address. An example monit configuration will be supplied to avoid requiring operators to setup their own monitoring solution from scratch. After this has been verified, the VSP will be opened to the public.
* The operator must have an adequate monitoring solution in place, ideally alerting on server downtime and application error logging.

---

## Further Information

More detailed instructions on how to setup a VSP can be found on GitHub in the [dcrstakepool repo](https://github.com/decred/dcrstakepool). For further support you can contact the [Decred community](https://decred.org/community).
More detailed instructions on how to setup a VSP can be found on GitHub in the [vspd repo](https://github.com/decred/vspd).
For further support you can contact the [Decred community](https://decred.org/community).
2 changes: 1 addition & 1 deletion docs/faq/proof-of-stake/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The ticket price is always refunded, no matter if your ticket votes, misses or e

#### 4. What is a Voting Service Provider?

A Voting Service Provider (VSP) is similar in some ways to a PoW mining pool, but for the PoS system. Through the options in your Decred wallet, you can give your voting rights to a VSP. If your ticket is selected to vote, the VSP will cast the vote for you and you are rewarded with the PoS reward minus the VSP fee (usually 1-5%). Unlike mining pools, the PoS reward is not split amongst the users of the VSP. The full reward goes to the owner of the specific ticket that voted.
A Voting Service Provider (VSP) is similar in some ways to a PoW mining pool, but for the PoS system. Through the options in your Decred wallet, you can share your voting rights with a VSP. If your ticket is selected to vote, the VSP will cast the vote for you and you are rewarded with the PoS reward. Unlike mining pools, the PoS reward is not split amongst the users of the VSP. The full reward goes to the owner of the specific ticket that voted.

A VSP allows you to buy tickets and vote without the requirement of maintaining an online and unlocked wallet. It is important to note that your funds never leave your wallet. You are not sending anything to the VSP, just giving it authority to vote on your behalf. A VSP cannot access your funds.

Expand Down
16 changes: 4 additions & 12 deletions docs/faq/proof-of-stake/voting-service-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,19 @@ It is certainly possible, but one of the things that all VSPs should support is

#### 5. What safeguards are in place to stop Voting Service Provider (VSP) owners disappearing with the funds in the tickets they vote for?

The current VSP design is such that the VSP can NOT steal the funds. You are only delegating voting rights (and in reality it is a 1-of-2 multisig which means either you OR the VSP can vote). The ticket purchase contains a consensus-enforced commitment for the final subsidy address, so there is simply no way for the VSP to steal the funds.
The current VSP design is such that the VSP can NOT steal the funds. You are only sharing the ability to vote on tickets, and not the ability to spend any of your funds. The ticket purchase contains a consensus-enforced commitment for the final subsidy address, so there is simply no way for the VSP to steal the funds.

The worst that would happen if a VSP owner disappears is the votes will be missed which results in the ticket being revoked which in turn causes the original coins to go back to the original coin owner (minus the initial transaction fee of course). However, as mentioned previously, because the ticket is a 1-of-2 multisig, each user could run their own wallet in order to vote should the VSP owner disappear.
The worst that would happen if a VSP owner disappears is the votes will be missed which results in the ticket being revoked, which in turn causes the original coins to go back to the original coin owner (minus the initial transaction fee). However, it is possible for the ticket owner to run their own wallet in order to vote should the VSP owner disappear.

---

#### 6. Where can I see an example of a Voting Service Provider (VSP) ticket on the block explorer?

VSPs involve 'Dc' addresses since the VSP uses pay-to-script-hash addresses. For example, see txid: [c0abc0ec63a8de15550f067e2b6fde28f0432fb91b938574b282daa69f914103](https://dcrdata.decred.org/tx/c0abc0ec63a8de15550f067e2b6fde28f0432fb91b938574b282daa69f914103).

---

#### 7. What happens if my Voting Service Provider (VSP) goes down?
#### 6. What happens if my Voting Service Provider (VSP) goes down?

In the unlikely scenario your VSP goes down permanently, you can still vote your
own tickets, as well as revoke any missed or expired tickets.

Voting rights are assigned to a 1-of-2 multisig address, where one of the required keys belongs to your wallet. This allows you to configure a wallet with your VSP's pool script imported and set it up for solo voting, essentially becoming your own VSP. This will allow you to vote or revoke tickets. Note that the VSP's pool script is necessary to perform these actions. For this reason, it is important to always keep a backup of your VSP's pool script, which can be found on your VSPs webpage. For details on setting up a wallet for solo voting, see the [Solo Proof-of-Stake (PoS) Voting](../../advanced/solo-proof-of-stake-voting.md) page.

---

#### 8. My VSP went down and I lost the redeem script, is there a way to recover it?
#### 7. My VSP went down and I lost the redeem script, is there a way to recover it?

When a ticket votes or is revoked, that redeem script is revealed as a part of the process. Redeem scripts that have been used at least once to vote or revoke a ticket can be [recovered using Decred's block explorer](../../proof-of-stake/redeem-script.md#recovery-methods).
8 changes: 0 additions & 8 deletions docs/privacy/cspp/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,6 @@ The current implementation has several limitations. Mainly the use of a centrali

The anonymity provided by CoinShuffle++ can be lost if wallet addresses are reused, or if change outputs are not handled correctly. It is imperative that addresses are never reused and that extended public keys of mixed and voting accounts are not revealed to other parties.

The initial code only supports the CLI wallet, dcrwallet, and solo stakers. To implement CSPP beyond the CLI there are some issues that must be dealt with:

+ **dcrwallet:** Changes must be made to support unlocking individual accounts while other accounts keys are locked. CSPP requires hot keys to create on-demand transactions at the end of the timed process.

+ **Decrediton:** UI/UX must be made so that users have a simple way to opt-in into privacy. The UI must ensure users do not send funds from other accounts besides their mixed account, prevent receiving funds into accounts besides the change account, and use the mixed account to buy tickets.

+ **VSP API:** A new VSP API for buying tickets is needed. To fully support privacy, the way how users buy tickets through VSP must be substantially changed. Proposed changes are already outlined [here](https://github.com/decred/dcrstakepool/issues/574), and it entails moving from an account-based system to a ticket-based system, where users pay VSP fees upfront, and VSP tickets are indistinguishable from solo tickets.

---

## Further Information
Expand Down
4 changes: 2 additions & 2 deletions docs/proof-of-stake/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ The **Ticket Fee** (`ticketfee`) is the fee that must be included in the ticket

**When a ticket is called to vote, the wallet that has voting rights for that ticket must be online.** If the wallet is not online to cast its vote, the ticket will be marked as `missed` and you will not receive a reward for that ticket. In practice, **Solo Voters** often run voting wallets on a number of servers on different continents, to minimize the chance of their tickets missing a call to vote.

**Voting Service Providers (VSPs)** (formerly "Stakepools") offer a service whereby ticket buyers can delegate the act of voting to the VSP. The ticket-buyer instructs the VSP how their ticket should vote on any open rule change proposals, but transfers voting rights to the VSP to take advantage of the voting infrastructure they provide (i.e. at least three always-online servers).
**Voting Service Providers (VSPs)** offer a service whereby ticket buyers can delegate the act of voting to the VSP. The ticket-buyer instructs the VSP how their ticket should vote on any open rule change proposals, and shares voting rights with the VSP to take advantage of the voting infrastructure they provide (i.e. at least three always-online servers).

VSPs charge a fee for this service, which is taken out of the reward returned upon a successful vote. This fee is generally 5% or less. A [list of VSPs](https://decred.org/vsp/) is maintained on decred.org. VSPs do not take custody of DCR. By using them, you only delegate the voting rights of a ticket.
VSPs charge a fee for this service, which is paid upfront before the ticket is added to the VSPs voting wallets. This fee is generally 5% or less. A [list of VSPs](https://decred.org/vsp/) is maintained on decred.org. VSPs do not take custody of DCR. By using them, you only delegate the voting rights of a ticket.

---

Expand Down
2 changes: 1 addition & 1 deletion docs/wallets/cli/dcrwallet-tickets.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Your `ticketfee` is the DCR/kB rate you will pay to have your ticket purchase be

Why are ticket fees important? Usually the default fee of 0.0001 is enough to get your tickets mined, however there are extremely rare circumstances where an increased ticket fee may be beneficial. When ticket demand outpaces supply (there are only a maximum of 2880 tickets available at each price interval) a situation is created where stakeholders can increase their ticket fees in order to get their ticket purchases mined ahead of others offering lower fees. This type of "fee wars" scenario has not occurred since the new ticket price algorithm was introduced in July 2017.

Third party sites such as <https://dcrstats.com> can be used to find the average ticket fee in the mempool.
The [block explorer](https://dcrdata.decred.org/mempool) can be used to find the average ticket fee in the mempool.

##### Ticket Price

Expand Down