Summary:
SPRF is a collection of tools that help you to run a smart program and track its state on a blockchain network. SPRF using normal Stellar account to track changes and history of a smart program. Each smart program should have an account on Stellar and some manage data field that show its current state.
There are some workers in the sidechain that can calculate the next state of a smart program and change manage data fields. These workers get fee from users who want change state of smart program by their input.
Goals:
- Adding the DAPPS (decentralized applications) capability to Stellar network
- Extending smart contract concept in Stellar network
- Support every programming language (by using containerization technology)
Timeline:
Sandbox (Q1, Q2 2020):
Working on security of execution
Adding execution of programs as easy as possible by users on a wallets
Creating a network of workers that is ready to accept execution tasks
Long Term:
Creating a DAPPS store (collecting and showing all dapps the network)
Create sdks for more language for communicating with workers
Description:
The SPRF is a framework for managing smart programs and their state using blockchain networks.
Is it possible to attach and detach an application from its state?
Yes. by using containerization technology (like docker) we can detach and attach state of an application whenever. For each deterministic application, if a state file attached to it and some input got to it, the same result will return by every execution.
How we can track program changes and state of program changes?
SPRF using IPFS for storing program states and inputs. Isolated programs can be saved on docker registries (like DockerHub).
Why SPRF using blockchain for tracking state?
Using a blockchain network make it easy for changing state of program by consensus.
Who it works?
The execution of program and changing state is very easy! The following steps creates a dapps application and change its state by consensus:
Workers specification:
Each worker should have an API for accepting new incoming requests from users for running smart programs and get new state. The scenario between user and worker is as follows:
- The user should collect at least "int(workers count / 2) + 1" sign to be able to submit transaction to network and change the current state of program. The user should also sign the transaction because one of operations is a payment operation from user account to smart account
- For controlling the concurrency between users, there is a field in managed data of smart account with name of “last_transaction_made_change” that shows last pre paid transaction hash created by user that successfully submitted to smart account.
Links:
Landing page:
https://stellar-sp.github.io/sprf-worker/
Proof of implementation projects:
https://github.com/stellar-sp/sprf-worker
https://github.com/stellar-sp/py-client
https://github.com/stellar-sp/account-initiator
https://github.com/stellar-sp/smart-program-vote