Technical specifications and blockchain architecture details for Phala Network.
phala-node
: The Substrate-based blockchain node;pRuntime
: The Secure Enclave runtime. Contracts run in pRuntime
;pherry
: The Substrate-Enclave bridge relayer. Connects the blockchain and pRuntime
;pRuntime
via pherry
.
As illustrated, the Phala blockchain serves as a canonical source of valid transactions. Only submitted transactions can be accepted by pRuntime
, and they will be processed in the same order as they are on the blockchain. We implement a light validation client in pRuntime
to determine whether valid transactions are accepted in an expected order. Also, a key rotation mechanism will be introduced to prevent the replay of historical transactions. The great thing is that pRuntime
hides all these complex implementation details from you to implement confidential contracts like developing ordinary programs.
pherry
works as the bridge between Phala blockchain and pRuntime
. It ensures that all the transactions on the blockchain are faithfully forwarded to pRuntime
and that all the enclave instances are running an unmodified version of pRuntime
. While it is worth noting that pRuntime
does not trust pherry
, it will still validate every block and transaction it receives from pherry
.