Quick Start¶
Application Development using CCF Overview¶
Read the CCF overview and get familiar with Core Concepts and Azure confidential computing
Build new CCF applications in TypeScript/JavaScript or C++
CCF application get started repos CCF application template and CCF application samples
Development environment¶
Virtual Machine (Creating a Virtual Machine in Azure to run CCF)
(JavaScript/Typescript) Applications¶
CCF apps can be written in JavaScript/Typescript. To test a JS/TS CCF application you need go through the following steps:
Initialise the CCF network with at least one active member and one user Opening a Network, this can be done through Proposals.
Create an application deployment proposal
Submit the app deployment proposal to the network and all members accept it through voting. This is a part of Network Governance.
Start testing of your application endpoints
Build Application¶
The application building prerequisites [CCF, NodeJS and NPM] must be installed, all will be preinstalled if you are using the devcontainer environment, otherwise you need to install them manually.
Please follow ccf-app-template build process
Testing your Application¶
There are several approaches to run and test your application.
Running the sandbox.sh script automatically starts a CCF network and deploys your application on it. The app is up and ready to receive calls and the initial governance steps are done for you
Support both ccf network types [virtual - enclave (TEE hardware)]
No initial governance steps required
A CCF network can be started using Docker containers; please check the docker file samples
Support both ccf network types [virtual - enclave (TEE hardware)]
Initial governance steps are required to initialize, deploy your app, and start the network. check Network governance section
Start a CCF network using docker files. please follow ccf-app-template
The network is started with one node and one member, you need to execute the initial governance steps to initialize the network, check Network governance section
The application can be tested using
cchost
and CCF config file, To Start a test CCF network on a Linux environment, it requires CCF to be intalled or you can create a ready CCF VM using Creating a Virtual Machine in Azure to run CCFSupport both ccf network types [virtual - enclave (TEE hardware)]
Initial governance steps are required to initialize, deploy your app, and start the network. check Network governance section
Start a CCF network using cchost and CCF node config file. please follow ccf-app-template
The network is started with one node and one member, you need to execute the initial governance steps to initialize the network, check Network governance section
To test your application using Managed CCF, you can create Azure Managed CCF service on your subscription, the service will create a ready CCF network
Support only a ccf network in enclave mode (TEE hardware)
No initial governance steps required to start up your network, but you need to use governance to propose your application
First, create the network’s initial member certificate, please check Certificates generation
Create a new Azure Managed CCF serivce (the initial member certificate required as input)
Build the application and create a Deployment proposal
Deploy the application proposal, Submitting a New Proposal
Create and submit proposal for Adding Users
Testing: Application Endpoints¶
To check samples on how to test your application endpoints, please check these repositories:
C++ Applications¶
CCF apps can also be written in C++. This offers better performance than JavaScript apps but requires a compilation step and a restart of the CCF node for deployment. please check ccf-app-template repository.
The C++ sample app is located in the `cpp/
<cpp/>`__ directory.
Build C++ app¶
Please check ccf-app-template build process
Run C++ app: Using Sandbox.sh¶
Please check run ccf-app-template using sandbox.sh
Run C++ app: Using Docker¶
Please check run ccf-app-template using docker
Network Governance¶
A Consortium of trusted Members governs the CCF network. Members can submit proposals to CCF and these proposals are accepted based on the rules defined in the Constitution. Governance changes are submitted to a network as Proposals, and put to a vote from members.
Note
The initial member’s certificate and private key, must be generated before starting a CCF network, please check Adding New Members .
Activating network members¶
By default the CCF network needs at least one member to be started, after the network is started this member must be activated.
Adding network users¶
Users directly interact with the application running in CCF. Their public identities should be voted in by members before they are allowed to issue requests. Once a CCF network is successfully started and an acceptable number of nodes have joined, members should vote to open the network to Users. First, the identities of trusted users should be generated, see Generating Member Keys and Certificates and Adding Users docs
Application deployment¶
The native format for JavaScript applications in CCF is a JavaScript application bundle, or short app bundle. A bundle can be wrapped directly into a governance proposal for deployment.
Open network for users¶
Once users are added to the network, members should create a proposal to open the network, Other members are then able to vote for the proposal using the returned proposal id.
Once the proposal has received enough votes under the rules of the Constitution (ie. ballots which evaluate to true), the network is opened to users. It is only then that users are able to execute transactions on the deployed application.