Building on KIRA
Building on KIRA is intended to replicate classical Web2 design patterns where the developer creates a new REST-API project (server side) and pairs it with his frontend application (client side). The KIRA network acts as a decentralized middleware and infrastructure layer ensuring that applications are accessible and have the resources needed to run. As long the server application remains deterministic and can be re-executed or otherwise proven that execution happened in the expected way (e.g. by using a set of sequenced inputs, ZK proofs, or even AI) it is possible to trustlessly verify the execution and thus transition the application from one state of its database to another. Submitting state hashes of the application database into the KIRA base layer by the application leader elected in each session (database snapshot) allows for achieving consensus and thus for composability (value transfer and data communication) between the apps.
To create an example KIRA application, a developer would:
- Create a deterministic server application and expose a protocol-defined endpoint for receiving user input from the INTERX. The next step is then to package the server application into a docker container.
- Develop a secondary containerized “verification” application that can either re-compute the same results given the same set of ordered inputs from the INTERX or use other techniques, such as ZK proofs, for lightweight verification of the correct execution.
- Develop a frontend application that can communicate with the server application for users to be able to experience the app.
- Submit a transaction to the KIRA blockchain specifying the location of execution and verification docker containers, configuration file defining ports to be exposed/proxied via INTERX, and resources necessary to run the application.
- Await sufficient KEX amount to be bonded into ILO and validators with sufficient hardware resources to signal they are willing to run the app.
If all the conditions above are met users will be able to query any of the INTERX nodes available on the KIRA network to locate a subnet of INTERX nodes that provide access to the app and expose its interfaces thus making interaction possible in a classical Web2 client-server manner.