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

v2: Change SDK::send's params to take new type IpldBlock #1199

Merged
merged 1 commit into from
Dec 12, 2022

Conversation

arajasek
Copy link
Contributor

@arajasek arajasek commented Dec 5, 2022

IpldBlock supports multiple codecs, including IPLD_RAW.

Serializing byte vectors will correctly serialize anything that serializes to "raw bytes". However, it won't serialize "byte lists", so Vec<u8> and [u8] won't work. But that shouldn't be an issue in practice.

Users should serialize to/from ByteBuf.

@codecov-commenter
Copy link

codecov-commenter commented Dec 5, 2022

Codecov Report

Merging #1199 (1f93f9b) into release/v2 (70b320e) will decrease coverage by 0.73%.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff               @@
##           release/v2    #1199      +/-   ##
==============================================
- Coverage       52.04%   51.31%   -0.74%     
==============================================
  Files             124      126       +2     
  Lines           10101    10243     +142     
==============================================
- Hits             5257     5256       -1     
- Misses           4844     4987     +143     
Impacted Files Coverage Δ
ipld/encoding/src/cbor.rs 9.37% <ø> (ø)
ipld/encoding/src/errors.rs 58.62% <0.00%> (-5.67%) ⬇️
ipld/encoding/src/ipld_block.rs 0.00% <0.00%> (ø)
ipld/encoding/src/lib.rs 48.14% <ø> (ø)
ipld/encoding/src/raw.rs 0.00% <0.00%> (ø)
sdk/src/message.rs 0.00% <0.00%> (ø)
sdk/src/send.rs 0.00% <0.00%> (ø)

@arajasek arajasek force-pushed the asr/ipld-block-v2 branch 2 times, most recently from 1f93f9b to 1c8a858 Compare December 5, 2022 20:04
Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

Modulo breaking change.

ipld/encoding/src/cbor.rs Show resolved Hide resolved
IpldBlock supports multiple codecs, including IPLD_RAW.

Serializing byte vectors will correctly serialize anything that serializes to "raw bytes".
However, it _won't_ serialize "byte lists", so `Vec<u8>` and `[u8]`
won't work. But that shouldn't be an issue in practice.

Users _should_ serialize to/from `ByteBuf`.
@arajasek arajasek merged commit c25362c into release/v2 Dec 12, 2022
@arajasek arajasek deleted the asr/ipld-block-v2 branch December 12, 2022 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants