filecoin-project / filecoin-project/ref-fvm

KAMT: Remove or change mapping of integers to keys

Open
#2,123 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
422
Forks
154
PR merge metrics
PR metrics pending

Description

Right now we map integers to KAMT keys by encoding them with "native endian":

1. This is non-portable, but almost always going to be little-endian.
2. Little endian is never what we actually _want_. We want keys that are close to have prefixes that are close, that's how the KAMT works.

Fortunately, nobody (that I know of) is actually using this feature. _We_ _always use byre-array keys, not integers (except in tests). So, our options here are:

1. Switch from "native endian" to "little endian". This is the "least breaking" fix, but we don't _want_ little endian.
2. Switch from "native endian" to "big endian". This is the "silently breaking" fix, but it does what we want.
3. Remove built-in support for integer keys. This is the "safely breaking" fix. This is the fix we should go with as good OSS stewards but... the real question here is, does anybody else actually care?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.