Description
Introduction
Endorsement policy controls the approval of a proposal to be executed at various granular levels.
In other words, this is the primary entity which is validated before a transaction is committed.
Endorsement policy can operate at two different granularities:
- Namespace level: They can be set for the whole namespace.
This is the default approach in which endorsement policies are specified in the chaincode definition,
which is agreed to by channel members and then committed to a channel - Individual key level: They can be set for individual state keys called private data collections.
You can also specify an endorsement policy at the private data collection level,
which would override the chaincode level endorsement policy for any keys in the private data collection.
This would further restrict which organizations can write to a private data collection.
Problem Statement
This becomes complex to handle when operating at scale.
Some usecases
- Complex endorsement policy resolving for namespace level ones
- Tracking Endorsement policies on large quantity Private data collections each having different endorsement policies
- Resolving policy for a given object combining namespace level with overiding individual key-level ones.
Additional Information
- Understanding endorsement policies in Hyperledger Fabric v2.x - https://hyperledger-fabric.readthedocs.io/en/release-2.0/endorsement-policies.html
- Understanding chaincode - https://hyperledger-fabric.readthedocs.io/en/release-2.0/chaincode4noah.html
Learning Objectives
- Understanding of hyperledger fabric concepts
- Learn to manage (write/install/execute) hyperledger smart contracts (chaincode)
- Good exposure to DLT technologies
- Understand De-centralised transaction endorsement concepts
- Gain Hands-on experience with opensource software development
Expected Outcome
- A library/set of tools implementation thats able to ease endorsement policy handling
- Good documentation with diagrams in github
- Unit and integration tests for the implementation
Relation to Hyperledger
- Hyperledger Fabric
- Hyperledger Cello
Education Level
Any
Skills
- Interest in distributed systems
- Coding skills required to implement chaincode in golang, nodejs or java
- Familiarity with bash is a plus
- Knowledge on container technologies like Docker is also an advantage
Future plans
Integration with hyperledger fabric, explorer projects
Preferred Hours and Length of Internship
Part-time (20 hours a week for 24 weeks starting in summer and ending in fall)
Mentor(s) Names and Contact Info
Anoop Vijayan, anoop@tuxera.com Karthikeyan Sundaramoorthy, karthik@cloudronics.com
Mentee Name and Contact Info
Abhimanyu Shekhawat, abhimanyushekhawat17.as@gmail.com
Project Plan and Report
Problem Statement:-
- There are two levels of endorsement policy that acts on a chaincode, channel(namespace) level, and key(collection) level.
- When there are too many channels and collections it gets hard to manage all the data entities and knowing who has access to what.
Solution:-
A tool that helps to query and modifying policies with relative ease.
The project can be found at
https://github.com/maniankara/hyperledger-easydoser
Information about the project’s weekly updates are being updated at
https://github.com/maniankara/hyperledger-easydoser/blob/master/project_status.md
Deliverable:-
- Milestone 1:-
- A web UI to pick the required keys and certificates.
- Show policies of all the channels that a peer/owner/admin is part of.
- Representing policies of different organizations in a bifurcated manner.
- Updating documentation.
- Milestone 2:-
- Querying and displaying endorsement policies of private collections that a peer and org is part of.
- Modifying endorsement policies of a channel.
- Updating the modified policy of the channel to the network with admin level keys.
- Updated Web-UI as per the newly added features.
- Updating documentation.
- Milestone 3:-
- Representing all the obtained endorsement policies of a peer in a tree format, for easier understanding and observations.
- Representing all the obtained endorsement policies of an organization in a tree format.
- Updated Web-UI as per the newly added features.
- Updating documentation.
- Milestone 4:-
- Cleaning up the code and adding some finishing touches to the Web-UI.
- Adding CI and tests.
- Updating and improving documentation.
End Product:-
The end product will be an easy to use Web-UI where any user picks their keys and certificates and then gets to query and view all the endorsement policies (key level and namespace level) in a simplified and hierarchical manner. If the user is an admin, the user can modify channel policy definitions.