Fat Contract is the programming model adopted by Phala Network. Fat Contract is NOT smart contract.
Instead, it aims to provide the rich features that ordinary smart contracts cannot offer, including:
- CPU extensive computation: exclusive off-chain execution at the full CPU speed
- Network access: the ability to send the HTTP requests
- Low latency: non-consensus-sensitive operations may not hit the blockchain at all, removing the block latency
- Strong consistency: consensus-sensitive operations remain globally consistent
- Confidentiality: contract state is hidden by default unless you specifically expose it via the read call
Fat Contract is 100% compatible with Substrate’s
pallet-contracts. It fully supports the unmodified ink! smart contracts. Therefore you can still stick to your favorite toolchain including
@polkadot/contract-api, and the Polkadot.js Extension.
Compared its pervious version, the latest Fat Contract is also evolving in the following aspects:
- Support HTTP Request feature in ink! contract. Previously, we have shown that we can run unmodified ink! contracts in Phala’s Secure Workers. While to use the killer HTTP Request feature, a developer has to fork the phala-blockchain codebase and write the Native Contract. In the new release, we support HTTP Request feature in ink! contract and make it an ink! contract extension. It provides HTTP request and other crypto-related functionality for ink! contract;
- Testnet goes alive. In the old time, our developers have to run a local testnet for contract development, which can be time-consuming. Now we have enabled the Phala Testnet (PoC 5), so the contract development can be easy;
- Use Fat Contract to run unmodified x86 programs. We have present a demo to use Fat Contract to run the unmodified rendering engine Blender with the help of Gramine project. This means the public decentralized render service is on its way. This also proves Fat Contract’s potentials to run complicated real-world programs.