Hello people, i want to introduce my project “JAM Whitelist Role Authorizer”, an implementation that uses the JAM SDK to provide a role-based and whitelist authorization system. This project is a significant contribution to the Polkadot open source ecosystem and demonstrates the potential of the JAM SDK to develop practical and scalable solutions.
What does this project do?
The JAM Whitelist Role Authorizer allows managing authorized addresses, assigning roles (administrator, participant, observer), and running an interactive game where participants answer questions under supervision. The system ensures that only authorized addresses can perform specific actions, ensuring transparency and security in decentralized environments.
Additionally, the repository’s resources are available in both English🇬🇧 and Spanish 🇪🇸, making it easy to use and understand for a global developers.
Open Source Code: Github
JAM SDK Components Used
1.jam-types (Implemented) Description: This crate contains basic types and structures needed for working with services and authorizers in JAM.
Components Used:
Usage in the Project:
Authorizer is used to manage the validation of authorized addresses.
A CodeHash is dynamically generated based on the admin's name and used to verify the authenticity of operations.
AuthParam is extended with the admin's address to track who performed certain actions.
2.jam-pvm-common (Reviewed for Future Implementation) Description: Provides common functionalities for working with the PVM (Parity Virtual Machine).
Current Usage: Not explicitly used in the current code.
Future Suggestion: It could be used to ensure that data generated by the authorizer is compatible with the PVM runtime environment. For example, you could implement specific serialization/deserialization functions to handle data in the format required by the PVM.
3.jam-bootstrap-service (Reviewed, Used as Reference)
Description: A basic service useful for creating initial configurations (genesis) in JAM.
Usage in the Project: Cloned as a reference to understand how to configure a basic service in JAM.
Future Suggestion: It could be used to define an initial configuration that includes predefined addresses for the admin, participant, and observer.
4.jam-null-authorizer (Used as a Starting Point, but Not Present in the Current Code) Description: A basic authorizer that allows testing without authorization restrictions.
Current Usage: Not explicitly used in the current code.
Future Suggestion: It could be used as a starting point to implement more advanced test cases. For example, it could be integrated to test scenarios where no authorization is required.
5.jam-pvm-build (Reviewed but Not Publicly Available) Description: A CLI tool that allows building PVM code blobs for services or authorizers.
Current Usage: Not explicitly used in the current code.
Future Suggestion: It could be used to compile the custom authorizer into a deployable PVM blob.
Community Value
This project not only demonstrates how to effectively integrate and use the JAM SDK, but also serves as a practical example for other developers wishing to build similar services. It also:
Execution worlflow
1.Assigning roles to participants
2.view main menu
3.Select option 1: Admin validation and selection of number of questions to ask
4.Select option 2: Participant validation and answering questions
5.Select option 3: Observer validation and viewing answers
6.Select option 4: Verification of user roles and identification vectors
Example of ideas for future implementations
Potential Application in Polkadot Blockchain Academy: This role and authorization system could also be adapted to create a useful scenario in the Polkadot Blockchain Academy. For example, the entrance exam could leverage this resource to be more transparent and fair:
By using a blockchain-based system, it is ensured that the process is immutable, transparent, and verifiable by all involved. This could improve trust in the selection process and make it more inclusive for global candidates.
Connection with video games like DOOM executed in JAM: The system developed is an essential component for managing who can interact with services in JAM. For example:
In the case of DOOM, these components could be used to:
Thank you for your attention, I hope this resource, documentation and implementation ideas will be useful for everyone. See you in the decentralized future that is getting closer and feel free to share questions and comments =)
Note: Thanks Gav and Parity team by this interesting piece of software
JAM Whitelist Role Authorizer
Threshold
Dear Proposer,
Thank you for your proposal. Our first vote on this proposal is AYE.
The Big Tipper track requires 35% participation and simple majority of non-abstain voters according to our voting policy. This proposal has received four aye and zero nay votes from ten members, with three members abstaining. Below is a summary of our members' comments:
The full discussion can be found in our internal voting.
Kind regards,
Permanence DAO