Skip to content
This repository was archived by the owner on Aug 14, 2023. It is now read-only.
This repository was archived by the owner on Aug 14, 2023. It is now read-only.

Replace the default SVM ABI with SSZ #494

@neysofu

Description

@neysofu

For standardization's sake, we'd like to swap out the current ABI with SSZ. See also #493.

The ABI is subject to different concerns compared to svm-codec. Any chosen ABI implementation must (1) be Fixed-Gas compliant and (2) have the lowest code size possible.

While work can be done to mitigate concerns for (2), Fixed-Gas compliance is extremely hard. The chance of any given Rust SSZ library to compile down to Fixed-Gas compliant WebAssembly (i.e. without any loops) is effectively zero, so we'd have to build our own SSZ library, possibly dealing with some very hard technical challenges to remove any loop logic.

However, by "subsidizing" SSZ encoding and decoding logic using host calls, we can effectively solve both (1) and (2) with excellent performance and low code size footprint. This requires designing an FFI around SSZ decoding and encoding operations, which is perfectly doable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bigBig-sized taskhelp wantedExtra attention is neededsdkRelated to the SVM SDKsvm

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions