Skip to content

Commit

Permalink
docs: README revision
Browse files Browse the repository at this point in the history
  • Loading branch information
charmful0x authored Nov 14, 2024
1 parent c7395cd commit 473b2e0
Showing 1 changed file with 82 additions and 43 deletions.
125 changes: 82 additions & 43 deletions store/precomputed_key/wvm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,43 @@
</a>
</p>

# Related configuration
## Synopsis

See env file for holesky network
```
# WVM secondary storage related environment variables
WeaveVM-EigenDA Sidecar Proxy integrates WeaveVM as a permanent storage layer for EigenDA blobs. When blobs are dispersed through a proxy server with WeaveVM storage enabled, they are automatically stored in WeaveVM's network.

## About WeaveVM

WeaveVM is a sovereign EVM network built towards the goal of solving the EVM storage dilemma with Arweave. It gives the coming generation of high-performance chains a place to settle and store onchain data, without worrying about cost, availability, or permanence.

WeaveVM offers scalable and cost-effective storage by using Arweave as a decentralized hard drive, both at the node and smart contract layer. This makes it possible to store large data sets and run web2-like applications without incurring EVM storage fees. [Check out WeaveVM docs](https://docs.wvm.dev).

## Prerequisites

Check the `.env` file for configuration settings specific to the Holesky testnet

```env
# WeaveVM secondary storage related environment variables
# Set to true to enable WVM chain as a secondary storage
# EIGENDA_PROXY_WVM_ENABLED=
# WVM rpc endpoint
# WeaveVM Alphanet RPC endpoint
# EIGENDA_PROXY_WVM_ENDPOINT=https://testnet-rpc.wvm.dev/
# WVM chain id
# WeaveVM chain id
# EIGENDA_PROXY_WVM_CHAIN_ID=9496
# WVM web3signer endpoint
# WeaveVM web3signer endpoint
# EIGENDA_PROXY_WVM_WEB3_SIGNER_ENDPOINT=
# WVM private key in case you don't use web3signer, not recommended
# WVM_PRIV_KEY=
# WeaveVM private key in case you don't use web3signer, not recommended
# WVM_PRIV_KEY= ""
```

## Setup Guide: Booting EigenDA proxy with WeaveVM as a secondary storage

# Examples and How-TO

## How to boot EigenDA proxy with wvm as a secondary backend
### Option 1: without signer

Without signer:
```log
./bin/eigenda-proxy \
--addr 127.0.0.1 \
Expand All @@ -46,28 +55,23 @@ Without signer:
--storage.concurrent-write-routines 2
```

you should also set WVM_PRIV_KEY env variable with the private key of your WVM account
you should also set `WVM_PRIV_KEY` enviroment variable with the private key of your WeaveVM EOA.

### web3signer
### Option 2: with web3signer

#### WARNING
Using a remote signer comes with risks, please read the following two warnings before proceeding:
***Disclaimer: Using a remote signer comes with risks, please read the following warnings before proceeding:***

Remote signing is complex and risky
Remote signing is generally only desirable for enterprise users or users with unique security requirements.
> Remote signing is complex and risky. Remote signing is generally only desirable for enterprise users or users with unique security requirements.
Web3Signer is not maintained by WeaveVM team.
The Web3Signer tool is maintained by Consensys, the same team that maintains Teku. The WeavVM team does not maintain Web3Signer or make any guarantees about its safety or effectiveness.
> Web3Signer is not maintained by WeaveVM team. The Web3Signer tool is maintained by Consensys, the same team that maintains Teku. The WeavVM team does not maintain Web3Signer or make any guarantees about its safety or effectiveness.
#### USAGE

to see the most simple test deploy of local web3signer:
https://github.com/allnil/web3signer_test_deploy
- For a simple test deployment of a local Web3Signer setup, refer to: https://github.com/allnil/web3signer_test_deploy
- For complete documentation, consult: https://docs.web3signer.consensys.io/

also consult docs: https://docs.web3signer.consensys.io/
To run EigenDA Sidecar Service Proxy with WeaveVM as secondary storage and Web3Signer:

Command to run eigendaproxy + wvm as a secondary storage & web3signer:
```
```log
./bin/eigenda-proxy \
--addr 127.0.0.1 \
--port 3100 \
Expand All @@ -82,25 +86,11 @@ Command to run eigendaproxy + wvm as a secondary storage & web3signer:
--wvm.web3signer_endpoint http://localhost:9000
```


