xxB-2024-001: xxDK C Library Implementation

Bounty xxB-2024-001: xxDK C Library Implementation

Overview

This bounty rewards developers for implementing full language bindings for the xxDK library, focusing on C with optional extensions for Rust and C#. C support enables support for Rust, C#, Python, Ruby, etc.

Prize Pool

Total Prize: 1,000,000 xx (~$50,000 USD)

Breakdown:

  • C Library Implementation: 500,000 xx
    • This must be completed before work on Rust or C# can begin. Rust and C# can be worked on in parallel.
  • Rust Bindings Extension: 250,000 xx
  • C# Bindings Extension: 250,000 xx

Requirements

Eligibility

  • Participants must complete KYC verification
  • Participants from OFAC-sanctioned countries are not eligible
  • Multiple contributors may collaborate on submissions
  • Existing xx network contractors are not eligible

Technical Requirements

  1. C Library Implementation

  2. Optional Extensions

    • Rust Bindings

      • Full FFI bindings to C implementation
      • Idiomatic Rust API
      • Documentation and examples
      • Cargo package integration
    • C# Bindings

      • Full P/Invoke bindings to C implementation
      • Idiomatic C# API
      • Documentation and examples
      • NuGet package integration

Submission Requirements

  1. Source code must be:

    • Open source (same license as xxDK)
    • Submitted via merge request to appropriate repository
    • Well-documented
    • Passing all tests
    • Following project coding standards
  2. Documentation must include:

    • API reference
    • Integration guide
    • Example applications
    • Build/installation instructions

Judging Criteria

Submissions will be evaluated on:

  1. Completeness of implementation
  2. Code quality and maintainability
  3. Documentation quality
  4. Test coverage
  5. Performance
  6. Ease of integration

Timeline

  • Submissions accepted until completed or program ends
  • Reviews will occur within 2 weeks of submission
  • Prizes paid within 30 days of approval

Payment Terms

  • Prizes paid in XX tokens
  • Multiple submissions may split prize pool
  • Major awards (>50,000 XX) subject to 6-12 month linear vesting
  • All payments subject to KYC approval
  • We may make partial payments at our discretion
  • Payments may be locked in a linear vesting schedule for up to 1 year

Contact

Submit questions and proposals through:

  • Repository issues
  • Developer forum
  • Developer chat channels

Please respond in the forum if you are pursuing this grant.

Legal

  • xx network reserves right to modify bounty terms
  • All submissions must comply with applicable laws
  • Participants retain rights to submitted code under project license
  • xx network not responsible for lost or invalid submissions

Last Updated: November 12, 2024

1 Like

Hi all, I worked with @rick on the initial Rust bindings earlier this year, and I would be happy to continue working to make them and the C bindings more complete.

For background, I’m formerly the lead engineer of the Mobby blockchain platform, where I worked with Rick for a period of a couple of years, and I’ve been working professionally with Rust and systems engineering more generally for most of my career.

Let me know if you need any more information!

2 Likes

This sounds great @julia, glad to have you back.

Can you propose some milestones for the first C Library part of the project?

Apologies for the delay, I’ve been busy traveling!

A preliminary list of milestones:

  1. Core CMix functionality (creating/loading keystores, creating/managing reception IDs, starting network threads, etc; the basic functionality common across use cases)
  2. E2E and connect client/server functionality
  3. Restlike functionality
  4. File transfer functionality
  5. DM functionality
  6. RPC functionality*
  7. Misc. functionality
  8. Finalize documentation, test suite, build system

I’m thinking of approaching the library functionality in chunks, focusing primarily on being able to translate existing examples (e.g. from the xxdk-examples repo); this is the goal of the first 6 milestones. For each of these I would aim to have the relevant functions callable from C, the relevant examples translated, and at least a cursory test suite and documentation.

(It’s entirely likely I’m missing large swaths of functionality out of unfamiliarity here; lemme know if this seems like a reasonable division of the library functionality.)

At that point, I’m thinking there will likely be some smaller/more obscure pieces of functionality that remain inaccessible from the C bindings; identifying and implementing/documenting/testing these is the purpose of the 7th milestone. Additionally, the test suite and documentation may need expansion and/or cleanup, and the build system may need cleanup; this is the 8th.

I’m aiming to start work in earnest early-to-mid next week, after I’ve gotten home from the holidays.

*I remember when Rick and I were working on the Rust bindings the RPC functionality was still something of a work in progress, and a scan of the current client repo indicates that it’s still fairly barebones. I suppose it’s still a bit down the line so the question is mostly moot for now, but is that in fact within scope for the bindings?

1 Like

These look good. You are good to go to get started on this. We will partial award as you complete the milestones. Please let the forum know if you need help or drop it moving forward.

2 Likes