Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deserialize_bytes with data bigger than 4k #97

Closed
wants to merge 2 commits into from

Conversation

RCasatta
Copy link

close #96

The test format is not like the others but I didn't find a way to leverage the existing test suite to expose the error.

@RCasatta RCasatta requested a review from a team as a code owner October 20, 2023 08:26
@RCasatta RCasatta requested a review from dpal October 20, 2023 08:26
@RCasatta RCasatta changed the title Bytes bigger than 4k deserialize_bytes with data bigger than 4k Oct 20, 2023
@rjzak
Copy link
Member

rjzak commented Oct 20, 2023

Thank you for the PR!

RCasatta added a commit to Blockstream/gdk that referenced this pull request Oct 26, 2023
we switched to ciborium because serde_cbor it's unmantained.
However, serde_cbor never gave us trouble, while ciborium had the
"invalid type: bytes, expected bytes" bug, which has been attempted to be solved
upstream in enarx/ciborium#97
Apart that we have no input on the MR yet, in trying to use the patched version
we encountered the error:
"invalid type: string, expected map"
which is probably due to the fact the patched version is on master and not just
the bug fix from the tagged version we use.
While this later approach could work, ciborium doesn't look that reliable so we
decided to switch back to serde_cbor for the time being.
LeoComandini pushed a commit to Blockstream/gdk that referenced this pull request Oct 26, 2023
we switched to ciborium because serde_cbor it's unmantained.
However, serde_cbor never gave us trouble, while ciborium had the
"invalid type: bytes, expected bytes" bug, which has been attempted to be solved
upstream in enarx/ciborium#97
Apart that we have no input on the MR yet, in trying to use the patched version
we encountered the error:
"invalid type: string, expected map"
which is probably due to the fact the patched version is on master and not just
the bug fix from the tagged version we use.
While this later approach could work, ciborium doesn't look that reliable so we
decided to switch back to serde_cbor for the time being.
@rjzak rjzak force-pushed the bytes_bigger_than_4k branch from 187988c to 6ac789d Compare February 17, 2024 02:05
@rjzak
Copy link
Member

rjzak commented Jul 4, 2024

This won't work as-is because Ciborium aims to work in no_std environments, and vec! requires the standard library. Feel free to re-work and re-open if you wish. Perhaps it could be gated on #[cfg_attr(feature = "std")]

@rjzak rjzak closed this Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug]: Semantic(None, "invalid type: bytes, expected bytes")
2 participants