Skip to content

Conversation

@maxtropets
Copy link
Collaborator

@maxtropets maxtropets commented Dec 15, 2025

This's purely reading CBORs, and lacking more exhausting tests, but is a good starting point, maybe?

@maxtropets maxtropets self-assigned this Dec 15, 2025
@maxtropets maxtropets changed the title [DRAFT] [WIP] [DO-NOT-REVIEW-YET] Wrapping EverCBOR [DRAFT:DO-NOT-REVIEW-YET] Wrapping EverCBOR Dec 15, 2025
@maxtropets maxtropets force-pushed the f/cbor-wrappers branch 2 times, most recently from 92dc7d0 to f8c95f0 Compare December 16, 2025 16:12
@maxtropets maxtropets changed the title [DRAFT:DO-NOT-REVIEW-YET] Wrapping EverCBOR Wrapping EverCBOR Dec 16, 2025
@maxtropets maxtropets marked this pull request as ready for review December 16, 2025 16:18
@maxtropets maxtropets requested a review from a team as a code owner December 16, 2025 16:18
Copilot AI review requested due to automatic review settings December 16, 2025 16:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the direct use of EverCBOR with a new CBOR wrapper abstraction (ccf::cbor). The primary purpose is to simplify CBOR parsing operations throughout the codebase by providing a higher-level, type-safe API.

Key Changes:

  • Introduces a new CBOR wrapper library (src/crypto/cbor.h and src/crypto/cbor.cpp) that encapsulates EverCBOR operations
  • Refactors UVM endorsement parsing to use the new wrapper, significantly reducing code complexity (from ~400 lines to ~100 lines in the decode functions)
  • Updates error handling to use the new CBORDecodeError type consistently

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/crypto/cbor.h Defines the new CBOR wrapper API with types and parsing functions
src/crypto/cbor.cpp Implements the CBOR wrapper, including parsing and value extraction methods
src/node/uvm_endorsements.cpp Refactors protected header decoding to use the new CBOR wrapper instead of raw EverCBOR calls
cmake/crypto.cmake Adds the new cbor.cpp to the build configuration
Comments suppressed due to low confidence (1)

src/node/uvm_endorsements.cpp:343

  • Missing closing brace for the namespace ccf block. The namespace opened at line 9 should be closed after line 168.
  }
}

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@maxtropets maxtropets added the run-long-test Run Long Test job label Dec 24, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

maxtropets and others added 2 commits December 26, 2025 19:04
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

@maxtropets maxtropets merged commit 94cfea3 into microsoft:main Dec 26, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-long-test Run Long Test job

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants