MLabs: Golang SDK for SingularityNET

chevron-icon
RFP Proposals
Top
chevron-icon
project-presentation-img
Expert Rating 4.0
Luke Mahoney (MLabs)
Project Owner

MLabs: Golang SDK for SingularityNET

Expert Rating

4.0

Overview

The project scope encompasses the development of a comprehensive Golang SDK for the SingularityNET AI marketplace. This SDK will provide developers with streamlined tools and interfaces to interact with SingularityNET's AI services and marketplace functionality. The project will deliver a SingularitySDK in Golang while providing feature parity with the existing Python SDK.

RFP Guidelines

Golang SDK Development for SingularityNET AI Marketplace

Complete & Awarded
  • Type SingularityNET RFP
  • Total RFP Funding $60,000 USD
  • Proposals 6
  • Awarded Projects 1
author-img
SingularityNET
Oct. 15, 2024

The SDK will enable seamless integration with key components like Multi-Party Escrow (MPE), the Registry, and IPFS, serving both AI developers and consumers. It must maintain backward compatibility with the existing Python SDK, offer intuitive interfaces for managing identities, organizations, and services, and include strong security and scalability features. Comprehensive documentation is required to ensure ease of use and long-term maintainability.

 

Proposal Description

Company Name (if applicable)

MLabs LTD

Project details

SingularityNET Ecosystem

SingularityNET represents a novel decentralized AI marketplace powered by blockchain technology, where developers can deploy and monetize their AI services through smart contracts on the Ethereum network.

By leveraging the Multi-Party Escrow (MPE) system and AGIX tokens, the platform enables trustless peer-to-peer transactions between AI service providers and consumers through atomic unidirectional payment channels.

The Registry smart contract acts as a decentralized directory, allowing developers to register their services with IPFS-based metadata while enabling consumers to discover and interact with these services through on-chain verification mechanisms.

Components of SingularityNET

Multi Party Escrow

The Multi-party Escrow (MPE) contract facilitates secure off-chain transactions between AI service providers and consumers. The MPE functions as both a wallet for AGIX tokens and a manager of unidirectional payment channels.

Each channel is uniquely identified by the client, service provider, organization ID, and daemon group.

Registry

The Registry contract serves as a central directory for AI services on the platform. It implements the ERC-165 standard and enables AI developers to register their services while allowing consumers to discover them.

The Registry maintains records of organizations, which act as containers for services, along with detailed service metadata including pricing, endpoints, and API specifications.

While core information is stored directly on the blockchain, larger metadata sets are stored on IPFS, with the Registry maintaining references through IPFS hashes.

Daemon

Operating as a Web3-enabled sidecar proxy, the SNET daemon orchestrates secure microservices interactions through cryptographically-secured payment channels and smart contract validations. It abstracts complex blockchain operations, handling token-based micropayments through the Multi-Party Escrow while maintaining state consensus and providing trustless service authorization.

SDK

The SDK serves as a comprehensive Web3-native development framework, enabling seamless integration with the platform's decentralized infrastructure through blockchain-secured APIs.

This robust toolkit facilitates programmatic interaction with core smart contracts while providing advanced capabilities for managing decentralized organizations.

Developers can leverage the SDK to deploy and update AI services while abstracting complex blockchain operations through language-specific bindings. This multi-language approach democratizes access to the SingularityNET ecosystem, enabling cross-chain interoperability and fostering a robust developer community around decentralized AI services, while maintaining granular control over organizational structures and service lifecycles.

Team

Our team includes experienced developers who specialize in Ethereum smart contract development, IPFS distributed storage systems, and Golang implementation. This combined expertise in both blockchain and decentralized storage, along with our successful delivery record, positions us well to execute this project effectively.

Farseen CK, Senior Software Architect - Project Leader

Farseen is an accomplished Software Architect, known for his expertise in robust, and scalable software design. He possesses strong analytical skills in state space analysis, graph topology analysis, and multi-level Monte Carlo analysis. Farseen excels at optimizing workflows, designing robust systems, and delivering efficient, scalable solutions tailored to complex technical challenges. Farseen’s technical toolkit includes Rust, Python, JavaScript, TypeScript, C, Haskell, Zig, and Golang. He is also proficient in DevOps tools such as Docker, Terraform, and Ansible, with experience in AWS and multi-cloud deployments. Farseen will lead the project.

Seungheon Oh, Senior Software Developer - Project Software Architect

Seungheon Oh ****is a skilled Software Developer specialising in full-stack development with a focus on decentralized finance and blockchain infrastructure. Proficient in Haskell, Purescript, and Golang, Seungheon has contributed extensively to the development of large scale deployments of complex software systems. With a strong command of Golang, Seungheon has utilized the language for efficient systems development and administration, enabling robust backend solutions and enhancing continuous integration workflows. His experience with SDK design puts him in an ideal place to lead the software architecting for the project.

Ramiro Sergio Garay, Senior Software Developer- Project Software Engineer

Ramiro Sergio Garay ****is a versatile Software Developer and Systems Administrator. He is currently completing a degree in Engineering Informatics at Universidad Nacional del Litoral, Ramiro has built a strong foundation in designing and implementing a variety of software deployments, ranging from blockchain work, automation scripts, shell interpreters and 2D games. Rama will develop large parts of the SDK for the project.

Design Philosophy and Goals

Our Go SDK implementation for SingularityNET will be designed with several key principles and objectives to ensure it meets both functional and non-functional requirements while leveraging Go's unique strengths:

Feature Parity and Backward Compatibility

The SDK will maintain complete feature parity with the existing Python SDK. We will replicate all key functionality and APIs, including service discovery, identity management, and transaction management, while providing comprehensive testing to verify compatibility.

Component Integration and Security

Our modular architecture will provide specialized interfaces for each core SingularityNET component. These modules will enforce secure communications for all transactions and smart contract interactions while preventing unauthorized access. The SDK will implement robust validation mechanisms to maintain data integrity across decentralized systems.

Developer-Centric Interface Design

We will prioritize intuitive APIs that simplify complex blockchain operations. Developers will find streamlined interfaces for managing identities, creating and managing organizations, and interacting with AI services. Our abstraction layers will reduce the learning curve while maintaining access to advanced features when needed. Clear error messages and comprehensive documentation will be available.

Idiomatic Go Implementation and Performance

The SDK will leverage Go's strengths, particularly in areas of concurrent processing and resource efficiency. We will utilize Go's goroutines and channels for efficient parallel processing of service requests, implementing thread-safe operations throughout the codebase. This approach will ensure optimal performance in high-throughput scenarios while maintaining clean error handling and resource management. The implementation will be optimized for CPU and memory efficiency.

Scalability and Reliability

Our architecture will be designed to handle growing transaction volumes and user bases without performance degradation. The system will scale efficiently in distributed environments, particularly when working with decentralized storage solutions like IPFS.

Modular Architecture and Maintainability

Following the pattern established by other SingularityNET SDKs, our implementation will use a modular architecture that separates concerns into logical component enabling:

  • Future feature additions without disrupting existing functionality
  • Simple integration of new services and components
  • Clear separation of concerns for easier maintenance
  • Straightforward dependency management
  • Flexible extension points for custom implementations

Advanced Protocol Integration

Building on our team's expertise in schema languages (including Ramiro’s work on LambdaBuffers), we will implement robust gRPC and Protocol Buffer integration for service communication. This will ensure type-safe serialization and efficient and low-latency interactions between components.

Comprehensive Error Handling and Debugging

The SDK will include detailed and actionable error handling mechanisms with contextual information and stack traces to facilitate debugging. We will implement logging and tracing capabilities that provide visibility into SDK operations while maintaining performance.

Documentation and Developer Support

We will provide comprehensive documentation including:

  • Detailed API references and architecture overviews
  • Setup and integration guides
  • Best practices and common patterns
  • Tutorial content and sample implementations
  • Troubleshooting guides
  • Performance optimization recommendations
  • Security considerations and guidelines

Quality Assurance

Our development process will include:

  • Comprehensive unit testing
  • Integration testing across all components
  • Load testing for performance verification
  • Security auditing of critical paths
  • Continuous integration and deployment pipelines
  • Regular code reviews and quality checks

This holistic approach will ensure we deliver a robust, secure, and developer-friendly SDK that meets both the immediate needs of the SingularityNET ecosystem and provides a solid foundation for future growth.

Challenges

The project is ambitious in aiming to deliver a fully featured GoLang SDK for the SingularityNET AI Marketplace. While we are mindful that we have been aggressive in our project planning, we do believe that the schedule is achievable, and that the milestones can be delivered on time and within budget given the senior team we have allocated to the project.

We intend to further mitigate the inherent risks of such an ambitious software project by holding regular internal meetings with the wider MLabs team, to ensure that nascent problems can receive expert troubleshooting attention in a timely manner.

Open Source Licensing

MIT - Massachusetts Institute of Technology License

