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

Replace the default SVM ABI with SSZ #494

Open
neysofu opened this issue Feb 16, 2022 · 0 comments
Open

Replace the default SVM ABI with SSZ #494

neysofu opened this issue Feb 16, 2022 · 0 comments
Labels
big Big-sized task help wanted Extra attention is needed sdk Related to the SVM SDK svm

Comments

@neysofu
Copy link
Contributor

neysofu commented Feb 16, 2022

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.

@neysofu neysofu added big Big-sized task help wanted Extra attention is needed sdk Related to the SVM SDK svm labels Feb 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
big Big-sized task help wanted Extra attention is needed sdk Related to the SVM SDK svm
Projects
None yet
Development

No branches or pull requests

1 participant