You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of #340 we introduced the ability to encode big ints in LEB128, and we converted the places we use big ints to ues it. We haven't yet gotten to the point of encoding uint64 values that we store as LEB128. Storing them as LEB128 means they can grow without bound. The specific places that need to be converted are at least:
the uint64 fields on Block
Actor.Nonce
To convert I think we have to introduce a new type Uint64 uint64 in types and a custom atlas entry that uses leb128.From/ToUint64 to do the en/decoding. I started down that route and only had to add a few type conversions but hit an issue with dag_daemon_test where the json encoding for the new Uint64 type wasn't playing nice with cbor (or something). I'm going to try to get to it before i disappear for 2 weeks but if not i might ask someone to pick this up so we can close 340 out.
BTW the reason we need to introduce a new type is because that's how refmt works: it can do exactly one mapping for named types (meaning you can't add a mapping directly for uint64).
The text was updated successfully, but these errors were encountered:
Fixes#587
In which we convert the uint64's to a new type, Uint64 which we teach refmt to serialize in LEB128. Why you may ask does this PR marshal Uint64 to json as a string instead of a number? See #599
As part of #340 we introduced the ability to encode big ints in LEB128, and we converted the places we use big ints to ues it. We haven't yet gotten to the point of encoding uint64 values that we store as LEB128. Storing them as LEB128 means they can grow without bound. The specific places that need to be converted are at least:
To convert I think we have to introduce a new
type Uint64 uint64
in types and a custom atlas entry that uses leb128.From/ToUint64 to do the en/decoding. I started down that route and only had to add a few type conversions but hit an issue with dag_daemon_test where the json encoding for the new Uint64 type wasn't playing nice with cbor (or something). I'm going to try to get to it before i disappear for 2 weeks but if not i might ask someone to pick this up so we can close 340 out.BTW the reason we need to introduce a new type is because that's how refmt works: it can do exactly one mapping for named types (meaning you can't add a mapping directly for uint64).
The text was updated successfully, but these errors were encountered: