dag import: errors with IPLD test vectors
Version
0.24.0
Description
Right now we have two edge cases where a CAR fails in GO but loads fine in JS:
Details and CAR to reproduce in the PR at https://github.com/ipld/codec-fixtures/pull/102#issuecomment-1830795380:
--- FAIL: TestFixtures/int--11959030306112471732 (0.00s) codecs_test.go:39: failed to load fixture: cbor: negative integer out of rage of int64 type --- FAIL: TestFixtures/int-11959030306112471731 (0.00s) codecs_test.go:39: failed to load fixture: strconv.ParseInt: parsing "11959030306112471731": value out of range --- FAIL: TestFixtures/int-18446744073709551615 (0.00s) codecs_test.go:39: failed to load fixture: strconv.ParseInt: parsing "18446744073709551615": value out of rangeFirst one is out, regardless, it's negative max uint64, which isn't a thing in Go. I did have an early proposal in ipld/go-ipld-prime#413 to return a negative indicator that could deal with this, but the complexity made it not worth it.
The other two failures are dag-json strconv failures. They could potentially be fixed, but are low priority, and I already have other json fixes in play that I can't get over the line (polydawn/refmt#58, not that I've pushed very hard on that).
Kubo 0.24 gives me:
$ ipfs dag import --pin-roots=false tmp/fixtures.car
Error: import failed at block "bafyreieir43khjzemsmgahaozab2vjvtdxavszixhhurvdqg2xkhrwinyi": cbor: negative integer out of rage of int64 type
Bugs to fix
Operating on assumption, IPLD fixtures are what we want to support, we need to adjust GO side of things to fix:
- [ ] change
ipfs dag importso it does no IPLD when--pin-roots=false - [ ] negative max uint64
- [ ] dag-json strconv failure due to value out of range