# **Proposal: parasnaps.io maintenance** **Beneficary: DDbQ9YnjeLS6DvZgvTgFvttnqJZrD12gVq4889yh9opXVS6** **Date: 20.3.2023** **Requested Amount: 25'107.21 USD** **Link: https://parasnaps.io** **E-mail address:** staking@amforc.com **Twitter:** [@tugytur](https://twitter.com/TugyTur) **Element handle:** @tugytur:matrix.org **Short description:** Parasnaps was built out of the necessity to have a high-throughput snapshot solution to be able to take fast actions. Community members that we talked to showed great interest in a solution that would allow to restore a validator in a couple of minutes. --- # 1. Context of the proposal Parasnaps was built out of the necessity to have a high-throughput snapshot solution to be able to take fast actions. Community members that we talked to showed great interest in a solution that would allow to restore a validator in a couple of minutes. ### Team credentials We are experienced in running validators since NPoS was enabled. Early last year, we founded our own company which provides dedicated and public staking solutions focusing on the Dotsama ecosystem. The company is self-funded, independent, domiciled and based in [Switzerland](https://sz.chregister.ch/cr-portal/auszug/auszug.xhtml?uid=CHE-277.593.688). ### Treasury Proposal Maintenance for the first six months of Parasnaps was covered by the Kusama [treasury](https://kusama.polkassembly.io/treasury/203). ### Central topic Parasnaps was launched in February 2022, this proposal aims to cover the costs and work generated by Parasnaps from August 2022 until its decommissioning in March 2023. # 2. Problem statement For every session, validators must send an “I’m online” heartbeat if no blocks were produced to indicate that they are live during an epoch. It is possible that the heartbeat is not sent until 60-70% of the epoch is over. Slashing would occur if more than 10% of the network is unresponsive. With an epoch period of one hour on Kusama, this means that there could be the scenario with less than 20 minutes to react to a potential issue and prevent a slashing event. Other potential issues are bugs in either rocksdb or paritydb – because of this, both DB versions must be available at all times. # 3. Proposal Objective/solution/s to point 2 The solution we built uploads daily synced snapshots for Polkadot and Kusama for both DB versions. Those snapshots are synced across five different geographical locations to prevent local outages and increase the download speed. ### DB sync/testing Snapshots are always synced from scratch if the snapshot machines are updated to a new release or if there are any changes to the DB. Before making a snapshot available to the public, we run a validator with rocksdb and paritydb for at least 24h to check for any potential issues. This led us to the discovery of multiple issues: - [paritydb breaks on upgrade](https://github.com/paritytech/polkadot/issues/5168) - [StateDb does not have PRUNING_MODE](https://github.com/paritytech/polkadot/issues/5554) ### Download There are three ways to download the snapshots as mentioned on the website with examples: - Interactive (Bash script) - Manual - Ansible (examples on how to integrate into the automation) All three options rely on a Rust binary that executes 16 concurrent downloads and keeps the results in a sorted binary tree to allow piping into stdout to directly be extracted. ### Who does this solution help? - Validator operators that need to failover in a fast manner. - Validator operators that want tested snapshots. ### Usage From merging the monthly usage reports for the s3 buckets (see below), a total of 43'332.8 GB was downloaded in the time period. Assuming an average of 170 GB for a download, this results in ca. 255 downloads in the time period, which averages to around ~1.1 downloads per day. ![](https://i.imgur.com/RpMyY1H.png) ### Operational expenses Parasnaps is hosted on AWS. We marked all related services with a corresponding tag to be able to create a report for the proposal. In October, we switched from VMs for the syncnodes to baremetal, due do the increasing resource requirements of the chain. In addition to the infrastructure cost, we included an hourly rate of $85 for labor. For the operation and maintenance we estimate 4 hours a month, which would equal to 32 hours for the last eight months. This includes operation of the related services and machines, taking care of it and ensuring it runs without issues. For testing of new snapshots and troubleshooting issues, we estimate a lower bound of 5 hours a month, which would equal 40 hours for the last eight months. # 4. Payment conditions: Specified payments below are a reimbursement for Parasnaps for the period from August 2022 to March 2023. ### Amount 25'107.21 USD ### Breakdown | Item | Cost | Notes | | -------- | -------- | -------- | | Parasnaps Domain | $0 | Already paid by treasury | | Infrastructure | $16443.41 | ![](https://i.imgur.com/VryiEb9.png)| | Baremetal | $1348.8 | 2x Baremetal for October-March (104.- CHF per node a month) | | 32h maintenance | $2720 | Estimated labor from August-March for maintenance (see [here](#Operational-expenses)) | | 40h labor | $3400 | Estimated labor from August-March for troubleshooting and testing (see [here](#Operational-expenses)) | | Total | $23'912.21 | | | Slippage + conversion fee 5% | $1195 | | | Total + slippage | $25107.21 | | ### How does this amount cover the work of the proposal? The calculations above summarize the operational costs to offer this solution publicly for the community over the last eight months. With the proposal, we can cover the costs incurred over the last eight months. # 5. Future Proposals: With warp sync in its current state, we believe Parasnaps is no longer required and has been decommissioned in March 2023.