multiformats: rewrite CID (cid_v0 + cid_v1) module#14
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cid_v0andcid_v1implementations with bounded parsing/encoding flow and deterministic failure-state resetscid_v1ownership to internal bounded storage (CIDV1_MAX_MULTIHASH_SIZE) and removed heap allocation from CID rewrite scopeversion/codec varints + exact payload framing) for both bytes and string decode pathsFiles Changed
include/multiformats/cid/cid_v0.hinclude/multiformats/cid/cid_v1.hsrc/multiformats/cid/cid_v0.csrc/multiformats/cid/cid_v1.ctests/multiformats/cid/test_cid_v0.ctests/multiformats/cid/test_cid_v1.cRewrite Process Artifacts
/Users/multi/Documents/GitHub/libp2p/standards/rewrite-pilot-4-cid-v0-v1.mdValidation
cmake --build --preset macos-full --target cid_v0 cid_v1 test_cid_v0 test_cid_v1ctest --preset macos-full -R '^(Testcid_v0|Testcid_v1)$' --output-on-failurecmake --build --preset macos-full --target multibase cid_v0 cid_v1 test_multibase test_cid_v0 test_cid_v1 multiaddr test_multiaddr peer_id test_peer_idctest --preset macos-full -R '^(Testmultibase|Testcid_v0|Testcid_v1|Testmultiaddr|Testpeer_id)$' --output-on-failurecmake --preset linux-asan-ubsancmake --build --preset linux-asan-ubsan --target test_cid_v0 test_cid_v1ctest --preset linux-asan-ubsan -R '^(Testcid_v0|Testcid_v1)$' --output-on-failureclang-format --style=file --dry-run --Werror include/multiformats/cid/cid_v0.h include/multiformats/cid/cid_v1.h src/multiformats/cid/cid_v0.c src/multiformats/cid/cid_v1.c tests/multiformats/cid/test_cid_v0.c tests/multiformats/cid/test_cid_v1.ccppcheck --error-exitcode=1 --std=c99 --enable=warning,portability --quiet --suppress=missingIncludeSystem src/multiformats include/multiformats tests/multiformats src/peer_id include/peer_id tests/peer_idcppcheck --std=c99 --enable=all --check-level=exhaustive --quiet --suppress=missingIncludeSystem --suppress='*:tests/*' --addon=<misra.py> -I include src/multiformats/cid include/multiformats/cid tests/multiformats/cidscripts/dev/run-fast-lane-local.sh --platform macos