owned this note changed 5 years ago
Linked with GitHub

Aries Go Framework review

tags: aries go review
  • Date: Dec 10, 2019
  • Contents
  1. Brief Overview
  2. Good points
  3. Improvements
  4. Anoncreds suport
  5. Comparison of LibVCX and Go framework
  6. Updates
  7. Questions

Brief Overview

Aries Go Framework is an Aries-compatible agent with implemented REST API. Right now only DID Exchange functionality is implemented along with DID transport. Also JWT credentials are implemented.

Good Ideas

Framework structure

It looks like it will be easy to integrate this framework into software framework structure is clean and simple. Option builder looks easy to use, so initialization is a good example of usage.

Documentation

Golang provides good functionality for documentation that is published on godoc.com it is easy to use and informative. Aries Go Framework has a good documentation on that site here is the link: https://godoc.org/github.com/hyperledger/aries-framework-go

What can be improved

Code organization

May be I am not really familiar with Golang usual code structure but it was pretty hard for me to find the entry point in DID Exchange package for example. It is possible that it should be better documented where to look first.

Anoncreds support

Right now Aries Go Framework have JWT Credentials implemented. There are BDD tests that show their correctness. However, they are incompatible with CL credentials that are implemented in Libindy.

The easiest way to support the interoperability is to make some Golang wrapper (it may be partial, only for anoncreds part) around Libindy and reuse it. This way may not fit the requirements of framework as it needs to be portable as far as I know.

The other way is to make a wrapper around LibUrsa and to make the same structures for proofs, proof requests and credentials. Libursa has portable builds that would not require any system dependencies but it will require more time and more tests to implement.

Comparison of LibVCX and Go framework

  • From the first glimpse Aries Go Framework seems to be more flexible its configs are built not only with configs like vcx (pretty obscure ones to be honest) but with calls of different methods on context or framework object.

  • Right now LibVCX is in some tested again Aries Test Suite (work and discussion is in progress) and I do not have any data about compatibility of Go Framework with the test suit. However, this complaint is less relevant because test suit is still in the draft state.

  • About Anoncreds I don't know how much useful JWT credentials are useful in Aries ecosystem, CL credentials are used by several agents by now. What is more, LibVCX has already implemented Credential Issuance and Proof Presentation RFCs.

  • Right now LibVCX and Go framework have two different connection protocols implemented LibVCX implemented Connection Protocol and Go framework has DID Exchange. Connection protocol is a legacy way of establishing a secure channel for interaction between agents but DID Exchange is still in a proposed state. As a result, integration will be a painful process, but most likely LibVCX will have to implement DID Exchange in some future.

  • Our vision on a common interaction workflow is similar LibVCX has caches as has stores for different connections and interaction threads.

  • REST API in Go framework is a useful piece of functionality and it is good that it is implemented outside of the framework itself. LibVCX does not have such a feature.

Updates

Questions for the Aries-Framework-Go Team

  • Did you evaluate LibIndy before taking your own approach?

    • Goal is to run in a web browser, so portability is a high priority.
    • Evaluated libindy, but the features provided by libindy (crypto and pack/unpack) wasn't worth the cost of importing / learning the code base.
    • It's important for the project to have multiple implementations.
  • We have heard that it is hard to consume C libraries inside of Go. Is that correct?

    • Not a lot of experience.
  • Are you happy with the C callable API that you experimented with?

    • Adding a C callable binding can be done in the same way as REST or WASM, but it hasn't been done yet.
  • What was your experience with adding WASM support?

    • Not difficult to cross compile Go to WASM.
    • Had to built a browser storage provider.
  • Why do you implement JWT credentials instead of Anoncreds?

    • It was a good place to start because it is easy to understand.
  • Do you expect to be able to hold Indy credentials?

    • Eventually want to support any kind of credentials with plugins to any ledger.
  • What are your plans for interopability testing?

    • Started with DID Exchange, but everyone else is still using the Connection Protocol so can't test interop.
Select a repo