Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] EAT Not Deterministically Encoded to CBOR #293

Open
ben-krieger opened this issue Sep 12, 2024 · 0 comments
Open

[BUG] EAT Not Deterministically Encoded to CBOR #293

ben-krieger opened this issue Sep 12, 2024 · 0 comments

Comments

@ben-krieger
Copy link
Member

Describe the bug
The EAToken is sometimes observed to have map keys not in bytewise lexically sorted order. Deterministic encoding is a requirement of FDO.

Example:

A2                                      # map(2)
   19 0100                              # unsigned(256)
   51                                   # bytes(17)
      017212778A2879DFE790E1CDFEE1A6925C # "\u0001r\u0012w\x8A(y\xDF\xE7\x90\xE1\xCD\xFEᦒ\\"
   0A                                   # unsigned(10)
   50                                   # bytes(16)
      AF5511E701488034ED3080BE51989F69  # "\xAFU\u0011\xE7\u0001H\x804\xED0\x80\xBEQ\x98\x9Fi"

To Reproduce
Probably random, but will eventually happen in TO1 and/or TO2.

Expected behavior
Key 0A should be before 190100 in the example. Generally, bytewise lexical sort order should be used for map keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant