baseline
baseline copied to clipboard
SRI - CCSM integration discussion
Overview
This issue tackles as conditions and controls regarding deploying and calling the ccsm contract functions.
Tasks
- [ ] Discuss who and when should deploy the contract
- [ ] Allow only owner to add anchor hash to the ccsm contract
Latest agreement is as follows:
-
There is one smart contract per BPI used to store all anchor hashes across all workgroups that are active in it
-
Smart contract owner is an account controlled by the BPI
-
Smart contract contains a map of workgroup id -> content addressable hash array and a pair is created each time there is a new workgroup created
-
content addressable hash array contains the list of all of the transactions hashes, where tx hash is
txResult.hash = hashFn(
${merkelizedInvoiceRoot}${witnessHash}).toString('hex');
and is updated after each successful execution of a workstep (succesfull state change) for a given workgroup -
It is the responsibility of the account in control of the BPI to trigger the smart contract methods after events
We need a following list of issues to be implemented for this mechanism to work:
- implement the smart contract with the needed functionalities (add workgroup, add CAH...) #797
- Enable BPI to store relevant information to communicate with the smart contract (private key, address ...) #803
- trigger add workgroup onchain on workgroup creation in the BPI
- trigger add CAH on succesfull workstep execution #805
- implement an endpoint to fetch StateTreeLeafValueContent object with accompanying info based on the provided CAH #806
@biscuitdey @Therecanbeonlyone1969 @Kasshern @skosito @Ybittan please double check if i missed something and i am going to open issues