chore(deps): replace cbor4ii with minicbor-serde in redb Cbor wrapper#728
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe ChangesCBOR Library Migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR replaces
Confidence Score: 5/5Safe to merge — both previously flagged issues are resolved and the dependency graph is consistent. The change is a clean library swap: cbor4ii is fully removed from Cargo.toml and Cargo.lock, minicbor-serde is properly declared at both the workspace and crate level, and the two call sites in cbor.rs use the correct minicbor-serde API. Byte compatibility is claimed via manual cross-encoding tests covering all four stored record types. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Cbor<T> wrapper\n(cbor.rs)"] -->|"as_bytes()"| B["minicbor_serde::to_vec(value)"]
A -->|"from_bytes()"| C["minicbor_serde::from_slice(data)"]
B --> D["redb table storage\n(Vec<u8>)"]
D --> C
E["cbor4ii removed"] -.->|"replaced by"| B
E -.->|"replaced by"| C
Reviews (2): Last reviewed commit: "fix: push minicbor-serde in Cargo.toml" | Re-trigger Greptile |
cbor4ii was the only direct CBOR dependency not already in the minicbor family. This migrates the single use site in rust/src/database/cbor.rs to minicbor-serde, consolidating all Cove-owned CBOR serialization under one implementation family. Byte compatibility was verified with 8 cross-encoding tests covering all four stored record types (TransactionRecord, AddressRecord, InputRecord, OutputRecord) including Option::None, Option::Some and variants. cbor4ii and minicbor-serde produce identical bytes for all cases, so existing redb tables remain readable without any migration. Closes bitcoinppl#724
456a2bd to
6344b01
Compare
praveenperera
left a comment
There was a problem hiding this comment.
thanks @muhahahmad68 approved
Closes #724
Summary
Replaces the direct
cbor4iidependency withminicbor-serdein the redbCbor<T>wrapper (rust/src/database/cbor.rs), consolidating all Cove-owned CBOR serialization under theminicborfamily.Byte compatibility was verified with 8 cross-encoding tests covering all four stored record types (TransactionRecord, AddressRecord, InputRecord, OutputRecord) including Option::None, Option::Some and variants. cbor4ii and minicbor-serde produce identical bytes for all cases, so existing redb tables remain readable without any migration.
Testing
Platform Coverage
cargo tree -i cbor4ii— no output (removed from dependency graph)cargo fmt --all— cleancargo clippy— cleancargo test— 502 passed, 0 failedChecklist
Summary by CodeRabbit