filecoin-project / devgrants

👟 Apply for a Filecoin devgrant. Help build the Filecoin ecosystem!
Other
377 stars 308 forks source link

Hamster #794

Closed ydpings closed 2 years ago

ydpings commented 2 years ago

Opasden Grant Proposal: Hamster

Name of Project:hamster

Proposal Category:core-dev、app-dev、Community、Metaverse

Proposer: ydpings

Do you agree to open source all work you do on behalf of this RFP and dual-license under MIT, APACHE2, or GPL licenses?: yes

Project Description

Hamster is a decentralized computing network based on the underlying chain. It aims to provide users with cost-effective computing servers. It is a decentralized platform for leasing computing resources that can be performed to rent idle computing resources

Currently there are many cloud computing service vendors providing cloud computing services, but currently with the expansion of services, the price of cloud computing services is gradually stabilized and high, and most of the cloud computing services are purchased on an annual basis, which causes great waste for current users who may use them for a short period of time, while the world's hardware capacity is gradually increasing today, and people have more and more idle computer products on hand. The goal of our product is to utilize the current idle computing resources in people's hands in a decentralized way, so that users who need it can use computing services in a cost-effective way.

Our team aims to build a complete platform for leasing idle computing resources. The decentralized computing resource leasing function is realized by using substrate framework pallet, which can be leased and traded on the chain, and the link and use of computing resources can be done through the p2p network protocol under the chain after signing the lease agreement on the chain.

Value

Our current goal is to provide distributed shared computing power. After this milestone is completed, we will be able to build our own ecosystem based on resources. That is, when everyone is willing to add their free resources to the hamster network, it can be assumed that there are near-infinite computing resources in the network, and more quality services can be built and constructed in the hamster network. For example, service providers no longer need to rely on the support of a single cloud vendor, but only need to use the computing resources in the hamster network, and the system automatically schedules the resource arithmetic needed for the services to build their own services in the form of edge computing. In addition to this, we can also provide some toolkits so that these computing resources can participate in other services with one click, such as becoming a chain node of Thegraph, so that they can participate in other networks, and later on, we can also use incentives to encourage people to develop toolkits for different blockchain ecosystems. When more and more people and more service providers participate in the hamster network, maybe it can become a truly decentralized metaverse service cornerstone.

Project Difficulties: Shared computing arithmetic proof, arithmetic communication security, node deployment automation. Solution. Shared computing arithmetic proof: Shared arithmetic proof is based on a secure retrieval mechanism, and it is proposed to use a variety of detection means, detectors based on a random approach through different ways to prevent malicious simulation by the resource provider, and provide arithmetic proof through a variety of random detection methods. Arithmetic communication security adopts self-researched encryption algorithms, and communicates the encryption and decryption scheme through a two-way link between the client and the resource provider to enable secure data transmission in the shared resource network. Node deployment automation: Different node service projects correspond to different resource node deployments, we use plug-in form for isomorphic design to summarize the same deployment mechanism, and do plug-in processing of node deployment with cloud-native technology so that different blockchain services can be deployed with one click

Deliverables

Hamster is composed of Hamster nodes, Hamster resource providers, Hamster clients, Hamster gateways, and Hamster front-end pages. image Hamster Node: is a custom node built on Substrate 3.0.

pallet_provider: performs resource provider registration and provider resource information storage, and provides a computational marketplace pallet_resource-order: performs resource lease order functions and lease agreement execution pallet_gateway: The gateway mainly has the following functions: gateway registration, gateway heartbeat detection, gateway status reset, gateway drop penalty, and receive rewards. The main role is to add the gateway as an important player in the shared computing platform Hamster Gateway: p2p gateway with public IP, used to link information between resource provider and resource user, built with libp2p component, is the cornerstone of the leased resource availability, can register itself to Hamster Node. That includes the Register, Receive rewards and Configuration modules.

