Actyx / Actyx/banyan

Unexpected cbor code `0xa1` when decoding `banyan::index::Index<trees::axtrees::AxTrees>`.

Open
#112 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
42
Forks
6
PR merge metrics
No merged PRs in 30d

Description

This error basically says “I don’t want to read this dictionary of length 1”, which is the “kinded” representation of `Index` (DagCbor doesn’t like definite-length encoding, IIRC). I encountered this while developing event dump/restore functionality in Actyx. The restore part feeds events to `BanyanStore::append0` (to preserve timestamps) and does not mess with the internals, so I don’t see how my code could influence the encoding of a Banyan index block.

How much work would it be to replace all DagCbor with cbor-data? I trust that implementation much more, it is very thoroughly tested to actually accept all valid CBOR.

/cc @rklaehn

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at BanyanStore::append0 and trace the event dump/restore path into banyan::index::Index. Reproduce the unexpected 0xa1 decoding error, then compare the current DagCbor handling with cbor-data. Done means the restore path can decode the Banyan index block without that error and the scope of any DagCbor replacement is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.