All work produced under this proposal will be released under the MIT Open Source License (https://opensource.org/license/mit).

This permissive license allows for maximum flexibility in how the SDK can be used, modified, and distributed by the community.

Under the MIT license:

  • Users can freely use, modify, and distribute the SDK in both commercial and non-commercial applications
  • The source code can be incorporated into other software projects, whether open or closed source
  • Modifications and derivative works can be released under different terms
  • The only requirements are maintaining the copyright notice and license text

We chose the MIT license to align with SingularityNET's commitment to open-source development and to ensure the SDK remains freely accessible to all developers in the ecosystem.

This licensing choice also maintains consistency with other SingularityNET components and SDKs.

Links and references

Website

https://www.mlabs.city/

Proposal Video

Not Avaliable Yet

Check back later during the Feedback & Selection period for the RFP that is proposal is applied to.

  • Total Milestones

    4

  • Total Budget

    $60,000 USD

  • Last Updated

    6 Dec 2024

Milestone 1 - Setup Implement MPE Contract Interface

Description

In this milestone we will setup the scaffolding needed to interface with Ethereum and implement calls to the MPE contract. This includes setting up the core SDK architecture implementing Ethereum connection management handling of wallet interactions and building the necessary abstractions for MPE contract interactions. We will ensure proper error handling and transaction management for all blockchain interactions.

Deliverables

Implementation of the SDK framework that enables seamless interaction with the Ethereum blockchain and MPE contract functionality.

Budget

$20,000 USD

Success Criterion

- The SDK has the necessary foundations to interface with Ethereum, including robust connection management, wallet integration, transaction handling, and gas estimation capabilities. It will support both mainnet and testnet environments, with proper error handling and retry mechanisms - The SDK can be used to execute the MPE contract, supporting all major operations including channel creation, fund management, claim operations, and channel state management. This includes proper type safety, validation, and event handling for all MPE contract interactions.

Milestone 2 - Implement Registry Contract Interface

Description

Implementation of the SDK enabling full Registry contract functionality.

Deliverables

Implementation of the SDK enabling full Registry contract functionality.

Budget

$15,000 USD

Success Criterion

- The SDK can be used to execute the Registry contract, supporting all operations including organization creation, service registration, and metadata management. This includes proper validation of all parameters and methods to verify transaction success through block confirmations. - The SDK can manage organizations and services, providing high-level abstractions for common workflows such as organization creation, member management, service deployment, and updates.

Milestone 3 - Interface with gRPC services IPFS

Description

In this milestone we build the foundations for using gRPC in the SDK and enable calling the gRPC methods exposed by the services. We also build the support to fetch service metadata from IPFS. This includes implementing proper service discovery mechanisms and handling of IPFS connectivity.

Deliverables

Implementation of the SDK framework

Budget

$20,000 USD

Success Criterion

- Core SDK components for service interaction: - Configuration management system for endpoints and credentials - Service client generation framework - IPFS client integration - Proto file compilation and management - Payment channel handling for service calls - The SDK can be used to do service discovery: - Registry contract integration for listing organizations and services - Service metadata parsing and validation - Group and endpoint discovery within services - Pricing information extraction - Service API specification retrieval - The SDK can fetch service metadata from IPFS: - IPFS client implementation with retry logic - Safe extraction of proto files from IPFS archives - Hash validation for downloaded content - Local caching of metadata and proto files - Automatic metadata updates when needed - Support for both IPFS and FileCoin (Lighthouse) storage providers - The SDK can call gRPC endpoints exposed by the services: - Automatic proto compilation into native language bindings - Dynamic client library generation from proto files - gRPC channel management and connection handling - Request/response serialization - Error handling and retry mechanisms - Integration with payment channel system for paid calls - Free call token support - Concurrent call management

Milestone 4 - Documentation

Description

In this milestone we will document all the components of the SDK and generate the standard Golang package docs. This includes creating comprehensive API documentation usage examples integration guides and best practices for common use cases.

Deliverables

Documentation of the SDK

Budget

$5,000 USD

Success Criterion

- All the components of the SDK are documented with detailed API references, including function signatures, parameter descriptions, return values, and error conditions. Each component will include usage examples and common pitfalls to avoid. - The documentation is available in the standard Golang package docs format, including proper package organization, type definitions, and godoc comments.

Join the Discussion (0)

Expert Ratings

Reviews & Ratings

Group Expert Rating (Final)

Overall

4.0

  • Feasibility 4.3
  • Desirabilty 4.3
  • Usefulness 3.7
  • Expert Review 1

    Overall

    4.0

    • Compliance with RFP requirements 5.0
    • Solution details and team expertise 5.0
    • Value for money 4.0

    A good application, a detailed description of the stages, and a great team. A small disadvantage is the number of milestones, I think that more stages should have been done and some details should have been taken out.

  • Expert Review 2

    Overall

    4.0

    • Compliance with RFP requirements 4.0
    • Solution details and team expertise 5.0
    • Value for money 4.0
    Good milestones and description of project and team; Strong team; Good points about modular structure and further development; No ETA for milestones; Don't see any competencies in Ethereum; No testing phases in milestones

    Good proposal that can be accepted with minor milestones changes and if team will provide information about their competencies in Ethereum

feedback_icon