Register: Register Gateway information to Hamster Node. Receive rewards: Revenue for those who provide gateway resources. Configuration: Basic configuration of p2p gateway information. Hamster Provider: can provide compute resources and register them with Hamster Node. Compute resources are provided using both vm virtual machine technology and docker technology. Currently vm virtual machine technology is used to better protect user privacy. That includes the Initialize configuration, Resource details, Account information and Configuration information modules.

Initialize configuration: Initialize configuration, including p2p seed node configuration, p2p port configuration. Resource details: Available spare resource specifications (cpu, memory, etc.), and price. Account information: Provide the import of the substrate account, provide the pledge of the deposit before the service, etc. Configuration information: resources that have not reached a transaction are offline at any time, resource specifications, price configuration, etc. Hamster Client: After purchasing compute resources in the front-end marketplace, users can view them through the client and link to them. That includes the Market, My order and My resource modules.

Market: A trading market where computing power providers submit idle computing power to the market and configure prices. The client can choose the configuration and price resources to be purchased to form a transaction contract. My Orders: List and details of all resource orders I have purchased. My resources: The list of resources corresponding to the current valid order, the client app can establish a connection with the remote resources through the list of resources. Hamster Front End: Hamster Dapp, which allows users to purchase compute resources that have already been provided, and pay a certain Token to purchase a certain amount of time to use the compute resources. We can pay by the hour for more flexible use.

Project Flow image

Proof of Concept The current project is in the primary stage of validation of the entire business process, the Gateway module has not yet been completed, this is the goal of our subsequent planning.

Project page Resource Registration image Resource Purchase image Resource Usage image

Development Roadmap

Overview Total Estimated Duration: 2 months Full-Time Equivalent (FTE): 4 FTE Total Costs: $25,600 Milestone 1 Example — Implement Hamster Client and Provider Modules Estimated duration: 1 month FTE: 4 Costs: $12,800

Number | Deliverable | Specification -- | -- | -- 0a. | License | Apache 2.0 0b. | Documentation | We will provide online documentation of the code and a basic tutorial that includes1. Hamster Client installation tutorial2. Hamster Client usage tutorial3. Hamster Provider installation tutorial4. Hamster Provider usage tutorial5. Hamster Chain installation tutorial6. Hamster Chain usage tutorial 0c. | Testing Guide | Core functions will be fully covered by unit tests to ensure functionality and robustness. In the guide, we will describe how to run these tests. 01. | Hamster Client | We will create a desktop client that will have Market,My order and My resource module.We will provide a desktop (windows, macos,linux) app based on wails to achieve1: Market inquiry and management of purchased resources,2: The point-to-point communication between the client and the computing resource provider.3: Query historical orders4: Partial fee refund for defaulted ordersTech stack: go+wails+go-libp2p+vue.js+polkadot.js 02. | Hamster Provider | We will create a a resource provider server that will have Initialize configuration,Resource details,Account information and Configuration information module.The resource provider will use the idle resources of the machine, register in the market, and declare that it can provide rental. When the provided virtual machine reaches a transaction in the market, the resource provider provides the virtual machine with the corresponding quota for the remote purchaser to use according to the agreement. The resource provider will establish a p2p connection with the used client for remote management, such as ssh, rdesktop, etc.Our initial idea is to use the libvirt scheme to implement the management of virtual machines. (Windows uses Hyper-V)We will support these operating systems: Windows 10, Ubuntu 18+, CentOS 7+Tech stack: go+go-libp2p+libvirt+go-substrate-rpc-client+gin 03. | Hamster Provider: web app | Web app is a set of web management tools of Provider. Through this set of management tools, users can share or stop sharing idle resources for their own use, set prices for their own idle resources, adjust the specifications of idle resources provided, and modify the provisioning services of idle resources. period, etc. And when a transaction is terminated normally, the desired compensation can be obtained through the contract. (Providing idle resource services requires a certain pledge. After the transaction is breached, part of the pledge deposit will be deducted. If the pledge deposit is too low, other people will not be able to see this idle shared resource in the market)Tech stack: vue.js+polkadot.js+Node.js 04. | Hamster chain | pallet_provider, pallet_resource-order modifications and optimizations due to the need to optimize and adapt already developed pallets when adding features for customers. As code delivery of the underlying framework, there are two integrated pallets 05. | Whitepaper | Preparation of project white papers

Milestone 2 Example — Implement Hamster Gateway Modules Estimated duration: 1 month FTE: 4 Costs: $12,800

Number | Deliverable | Specification -- | -- | -- 0a. | License | Apache 2.0 0b. | Documentation | We will provide online documentation of the code and a basic tutorial that includes1. Hamster Gateway installation tutorial2. Hamster Gateway usage tutorial 0c. | Testing Guide | Core functions will be fully covered by unit tests to ensure functionality and robustness. In the guide, we will describe how to run these tests. 0d. | Article | We will write an article or tutorial that explains the work done as part of the grant. 1. | Hamster Gateway | We will create a desktop client that will have Register, Receive rewards and Configuration module.Tech stack: go+go-libp2p+libvirt+go-substrate-rpc-client+gin 2. | Hamster Node: pallet_gateway | We will create a Substrate module that will have Register gateway,Receive rewards etc function. 3. | Hamster Gateway: web app | We will create a web app integrated in the Hamster Gateway, to let users easily interact with our Hamster Gateway function module.Tech stack: vue.js+polkadot.js+Node.js 4. | Hamster chain | Add a gateway module in the Hamster chain, to enable users to share gateway resources with public IP , receive rewards, etc.

Total Budget Requested

Refer to the development route

Maintenance and Upgrade Plans

Refer to the development route

Team

Team Members

1.Teng Liang 2.Haijiang Mo 3.Jianguo Sun 4.Zhiwei Li

Team Member LinkedIn Profiles

Teng Liang: Currently a team project leader with 8 years of software development experience, designed in the areas of Cloud Computing, Cloud Native, DevOps. and familiar with Java/Go/Rust languages and Solidity smart contract development.

Haijiang Mo: CTO of the team, with 10 years of software development experience. He is familiar with Go/Rust/Java/Python/Javascript/Typescript and has worked in cloud computing, cloud native, DevOps.

Jianguo Sun : Full-stack engineer with three years of development experience. And familiar with Go/Rust/Java/Python/Javascript/Typescript, front-end and client-side development.

Zhiwei Li: Graduate student in Computer Science, Substrate pallet developer.

Team Website

Hamster is currently maintained on Github, no website has been created yet

Team code repositories

https://github.com/hamster-shared/

Additional Information

1.Route:Official Website

2.Email:yan19940724@gmail.com

Future Plans Our current goal is to provide distributed shared computing power. After this milestone is completed, we will be able to build our own ecosystem based on resources. That is, when everyone is willing to add their free resources to the hamster network, it can be assumed that there are near-infinite computing resources in the network, and more quality services can be built and constructed in the hamster network. For example, service providers no longer need to rely on the support of a single cloud vendor, but only need to use the computing resources in the hamster network, and the system automatically schedules the resource arithmetic needed for the services to build their own services in the form of edge computing. In addition to this, we can also provide some toolkits so that these computing resources can participate in other services with one click, such as becoming a chain node of Thegraph, so that they can participate in other networks, and later on, we can also use incentives to encourage people to develop toolkits for different blockchain ecosystems. When more and more people and more service providers participate in the hamster network, maybe it can become a truly decentralized metaverse service cornerstone.

ErinOCon commented 2 years ago

Hi @ydpings, this project has been approved! We will send an email to discuss next steps.

ydpings commented 2 years ago

@ErinOCon Hello, please contact this email: duoping.yan@tntlinking.com

ErinOCon commented 2 years ago

Thanks, @ydpings! I will resend using this email.

Alvis1998 commented 1 year ago

@ErinOCon Please send emails to this email address in the future instead: hamster@hamsternet.io thank you!