ipfs / ipfs/go-ipld-cbor

worrisome behavior when upgrading refmt

Open
#66 2 comments 0 reactions 1 assignee Claimed by @warpfork View on GitHub
Dominant language
Go
Stars
37
Forks
26
PR merge metrics
No merged PRs in 30d

Description

Just wanted to note something we ran into in our codebase. We recently upgraded our refmt because it has a lot of performance improvements. However, we use uint64s in our objects. When you call https://github.com/ipfs/go-ipld-cbor/blob/master/node.go#L95 (`Decode`) here, those uint64s get unmarshaled into overflowed `int` and then re-encoded back... so the bytes and CID are different.

I realize the comment says that might happen, but this isn't "canonical cbor" we're talking about... this is a change from a uint64 into an overflowed Int that then gets reencoded.

The version *currently* in this library works fine... just wanted to give a "heads up" when you're thinking about upgrading.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.