Systems and methods for trusted chain code system
A method of generating a trusted chain code (“TCC”) message, comprising: receiving a smart contract whose execution causes a transfer of value in response to at least one of an occurrence of an event or a fulfillment of a condition, wherein the smart contract is digitally signed by a first entity private key and a second entity private key; generating a chain code comprising a hash of a chain code of the smart contract, the chain code corresponding to at least one of an occurrence of an event or a fulfillment of a condition of the smart contract; and posting the TCC message to a distributed ledger, wherein an execution of a portion of the chain code in response to at least one of the occurrence of the event or the fulfillment of the condition is validated against corresponding chain code in the chain code manifest.
1. A method, comprising:
receiving, by a computing system, a smart contract whose execution causes a transfer of value in response to at least one of an occurrence of an event or a fulfillment of a condition;
generating, by the computing system, a chain code manifest, the chain code manifest comprising a hash of a chain code of the smart contract, the chain code corresponding to the at least one of the occurrence of the event or the fulfillment of the condition of the smart contract;
generating a trusted chain code (“TCC”) message to comprise a signed attribute cryptographically bound to the chain code manifest; and
posting, by the computing system, the TCC message to a distributed ledger,
wherein an execution of a portion of the chain code in response to the at least one of the occurrence of the event or the fulfillment of the condition is validated against a corresponding chain code in the chain code manifest.
2. The method of claim 1 , wherein the signed attribute is cryptographically bound to the chain code manifest under a digital signature in a message.
3. The method of claim 1 , further comprising generating the TCC message by time stamping the chain code manifest using a trusted timing authority to generate a time stamp token.
4. The method of claim 1 , further comprising generating the TCC message by:
digitally signing the smart contract using SignedData cryptographic message syntax to generate the TCC message; and
binding the chain code manifest to the TCC message via an attribute of the TCC message.
5. The method of claim 1 , further comprising generating an event journal entry that comprises a hash of the TCC message and a time stamp token from a trusted timing authority.
6. The method of claim 1 , wherein the chain code manifest comprises a plurality of hashes, each hash in the plurality of hashes corresponding to a hash of a chain code associated with a response to the at least one of the occurrence of the event or the fulfillment of the condition.
7. A system comprising:
a processor; and
a non-transitory machine readable medium with instructions stored thereon that, when executed by the processor, cause the processor to:
receive a smart contract whose execution causes a transfer of value in response to at least one of an occurrence of an event or a fulfillment of a condition;
generate a chain code manifest, the chain code manifest comprising a hash of a chain code of the smart contract, the chain code corresponding to the at least one of the occurrence of the event or the fulfillment of the condition of the smart contract;
generate a trusted chain code (“TCC”) message to comprise a signed attribute cryptographically bound to the chain code manifest; and
post the TCC message to a distributed ledger,
wherein an execution of a portion of the chain code in response to the at least one of the occurrence of the event or the fulfillment of the condition is validated against a corresponding chain code in the chain code manifest.
8. The system of claim 7 , wherein the signed attribute is cryptographically bound to the chain code manifest under a digital signature in a message.
9. The system of claim 7 , the processor is further caused to generate the TCC message by time stamping the chain code manifest using a trusted timing authority to generate a time stamp token.
10. The system of claim 7 , the processor is further caused to generate the TCC message by:
digitally signing the smart contract using SignedData cryptographic message syntax to generate the TCC message; and
binding the chain code manifest to the TCC message via an attribute of the TCC message.
11. The system of claim 7 , the processor is further caused to generate an event journal entry that comprises a hash of the TCC message and a time stamp token from a trusted timing authority.
12. The system of claim 7 , wherein the chain code manifest comprises a plurality of hashes, each hash in the plurality of hashes corresponding to a hash of a chain code associated with a response to the at least one of the occurrence of the event or the fulfillment of the condition.
13. At least one non-transitory computer readable medium having computer-executable instructions embodied therein that, when executed by at least one computing system, causes the at least one computing system to:
receive a smart contract whose execution causes a transfer of value in response to at least one of an occurrence of an event or a fulfillment of a condition;
generate a chain code manifest, the chain code manifest comprising a hash of a chain code of the smart contract, the chain code corresponding to the at least one of the occurrence of the event or the fulfillment of the condition of the smart contract;
generate a trusted chain code (“TCC”) message to comprise a signed attribute cryptographically bound to the chain code manifest; and
post the TCC message to a distributed ledger,
wherein an execution of a portion of the chain code in response to the at least one of the occurrence of the event or the fulfillment of the condition is validated against a corresponding chain code in the chain code manifest.
14. The non-transitory computer readable medium of claim 13 , wherein the signed attribute is cryptographically bound to the chain code manifest under a digital signature in a message.
15. The non-transitory computer readable medium of claim 13 , the at least one computing system is further caused to generate the TCC message by time stamping the chain code manifest using a trusted timing authority to generate a time stamp token.
16. The non-transitory computer readable medium of claim 13 , the at least one computing system is further caused to generate an event journal entry that comprises a hash of the TCC message and a time stamp token from a trusted timing authority.
17. The non-transitory computer readable medium of claim 13 , wherein the chain code manifest comprises a plurality of hashes, each hash in the plurality of hashes corresponding to a hash of a chain code associated with a response to the at least one of the occurrence of the event or the fulfillment of the condition.