Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python Version of go-fil-commcid #1703

Open
Aviksaikat opened this issue Feb 25, 2024 · 4 comments
Open

Python Version of go-fil-commcid #1703

Aviksaikat opened this issue Feb 25, 2024 · 4 comments
Assignees

Comments

@Aviksaikat
Copy link

Aviksaikat commented Feb 25, 2024

1. What is your project, and what problem does it solve? (max 100 words)

Our project, named "Py-Fil-CommCID", aims to develop a Python library for converting commitment hashes used by Filecoin to Content IDs (CIDs) that meet the CIDv1 standard. This library will enable Python developers to easily interact with commitment hashes and CIDs in the Filecoin ecosystem, facilitating seamless integration of Filecoin-related functionality into Python applications.

2. Project links

  • Link to Github repo:
  • License: MIT License

3. a) How is IPFS, Filecoin, or related technology used in this project?

The project utilizes the core concepts of Filecoin, including commitment hashes and CIDs, to provide utility functions for converting between them. It leverages the Filecoin ecosystem's commitment hash generation methods to create CIDs compliant with the CIDv1 standard.

b) Is this project building with the current microgrants focus area (FVM)? (Yes or No)

Yes

4. How will you improve your project with this grant? What steps will you take to meet this objective?

Number Grant Deliverable Briefly describe how you will meet deliverable objectives Timeframe (within 3 months)
1. Development of Python library Implement conversion utilities for commitment hashes to CIDs and vice versa in Python, mirroring the functionality of the go-fil-commcid library. 1 month
2. Testing and Validation Conduct comprehensive testing to ensure the reliability and accuracy of conversion utilities. Validate compatibility with various Python environments and versions. 2 months
3. Documentation and Release Create comprehensive documentation covering usage, examples, and API reference. Prepare the Python library for release on Python Package Index (PyPI). 3 months

5. If accepted, do you agree to share monthly project updates in this Github issue for 3 months or until the project described here is complete?

Yes

6. Does your proposal comply with our Community Code of Conduct?

Yes

7. Links and submissions

  • If your project began at a hackathon, have you submitted it for the relevant Protocol Labs prizes? Include links here if available:

Additional questions:

@Aviksaikat [Smart Contract Auditor, Systems Security Engineer, Lead Python Developer]

Previous projects

@habibur4340
Copy link

@Aviksaikat
Developing a Python library to convert Filecoin commitment hashes to CIDs (CIDv1). This facilitates easier Filecoin integration into Python apps.

Highlights:

Utilizes Filecoin tech for hash-CID conversions.
Supports FVM-focused development.
Plan: Develop the library, ensure testing and validation, and release documentation within 3 months.
Commitments:

Monthly updates here post-acceptance.
Adheres to the Community Code of Conduct.
Recommendation: Check out Apidog for robust API testing and documentation, useful for projects like this.

@Aviksaikat
Copy link
Author

I'm not sure about your role @habibur4340. If you're from the filecoin team then pardon me. If not then this is not the way to get GitHub profile badges. Don't follow stupid YouTube videos, do something proper and earn the badges.

@eshon
Copy link
Collaborator

eshon commented Apr 10, 2024

@Aviksaikat - Thanks for your proposal!

  1. Instead of porting the project to Python, you could also just create a Python wrapper around the Go version, which would take less time and likely easier to maintain.
  2. However we are not sure how many Python devs would use this and would be more interested in a use case that would use a Python wrapper or port. If you can update your proposal with an interesting use case that might have a better chance of being accepted.

@Aviksaikat
Copy link
Author

@eshon Thank you for the feedback! We have updated our proposal to reflect the suggestion of creating a Python wrapper around the existing Go version (go-fil-commcid). Additionally, we have included a practical use case to demonstrate the value and utility of our project.

Updated Proposal


1. What is your project, and what problem does it solve? (max 100 words)

Our project, named "Py-Fil-CommCID", aims to develop a Python wrapper for the go-fil-commcid library, which provides utilities for converting commitment hashes used by Filecoin to Content IDs (CIDs) that meet the CIDv1 standard. This wrapper will enable Python developers to seamlessly integrate Filecoin-related functionality into their applications, facilitating easier interaction with commitment hashes and CIDs within the Filecoin ecosystem.

2. Project links

  • Link to Github repo:
  • License: MIT License

3. a) How is IPFS, Filecoin, or related technology used in this project?

The project leverages the core concepts of Filecoin, including commitment hashes and CIDs, to provide utility functions for converting between them. It utilizes the existing go-fil-commcid library to create a Python wrapper, making it easier for Python developers to interact with these Filecoin components.

b) Is this project building with the current microgrants focus area (FVM)? (Yes or No)

Yes

4. How will you improve your project with this grant? What steps will you take to meet this objective?

Number Grant Deliverable Briefly describe how you will meet deliverable objectives Timeframe (within 3 months)
1. Development of Python wrapper Implement a Python wrapper for the go-fil-commcid library, providing easy-to-use interfaces for commitment hash to CID conversions. 1 month
2. Testing and Validation Conduct comprehensive testing to ensure the reliability and accuracy of the wrapper. Validate compatibility with various Python environments and versions. 2 months
3. Documentation and Release Create comprehensive documentation covering usage, examples, and API references. Prepare the Python wrapper for release on the Python Package Index (PyPI). 3 months

5. If accepted, do you agree to share monthly project updates in this GitHub issue for 3 months or until the project described here is complete?

Yes

6. Does your proposal comply with our Community Code of Conduct?

Yes

7. Links and submissions

  • If your project began at a hackathon, have you submitted it for the relevant Protocol Labs prizes? Include links here if available:

Use Case

To illustrate the practical application of the Python wrapper, we propose a use case involving a data archival service:

Data Archival Service

The data archival service will utilize the Python wrapper to manage and verify data stored on the Filecoin network. This service will:

  1. Upload Data:

    • Accept data from users and generate the corresponding commitment hashes (CommP, CommD, CommR) using the Python wrapper.
    • Convert these commitment hashes to CIDs compliant with the CIDv1 standard.
  2. Retrieve Data:

    • Use the generated CIDs to locate and retrieve the stored data from the Filecoin network.
    • Verify the integrity and authenticity of the retrieved data using the commitment hashes.
  3. Provide Metadata:

    • Generate and provide metadata about the stored data, including the CIDs and commitment hashes, to facilitate easy data management and retrieval.

Benefits

  • Seamless Integration: The Python wrapper allows Python developers to integrate Filecoin functionality into their applications without needing to understand the underlying Go implementation.
  • Data Integrity: By using commitment hashes and CIDs, the service ensures data integrity and authenticity, which is critical for archival purposes.
  • Ease of Use: The comprehensive documentation and examples will help developers quickly adopt and implement the wrapper in their projects.

Future Goals

With the recent launch of the Filecoin Virtual Machine (FVM), there has been a surge in interest from developers across various backgrounds eager to work within the Filecoin ecosystem. Our project, "Py-Fil-CommCID", aims to capitalize on this momentum by providing a Python wrapper for the go-fil-commcid library. This will serve as a crucial building block for future projects.

The go-fil-commcid library is integral to many core Filecoin libraries, making our Python wrapper an essential tool for expanding Filecoin's reach. By enabling Python developers to seamlessly interact with Filecoin’s commitment hashes and Content IDs (CIDs), this project will attract a broader developer base and drive further innovation within the ecosystem.

This initiative will not only simplify the integration of Filecoin functionality into Python applications but also foster greater engagement from the Python community, encouraging them to contribute to and expand the Filecoin ecosystem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants