How best to test new implementations

Hi all,

I’ve done a rough implementation of ILPv4 in Rust to learn how ILP works as well as to practice the language (newbie Rustacean here!). I’ve already been sold on the whys of Interledger (Stronghold - my day job - has done some work with Strata to get payments settling in the Stronghold USD stablecoin) and I am looking to deepen my understanding.

I’m at the stage where I’d like to test what I’ve done so far but am at a loss about how best to proceed. The testing story is clearer for public blockchains: I can easily inspect blocks & transactions, as well as submit transactions and see the results on public testnets (often using a browser-based UI). I can easily grab data to put in unit tests as well. What is recommended in the ILP world?

I must admit I’m not sure where each of the libs on https://interledger.org/libraries.html fit into the story.

P.S. thanks @emschwartz for https://github.com/emschwartz/interledger-rs - great reference while I experiment and play around.

6 Likes

I think we could definitely benefit from better test suites, but in the interim, I would recommend following along the RFCs for identifying common communication patterns, data structures, and using the Javascript reference implementation for generating test data for particular modules.

If you have any ideas for how testing and tooling can be improved, please let others know! Furthermore, please consider contributing to the existing Rust implementation. Test coverage certainly needs some love there. :slight_smile:

Right now, I am working on making (simple) ØMQ modules for encoding and decoding BTP, ILP, and STREAM packets. The end-goal is to improve interoperability and compatibility testing between different implementations using sockets, but progress has been admittedly slow on my part.

We definitely need a good general test harness that supports different bilateral protocols. Historically integration tests used BTP but I think with the progress of HTTP that this is the natural choice.

This would be a cool project for a hackathon at the summit.

If you are building a new connector implementation I’d recommend getting the HTTP integration working first and see if you can peer with another implementation.

3 Likes