feat: attach SHA-256 checksum as a blob attribute on store - #3544
Open
Patrick-Ehimen wants to merge 2 commits into
Open
feat: attach SHA-256 checksum as a blob attribute on store#3544Patrick-Ehimen wants to merge 2 commits into
Patrick-Ehimen wants to merge 2 commits into
Conversation
Adds an --attach-sha256-checksum flag to `walrus store` that computes the SHA-256 digest of each blob's raw bytes and attaches it as a sha256 on-chain blob attribute, reusing the existing BlobAttribute/CertifyAndExtendBlobParams plumbing. This lets users match externally-known file checksums to blobs stored on Walrus, as requested in MystenLabs#2961.
Contributor
Style Guide AuditAll 1 file(s) pass the style guide audit. |
Clarify that the checksum is stored onchain instead of on-chain.
Contributor
|
This PR is stale because it has been open 14 days with no activity. It will be closed in 7 days unless you remove the |
Author
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
--attach-sha256-checksumflag towalrus storethat computes the SHA-256 digest of each blob's raw, unencoded bytes and attaches it to the blob object as asha256on-chain blob attribute.BlobAttribute/CertifyAndExtendBlobParamsplumbing (already threaded through the owned-blob certify-and-extend transaction), so no contract changes are needed.attributesparameter throughreserve_and_store_blobs_retry_committees_with_pathinwalrus-sdkso path-based store calls (used by the CLI) can attach attributes, matching the attribute support already present inreserve_and_store_blobs_retry_committees.store-quilt, since the on-chain attribute lives on the quilt's top-levelBlobobject, not on individual patches.--child-process-uploadscontinues to work correctly.docs/content/walrus-client/storing-blobs.mdx.Closes #2961, which asked for the SHA-256 checksums computed during blob encoding to be exposed as Sui blob attributes so external file checksums can be matched to Walrus blobs.
Test plan
cargo check -p walrus-service --bin walruscompiles cleanly.sha256_checksum_attribute_matches_known_digest,sha256_checksum_attribute_of_empty_blob) incrates/walrus-service/src/client/cli/runner.rs.cargo nextest run -p walrus-service/ relevant e2e tests (not run locally due to environment constraints - please confirm in CI).