## About WeaveVM



## How it works
On each `PUT` request it stores the encoded eigenDA blob on WeaveVM as transaction type 2 calldata. WeaveVM chain(WVM) will also store it in Arweave protocol.

The stage of this integration is as PoC and an experimental feature. In this first v0 iteration the proxy internally stores mapping of eigenda blob as `key-> wvm_tx_hash`

You need to use your WVM address wchich holds tWVM test token.
You may propagate private key to the EigenDA proxy via WVM_PRIV_KEY env variable or use web3signer.
On each `PUT` request, the proxy stores the encoded EigenDA blob on WeaveVM as a type 2 transaction calldata. The WeaveVM network then permanently archives this data on the Arweave protocol.

You may see transactions from your address in weave vm explorer: https://explorer.wvm.dev/.

Block archive proof is a hash of associated arweave transaction.
You may use WeaveVM's `wvm://` data retrieval gateway to retrieve the data associated with a WeaveVM transaction (calldata) natively from WeaveVM's self-DA layer and Arweave's permanent WeaveVM-ExEx data protocol. [Check out the `wvm-data-retriever` codebase here](https://github.com/weavevM/wvm-data-retriever)

We host our own retriever instance: https://wvm-data-retriever.shuttleapp.rs/
***The stage of this integration is as PoC and an experimental feature.*** In this first v0 iteration the proxy internally stores mapping of eigenda blob as `key-> wvm_tx_hash`

### Commands and example of usage:

Expand Down Expand Up @@ -144,3 +134,52 @@ some data that will successfully be written to EigenDA%

### GET blob workflow
![](./media/get-workflow.png)

## Full test workflow example

- `wvm-eigenda-proxy` WeaveVM archiver address: [0xF8a5a479f04d1565b925A67D088b8fC3f8f0b7eF](https://explorer.wvm.dev/address/0xF8a5a479f04d1565b925A67D088b8fC3f8f0b7eF)
- Archive pool address: [0x0000000000000000000000000000000000000000](https://explorer.wvm.dev/address/0x0000000000000000000000000000000000000000)
- EigenDA network: Holesky
- WeaveVM network: Alphanet
- WeaveVM-EigenDA sidecar server proxy endpoint: https://eigenda-proxy-1047776281941.us-central1.run.app

### 1) Post data

```bash
curl -X POST "https://eigenda-proxy-1047776281941.us-central1.run.app/put/?commitment_mode=simple" \
--data-binary "WeaveGM from wvm-proxy" \
-H "Content-Type: application/octet-stream" \
--output response.bin
```
### 2) Trim the blob commitment

```bash
COMMITMENT=$(xxd -p response.bin | tr -d '\n' | tr -d ' ')
```

### 3) Get data from the proxy

```bash
curl -X GET "https://eigenda-proxy-1047776281941.us-central1.run.app/get/0x$COMMITMENT?commitment_mode=simple" \
-H "Content-Type: application/octet-stream"
```
### 4) Get the WeaveVM data TXID for a commitment

```bash
curl -X GET "https://eigenda-proxy-1047776281941.us-central1.run.app/wvm/get/txhash/0x$COMMITMENT?commitment_mode=simple" \
-H "Content-Type: application/octet-stream"
```

### 5) Get the EigenDA archived blob's decoded data from WeaveVM

This method use WeaveVM's `wvm://` data retrieval gateway to retrieve the data associated with a WeaveVM transaction (calldata) natively from WeaveVM's self-DA layer and Arweave's permanent WeaveVM-ExEx data protocol. [Check out the `wvm-data-retriever` codebase here](https://github.com/weavevM/wvm-data-retriever)

```bash
curl -X GET "https://eigenda-proxy-1047776281941.us-central1.run.app/wvm/get/0x$COMMITMENT?commitment_mode=simple" \
-H "Content-Type: application/octet-stream"
```
## Helpful Links

- WeaveVM Explorer: https://explorer.wvm.dev
- WeaveVM tWVM faucet: https://wvm.dev/faucet
- Discord: https://dsc.gg/wvm

0 comments on commit 473b2e0

Please sign in to comment.