While working on #329, we realized that there were more problems with the existing ABI, as a consequence of its "from earliest prototype" evolution. Beyond just addressing the concerns of the special-cases of char and different array arity between String and Address, the actual wire format had many complexities and special-cases which were only in place to support features we no longer support or decided not to complete and the core of the implementation was tightly coupled to our shadow class renaming logic.
Therefore, we decided it is time to redesign and fully reimplement the ABI (much later and we will have too many external dependencies to easily change it).
Design goals:
Embeddable: External tools and projects also need to be able to encode/decode the ABI, but shouldn't need to understand other details of our implementation. Therefore, anything specific to the AVM implementation must be a sort of plugin. (note that the need for this to be statically callable from the user code means handling this via a static singleton is effectively unavoidable)
New/few special-cases: Given that this has to be specified in great detail (it isn't core to the AVM implementation but we expect all applications to use it), we must avoid special-cases and other complexities wherever possible.
Hide/abstract Java-specific details: The DApp entry-points must be callable from other languages. This means we want to restrict certain concepts which seem Java-specific or are confusing outside of the Java language.
Rigid: This applies to both security and billing. We must be able to explain the cost and attack/bug surface of every call into the ABI.
While working on #329, we realized that there were more problems with the existing ABI, as a consequence of its "from earliest prototype" evolution. Beyond just addressing the concerns of the special-cases of
char
and different array arity betweenString
andAddress
, the actual wire format had many complexities and special-cases which were only in place to support features we no longer support or decided not to complete and the core of the implementation was tightly coupled to our shadow class renaming logic.Therefore, we decided it is time to redesign and fully reimplement the ABI (much later and we will have too many external dependencies to easily change it).
Design goals: