Walrus.

帖子

分享您的知识。

CarlkawIy.
Jun 14, 2025
专家问答

How to use Walrus for storing and verifying data on Solana?

I'm trying to build a Solana smart contract, and I need to hash some data on-chain. I want to store this hashed data using Walrus and verify it later. My main concern is whether to store this data on-chain or off-chain using Walrus. Additionally, I'm curious if storing the data off-chain allows for editing, and I am looking for the most efficient and secure method to enable this validation through the smart contract.

  • Walrus
  • Typescript SDK
0
2
分享
评论
.

答案

2
Bolke .
Jun 15 2025, 07:32

Currently, you can't upload data to Walrus directly from a Solana smart contract or a Sui smart contract. You'll need to handle the data collection and storage to Walrus off-chain. Once you store the data with Walrus and have the blob IDs, you can reference and store them on-chain using Solana if needed. Walrus blobs are meant to be managed through off-chain protocols, with their certification managed on the blockchain like Sui. For storing off-chain with Walrus, the data is first encoded into slivers and distributed across storage nodes. The storage of blobs in Walrus can be extended for long-term guarantees, but modifying the data itself would require new uploads and certifications.

0
评论
.
cod.
cod41
Jun 15 2025, 11:01

On-chain storage references the metadata and pointers to the actual blob data stored off-chain on Walrus. This means the content of blobs is stored off-chain, providing flexibility and reducing costs. Ensuring the security and validation of the data with a Solana smart contract would require checking against the certified Walrus events stored via Sui or similar on-chain events. It's crucial to ensure the hashes match during retrieval to confirm data integrity.

0
评论
.

你知道答案吗?

请登录并分享。

Walrus is a decentralized storage and data availability protocol designed specifically for large binary files, or "blobs"

84帖子153答案
Sui.X.Peera.

赚取你的 1000 Sui 份额

获取声誉积分,并因帮助 Sui 社区成长而获得奖励。