53 lines
2.3 KiB
Markdown
53 lines
2.3 KiB
Markdown
# dcrvsp
|
|
|
|
[](https://github.com/jholdstock/dcrvsp/actions)
|
|
[](http://copyfree.org)
|
|
[](https://goreportcard.com/report/github.com/jholdstock/dcrvsp)
|
|
|
|
## Design decisions
|
|
|
|
- [gin-gonic](https://github.com/gin-gonic/gin) webserver for both front-end and API.
|
|
- Success responses use HTTP status 200 and a JSON encoded body.
|
|
- Error responses use either HTTP status 500 or 400, and a JSON encoded error in the body (eg. `{"error":"Description"}')
|
|
- [bbolt](https://github.com/etcd-io/bbolt) k/v database.
|
|
- Tickets are stored in a single bucket, using ticket hash as the key and a
|
|
json encoded representation of the ticket as the value.
|
|
- [wsrpc](https://github.com/jrick/wsrpc) for dcrwallet comms.
|
|
|
|
## MVP features
|
|
|
|
- When dcrvsp is started for the first time, it generates a ed25519 keypair and
|
|
stores it in the database. This key is used to sign all API responses, and the
|
|
signature is included in the response header `VSP-Signature`. Error responses
|
|
are not signed.
|
|
- VSP API as described in [dcrstakepool #574](https://github.com/decred/dcrstakepool/issues/574)
|
|
- Request fee amount (`GET /fee`)
|
|
- Request fee address (`POST /feeaddress`)
|
|
- Pay fee (`POST /payFee`)
|
|
- Ticket status (`POST /ticketstatus`)
|
|
- Set voting preferences (`POST /setvotebits`)
|
|
- A minimal, static, web front-end providing pool stats and basic connection instructions.
|
|
- Fees have an expiry period. If the fee is not paid within this period, the
|
|
client must request a new fee. This enables the VSP to alter its fee rate.
|
|
|
|
## Future features
|
|
|
|
- Write database backups to disk periodically.
|
|
- Backup over http.
|
|
- Status check API call as described in [dcrstakepool #628](https://github.com/decred/dcrstakepool/issues/628).
|
|
- Accountability for both client and server changes to voting preferences.
|
|
- Consistency checking across connected wallets.
|
|
|
|
## Notes
|
|
|
|
- dcrd must have transaction index enabled so `getrawtransaction` can be used.
|
|
|
|
## Issue Tracker
|
|
|
|
The [integrated github issue tracker](https://github.com/jholdstock/dcrvsp/issues)
|
|
is used for this project.
|
|
|
|
## License
|
|
|
|
dcrvsp is licensed under the [copyfree](http://copyfree.org) ISC License.
|