-
Notifications
You must be signed in to change notification settings - Fork 64
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
[Bug]: Semantic(None, "invalid type: bytes, expected bytes")
#96
Labels
bug
Something isn't working
Comments
This was referenced Oct 20, 2023
Following code could reproduce:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
Code of Conduct
Current Behaviour
I am getting the error
Semantic(None, "invalid type: bytes, expected bytes")
Expected Behaviour
deserialization works
Environment Information
Linux 6.5.4-76060504-generic #202309191142
169599894322.04~070916d SMP PREEMPT_DYNAMIC Fri S x86_64 x86_64 x86_64 GNU/LinuxSteps To Reproduce
The error is launched from here
ciborium/ciborium/src/de/mod.rs
Line 379 in 2ac91ce
scratch
is not enoughI can reproduce the error in a downstream crate with a type implementing custom serde Serialize/Deserialize: ElementsProject/rust-elements@45bd2bfThis type is longer than 4k bytes
When I try to reproduce without the downstream crate using something likeWrap(vec)
where vec is bigger than 4k bytes, things work because in this line:ciborium/ciborium/src/de/mod.rs
Line 369 in 2ac91ce
the scratch space has grown to accommodate the len of the bytes, (it is 8k even though it is initialized to 4k) while in the case of the error it's probably not growing for some reason I could not grasp yet.The text was updated successfully, but these errors were encountered: