Cosmos-sdk: General Amino audit / cleanup / IAVL changes

Created on 11 May 2020  路  7Comments  路  Source: cosmos/cosmos-sdk

Summary

In the process of migrating to protobuf, several pieces of the code outside of the core tx/query/state logic are also relying on amino in addition to

This issue is to track a task of auditing and migrating all the remaining bits:

In general:

  • all data types should be proto-marshalable
  • all code that does marshaling should use codec.Marshaler instead of amino directly (IAVL may need to implement its own marshaler interface)
code-hygiene encoding meta-issue pinned

All 7 comments

is the plan to remove amino from IAVL before 0.39 release of the sdk?

cc @aaronc @clevinson

That would be desirable

From @erikgrinaker:

So about IAVL and Amino: it would actually be trivial to strip out Amino (the library)
but retain  the same encoding. The only thing it actually uses is varints
(which are included in the Go stdlib), and varint-prefixed byte slices.

I鈥檓 not convinced that moving to Protobuf schemas has any significant benefit over
this, especially since the Protobuf encoding is basically the same (varints everywhere).

I agree in that IAVL can be simplified and just use binary varint encoding. No need for anything special here.

Submitted an initial IAVL PR here: https://github.com/cosmos/iavl/pull/265

Need to figure out what to do with encoding of proofs.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This is done right? @blushi? Closing.

Was this page helpful?
0 / 5 - 0 ratings