Sukhavati PoC Module
- Team Name: Sukhavati Labs
- Payment Address: 0x4756b4a72Fb08d936a9ee780f36e411B3F9E1873
- Status: Terminated
Project Overview πβ
Overviewβ
Sukhavati is a decentralized cloud service network focused on storage. It uses the MASS Proof of Capacity (PoC) protocol as its consensus protocol so that it can reuse existing PoC capacity power and quickly establish a strong consensus layer. The MASS PoC consensus algorithm is very energy efficient. After the initialization operation, it requires only a small amount of computing and IO resource consumption to maintain high security consensus, allowing most resources to be used for other meaningful work.
Currently the MASS PoC network has a total of about 230PB in capacity power, making it the second-largest PoC network. Sukhavati takes PoC as the entry point. After incorporating a wide range of PoC miners into the consensus network, Sukhavati will continue to build the needed infrastructure to serve the Web3.0 ecosystem on these PoC devices, taking full advantage of idle computing and bandwidth resources and truly decentralized network topology. Sukhavati eventually intends to build a decentralized data access gateway that covers both Web3.0 and Web2.0 storage services and that provides unified data storage, retrieval, and management services that can meet various local compliance requirements for Web3.0 applications.
After completing the first version (which is based on the original codebase) and idea validation, Sukhavati plans to migrate to the Substrate framework (planned for Q2). The powerful and flexible features such as off-chain workers, on-chain governance and runtime upgrade provided by Substrate can bring Sukhavati great convenience and enable us to easily develop the storage and content distribution functions in the future steps.
While enjoying all these features, we would like to give back to the community by providing a PoC Module for Substrate based on the MASS PoC consensus protocol, so that any blockchain developed based on Substrate can choose to use this module to implement PoC consensus and be able to reuse existing MASS PoC capacity power. This βpiggybackingβ allows them to quickly have the same underlying device resources and potential influence as we do, thereby further exploiting the idle resources of the vast number of PoC mining devices. Through the implementation of this module, we hope to establish a connection between the substrate and the PoC ecosystem, giving web3.0 builders more options and room for imagination.
Project Detailsβ
Plot Algorithm and Capacity File Importβ
The plot algorithm will generate two HashMaps, of which the latter one is kept as the capacity file.
The plot process is as follows:
- Generate a
root_key
through secp256k1/ECDSA - Using BIP-44 to derive child key pairs
(pk, sk)
from theroot_key
- Set a BitLength and runs Plot algorithm with
pk
andBL
as follows:- Generate a unique
ID = doubleSHA256(pk)
of the capacity file - For each
x in [0, 2^BL-1]
, calculatey = SHA256(βMASSβ||ID||x)
. Generate a HashMap A withy
as the index andx
as the value - For each index
y
in HashMap A, flip each bit of it to getyβ
, useyβ
as the index to find the correspondingxβ
- For each
x in [0, 2^BL-1]
and correspondingxβ
, calculatez = SHA256(βMASSβ||ID||x||xβ)
. Generate the HashMap B withz
as the index and(x, xβ)
as the value
- Generate a unique
- Use HashMap B as the efficient capacity
The import method can be derived from the above process:
- Import the existing root_key from the mass miner
- Load the existing capacity file
- Derive child keys from root_key and match the public keys with the ID of the capacity files
- We can now use these existing capacity files for our own PoC consensus
PoC Consensus Engineβ
Block Productionβ
- Get challenge
c
from previous block - The miner tries to find
(x, xβ)
and its corresponding BitLength and ID from HashMap B that satisfies:cuthash(c, bl) == cuthash(SHA256(βMASSβ||ID||x||xβ), bl)
cuthash(y, bl) == flipped(cuthash(yβ, bl))
, wherey = SHA256(βMASSβ||ID||x)
andyβ = SHA256(βMASSβ||ID||xβ)
- If the above proof is found, the miner then calculates
quality = (2^BitLength * BitLength ) / [256 - log2(H)]
, whereH = SHA256(block_timestamp // slot_length, x, x', height)
- If the quality is higher than difficulty, the miner produces the block, creates the proof sig and signs the block.
Block Validationβ
When a node receives a new block, it verifies all the signatures and PoC proof as follows:
- Verify the block signature and capacity proof signature
- Get PoC proof
(x, xβ, bl)
, publickeypk
and challengec
from block header and verify if they satisfy:cuthash(c, bl) = cuthash(SHA256(βMASSβ||doubleSHA256(pk)||x||xβ), bl)
cuthash(SHA256(βMASSβ||doubleSHA256(pk)||x)) = flipped(cuthash(SHA256(βMASSβ|| doubleSHA256(pk)||xβ)))
- Calculate quality of the proof, and verify if itβs higher than difficulty
Difficulty Adjustmentβ
The desired block time is maintained by the following difficulty adjustment algorithm on every block:
diff = parent_diff + parent_diff // 2048 * max(1 - (new_block_timestamp β last_block_timestamp) // 10, -99)
Fork Choiceβ
When there is a potential new best chain, the node checks the following rules in sequential order to make the choice:
- The one with greater total difficulty
- The one with a better proof quality
- The one with an earlier block timestamp
- If all the above conditions are the same, choose the one with a smaller block hash
Ecosystem Fitβ
The PoS/PoC consensus mechanism is starting to attract more attention with the rise of Chia. We notice that there are some other teams who are also building PoS/PoC consensus module for substrate, such as Subspace. The main difference between our protocols is that we are not trying to create a new PoC algorithm from scratch. What we want to do is to compatibly reuse the existing PoS/PoC consensus powers to form our own consensus layer and promote our blockchain to these miners, so that we can utilize their idle resources.
In this proposal, we hope to make this capability of reusing PoS/PoC consensus power available as a substrate pallet. We believe some connection can be established between the substrate ecosystem and the PoS/PoC ecosystem, bringing more options and resources to Web3.0 builders.
After establishing the underlying infrastructure, we hope to serve the Polkadot ecosystem as a parachain or parathread and provide a data access gateway for all Web3.0 DApps.
Team π₯β
Team membersβ
- Sukhavati Dev Team
Contactβ
- Contact Name: Mindaugas Savickas
- Contact Email: mindaugas@sukhavati.io
- Website: https://sukhavati.io
Legal Structureβ
- Registered Address: Vistra corporate Services Centre, Wickhams Cay II, Road Town, Tortola, VG1110, British Virgin Islands.
- Registered Legal Entity: Sukhavati Labs Ltd.
Team's experienceβ
-
Rami: Blockchain Hardware Architect and consultant with a PhD in Electrical and Computer Engineering.
-
Chen: Expert in blockchain development and crypto economy modeling.
-
Hairu: Senior backend developer with over 10 years experience.
Team Code Reposβ
https://github.com/Sukhavati-Labs/go-miner
https://github.com/Sukhavati-Labs/go-wallet
https://github.com/Sukhavati-Labs/web-wallet
https://github.com/Sukhavati-Labs/skt-data
https://github.com/Sukhavati-Labs/explorer
Development Roadmap π©β
Overviewβ
- Total Estimated Duration: 3 months
- Full-Time Equivalent (FTE): 1.5
- Total Costs: 4,000 DAI
Milestone 1 β Implement Capacity Management Palletβ
- Estimated Duration: 4 weeks
- FTE: 1
- Costs: 1,000 DAI
This milestone will provide a PoC capacity management pallet. It allows miners to do the plot operation and import existing MASS PoC keys and capacity files.
Number | Deliverable | Specification |
---|---|---|
0a. | License | Apache 2.0 |
0b. | Documentation | We will provide both inline documentation of the code and a basic tutorial that explains how to plot files and how to import existing capacity files with this module. |
0c. | Testing Guide | A guide describing how to run the tests covering the cases in 0b. |
1. | Capacity Management Pallet | This pallet will implement features include: 1) PoC key management, 2) plotting, 3) capacity import. |
2. | Test | Unit test and test cases. |
Milestone 2 β Implement Sukhavati PoC Consensus Palletβ
- Estimated Duration: 8 weeks
- FTE: 1.5
- Costs: 3,000 DAI
This milestone will provide a poc consensus pallet. Together with the capacity managemnt pallet in Milestone 1, developers can easily build their own chain that can reuse the MASS capacity power.
Number | Deliverable | Specification |
---|---|---|
0a. | License | Apache 2.0 |
0b. | Documentation | We will provide both inline documentation of the code and a basic tutorial that explains how to use this PoC consensus engine. |
0c. | Testing Guide | A guide describing how to build a PoC blockchain with this module. |
1. | PoC Consensus Pallet | This pallet will implement the Sukhavati PoC Consensus engine including block production, block validation, difficulty adjustment and fork choice. |
2. | Test | Unit test and test cases. |
Future Plansβ
- Research PoC/PoS power reuse, such as Chia.
- Help promote and develop channels of communication between blockchains based on this module and the miner community.
Additional Information ββ
Sukhavati Labs has raised a seed round of funding.
We are in contact with several PoC pools and the information we have received so far shows that PoC mining devices have a substantial amount of idle resources available, and most miners are very interested in being able to further upgrade their devices in order to provide real, meaningful use.