Successful [Kompendium-4] Rust Client Library for the Factom Protocol

Was this grant successful?


Have not voted

Authority Nodes BI Foundation BI Foundation Blockrock Mining Blockrock Mining BlockVenture DBGrow DBGrow De Facto De Facto Factom Inc. Factom Inc. HashQuark LUCIAP LUCIAP

  • Total voters
    21
  • Poll closed .

Chappie

Factomize Bot
This is your grant tracking thread. Below, you will find information from your original grant.

Grant Proposal
https://factomize.com/forums/threads/kompendium-4-rust-client-library-for-the-factom-protocol.2277/

ANO / Committee
Group: Kompendium
FCT address: FA3KMPNX8AKdY3tjyKMzZ5cAkqUv97d3QqkJeQnVXk6PXSVgArnr
FCT: 2400

Total FCT Requested
2400

Start Date
2019-08-05

Completion Date
2019-08-05

Success Criteria
Delivery of a Rust client library for the Factom Protocol, delivered on time, and the client is added to the https://docs.factomprotocol.org/ for developer ease of access and to showcase the Factom Protocol’s priority of expanding its developer community and its portfolio of developer tools.

Timelines and Milestones
03 SEP 2019 Start Review - First Review – Documentation, Completeness, Functionality – Reorg, Add API Endpoints, Additional Documentation
30 SEP 2019 Second Review – Documentation, Completeness, Functionality
Status Update to Community on Grant
01 OCT 2019 Further Testing, Evaluation, and Client Refinement
31 OCT 2019 Deliver Finished, Refined, and Improved Client to Community

Budget
2100fct Development (back pay, further development, testing) discounted
200fct Testing
70fct Program management / updates / upkeep
30fct Marketing the creation of the RUST client for the Factom Protocol to Rust developer media channels/communities
 

Chappie

Factomize Bot
@Jason Gregoire @Kompendium

Today is your grant start date! We look forward to regular updates from your team.

When you are ready for the final determination poll, first summarize the grant and self score then go to the thread tools dropdown at the top right and select "Create Final Determination Poll".
 

Chappie

Factomize Bot
@Jason Gregoire @Kompendium, your specified completion date has now passed. Will you please update us on the status of your grant?

If it is completed, please first summarize the grant and self score then go to the thread tools dropdown at the top right and select "Create Final Determination Poll".
 
Just an update.

Currently implementing :
  • Some common traits to add easy interoperability with other libraries.
  • Ongoing work investigating the best path forward for overhauling the test suite making it portable and easier to use, at the moment it requires downloading a small database and running custom factomd commands.
  • Added a fuzzing suite for bug testing and some higher-level functions which combine operations.
On the Horizon:
  • Futures runtime
  • Clearer delineation for synchronous calls.
  • Updating rand dependency with breaking changes.
  • Documentation fixes
 
Hello Community,

I'm writing to provide an update to the Rust Client library. Several individuals have reached out asking about the status of the library.

We've decided to pause the public release of the Rust client library for a few days to await the Rust Community's 1.39 release, which is expected on 07 November. Announcement Link: https://blog.rust-lang.org/2019/09/30/Async-await-hits-beta.html

While we recognize the importance of meeting the pledged grant timeline, we hesitantly decided a delay of a few days would ultimately be advantageous to the community to ensure we are providing the community with a stable and optimized library for the latest Rust release.

Thank you for your patience.
 
Last edited:
Async was stabilised in rust today (was expected in 1.38 but had a few blockers) and the long-awaited futures 0.3 released yesterday with async support, but to be frank most of this delay was me and life commitments. Not going to shy away from that, there's preview crates available for both futures and hyper, in general they tend to not deviate much from the final product, this could have been ready for these releases but alas it is not.

Personally, I'm happy to take my time here because without async syntax this library will both look and feel outdated in a matter of months. `impl future` is rough and clunky. It may be some time.

Currently this is common pattern for a function:

Rich (BB code):
fn heights(self)-> impl Future<Item=Response, Error=FetchError>

with the recent release this desugars into:

Code:
async fn heights(self) -> Response<Heights>

The current dev branch is likely to have breaking changes, just something I want people to be aware of.
As a quick rundown, this is some dependencies for the client to move to async:

YAML:
futures-preview = {version = "0.3.0-alpha.19",  features = ["compat"] }
futures-util-preview = "=0.3.0-alpha.19"
hyper = {version = "0.13.0-alpha.4", features = ["unstable-stream"] }
hyper-tls = "0.4.0-alpha.4"
tokio = "0.2.0-alpha.6"
It's a tad messy, hyper is getting there, but unstable-stream is likely necessary for a while. Getting things working on stable is paramount in my mind because some things end up in nightly limbo for years.

I'm keen to get this out, also keen to only ship something that's stable. It's a tightrope in that regard.

Cheers all.

addendum: No rust or toml formatting on Factomize.
 
Last edited:
Hi guys,

I'm very excited about this grant, even more so considering that we will be working with Rust at least for portions of the Verifiable Credentials implementation on Factom. Having a Rust client for factomd would definitely come in handy.

Do you have any estimate about the completion of this work?
 
Factom Rust API Client v2 has been stabilised and released.

The library has been entirely reworked to take advantage of recently introduced async-await functionality which provides performance benefits along with a far more pleasant syntax for readability/usage. A range of examples have been added along with improved test coverage, well over 100 tests now, including full doctests. Have also removed the need for testers to download and run a custom blockchain that existed in V1.

OpenNode and Testnet OpenNode usage has been made simpler, along with a some functions to make common workflows easier, rather than go through the full process of three different calls to create a chain, entry or identity, there is now helper functions wrapping them all in one. There is also a chain traversal function which can parse entire chains to a specified depth.

For development work there's now benchmarks and fuzzing suites included. You can use these to bench/fuzz both the library itself or factomd/factom-walletd.

There's still some work to do merging some external PR's to add pure rust address generation using the ed25519-dalek library, and perhaps this can eventually be extended out to signing arbitrary data.

Most of the upstream alpha/preview dependencies have been made stable within the last few weeks except for tokio-executor which will need still to be updated down the line. There was numerous breaking changes along the way internally here as many of the libraries updated to the new syntax, but they have now reduced the dependency count and as such compile times are much faster.

Despite being a backpay grant, this has been easily a month overdue, which is entirely my fault and responsibility, sincere apologies to everyone who has been waiting for release and the dev branch was in a constant state of flux.

I took 1200 FCT from this grant and the other half was used to pay for funding 3rd party development of the other API libraries by Kompendium.

Thanks.

Github repo: https://github.com/kompendium-llc/factom-rust-client

Docs: https://docs.rs/factom
 
Grant Summary for Community Determination Scoring:

Goal: Create an enhanced Rust rpc Client Library for the Factom Protocol.

Grant Events:
---Updates provided periodically through the life of the grant work.
---Release of the Client Library was delayed to time and allow for inclusion of several important updates made available in the Rust Community's 1.39 release (07NOV)
---The Rust client library was entirely reworked to leverage the recently introduced Rust async-await functionality providing performance benefits and improved readability.
---Numerous examples were added as well as improved test coverage(100+ tests including full doctests).
---OpenNode and Testnet OpenNode usage with the client were simplified. Additionally, a chain traversal function was created to enable parsing of entire chains to a specified depth. For development work, benchmarks and fuzzing suites were added.

Client Library: https://github.com/kompendium-llc/factom-rust-client

Self Score: We believe the delivered library exceeds approved grant requirements and provides a powerful tool set and significant value to the community at a discounted cost. Score 8.5
 
Last edited:

Chappie

Factomize Bot
The final determination poll has been created, and will be open for 5 days. Use the following rubrik when scoring:

Exceptional (9.0 - 10.0) - Successful
Overachieved (7.0 - 8.9) - Successful
Achieved (5.0 - 6.9) - Successful
Underachieved (2.0 - 4.9) - Failure
Total Failure (0.0 - 1.9) - Failure
 

Chappie

Factomize Bot
The final determination poll has now closed. The final score is 7.45, with 20 total counted votes. The grant has been determined to be successful.
 
Top