wvm:// Data Protocol

About wvm:// data retrieving protocol

About wvm://

WeaveVM Data Retriever (wvm://) is a protocol for retrieving data from the WeaveVM network. It leverages the WeaveVM DA layer and Arweave’s permanent storage toprovide trustless access WeaveVM transaction data through both networks, whether that’s data which came from WeaveVM itself, or L2 data that was settled to WeaveVM.

Many chains solve this problem by providing query interfaces to archival nodes or centralized indexers. For WeaveVM, Arweave is the archival node, and can be queried without special tooling. However, the data WeaveVM stores on Arweave is also encoded, serialized and compressed, making it cumbersome to access. The wvm:// protocol solves this problem by providing an out-of-the-box way to grab and decode WeaveVM data while also checking it has been DA-verified.

How it works

The data retrieval pipeline ensures that when you request data associated with a WeaveVM transaction, it passes through at least one DA check (currently through WeaveVM’s self-DA, and soon AO).

It then retrieves the transaction block from Arweave, published by WeaveVM ExExes, decodes the block (decompresses Brotli and deserializes Borsh), and scans the archived sealed block transactions within WeaveVM to locate the requested transaction ID, ultimately returning the calldata (input) associated with it.

Try it out

Currently, the wvm:// gateway server provides two methods: one for general data retrieval and another specifically for transaction data posted by the wvm-archiver nodes. To retrieve calldata for any transaction on WeaveVM, you can use the following command:

curl -X GET https://gateway.wvm.dev/calldata/$WVM_TXID

The second method is specific to wvm-archiver nodes because it decompresses the calldata and then deserializes its Borsh encoding according to a predefined structure. This is possible because the data encoding of wvm-archiver data is known to include an additional layer of Borsh-Brotli encoding before the data is settled on WeaveVM.

curl -X GET https://gateway.wvm.dev/war-calldata/$WVM_TXID

Benchmarks

Latency for /calldata

The latency includes the time spent fetching data from WeaveVM RPC and the Arweave gateway, as well as the processing time for Brotli decompression, Borsh deserialization, and data validity verification.

Check out the wvm:// data protocol protocol here

Last updated