Block chain Fabric introduces decentralized governance

Assignment # 1:

Blockchain Fabric introduces decentralized governance for smart contracts, with a new process for installing a chaincode on your peers and starting it on a channel. The new Fabric chaincode lifecycle allows multiple organizations to come to agreement on the parameters of a chaincode, such as the chaincode endorsement policy, before it can be used to interact with the ledger.

Data use description: It is procurements transactions from a company. Each transaction starts with Create PO activity. The PO has to be properly authorized, which is represented by a Sign activity. This is followed by receiving the goods and the related invoice, which is recorded in the information system as GR and IR respectively. Finally, a Release activity is performed to release the PO to the accounts payable department for payment.

  1. Create and Deploy a Blockchain Network “Hyperledger Fabric” using Python
    • You must use Python and share the code of all process
    • You must use the attached excel sheet data “procurements details file”
    • This link has an example how to create a blockchain using https://github.com/hyperledger/fabric-sdk-py
  1. Create smart contracts using Python to find the following
    • You must use Python and share the code of all process
  2. Apply rules below
RuleCondition apply in smart contracts
Inappropriate purchase orderA sign activity must be performed at least once
Inappropriate purchase orderThe value of a purchase order must be specified
Inappropriate purchase orderThe value of a purchase order may not change after a sign activity has been performed
Incorrect invoice approvalA purchase order activity must be started before date of invoice receipt
Inappropriate accessA person must not perform all activities of the P2P process
Inappropriate accessA good receipt activity must be performed during regular business hours
Inappropriate accessA person must perform a release activity after time T = timestamp of goods receipt event
Inappropriate accessA release activity must be performed by a member of senior staff
Invoice entry errorAn invoice pay activity cannot be duplicated for the same purchase order
Goods received not matching valid purchaseThe values of Purchase order, goods receipt, and invoice receipt must match before the corresponding invoice can be paid
Payment errorThe value of a purchase order may not change after a sign activity has been performed
Payment errorIf a goods receipt activity is performed then an invoice receipt activity must be performed
Suboptimal task allocationA good receipt activity must not be performed by a member of senior staff

Requirements:

You have to share to files for each requirement

  1. Your code solution
  2. Excel file of your solution (except V)

Create and Deploy smart contracts in the created Blockchain Network in the step “A” Python.

  1. Verify transactions hash (minimum of to 5 cases)
  2. Extract the procurements details from the created Hyperledger Fabric in A (in excel formate)
  3. List the Sequence of all transactions in

For example: 10 transactions sequence is

  • Create PO —> Sign —> GR —> IR —> Release
  • Create PO —> Sign —> Sign —> GR —> IR —> Release
  • Etc.
  1. Results Of The Above Rules using smart contract
RuleCondition apply in smart contractsNumber of Violated cases% of Violated cases from overall casesAmount $% out of overall $ total
Inappropriate purchase orderA sign activity must be performed at least once



Inappropriate purchase orderThe value of a purchase order must be specified



Inappropriate purchase orderThe value of a purchase order may not change after a sign activity has been performed



Incorrect invoice approvalA purchase order activity must be started before date of invoice receipt



Inappropriate accessA person must not perform all activities of the P2P process



Inappropriate accessA good receipt activity must be performed during regular business hours



Inappropriate accessA person must perform a release activity after time T = timestamp of goods receipt event



Inappropriate accessA release activity must be performed by a member of senior staff



Invoice entry errorAn invoice pay activity cannot be duplicated for the same purchase order



Goods received not matching valid purchaseThe values of Purchase order, goods receipt, and invoice receipt must match before the corresponding invoice can be paid



Payment errorThe value of a purchase order may not change after a sign activity has been performed



Payment errorIf a goods receipt activity is performed then an invoice receipt activity must be performed



Suboptimal task allocationA good receipt activity must not be performed by a member of senior staff



  1. Share your code to apply the red flags rules in smart contract (means if the any of the below happen, controller will get a red flag violation of the rule).
Red Flags Rules
A sign activity must be performed at least once
If a goods receipt activity is performed then an invoice receipt activity must be performed
A Sign activity must be started before date of goods receipt
A person must not sign and release the same purchase order
A person must not sign and perform a good receipt activity for the same purchase order
A person must not perform all activities of the P2P process
A good receipt activity must be performed during regular business hours
A person must perform a release activity after time T = timestamp of goods receipt event
A release activity must be performed by a member of senior staff
A good receipt activity must not be performed by a member of senior staff
The value of a purchase order must be specified
The values of Purchase order, goods receipt, and invoice receipt must match before the corresponding invoice can be paid
The value of a purchase order may not change after a sign activity has been performed

Leave a Reply

Your email address will not be published. Required fields are marked *