From cea8ff22568a886e16778f1fe84994769345e446 Mon Sep 17 00:00:00 2001 From: allnil Date: Thu, 14 Nov 2024 12:23:55 +0000 Subject: [PATCH] chore: clean readme --- store/precomputed_key/wvm/README.md | 102 ++++++++++++++++++++++++---- 1 file changed, 90 insertions(+), 12 deletions(-) diff --git a/store/precomputed_key/wvm/README.md b/store/precomputed_key/wvm/README.md index e7ee8c2..a44584f 100644 --- a/store/precomputed_key/wvm/README.md +++ b/store/precomputed_key/wvm/README.md @@ -26,13 +26,72 @@ See env file for holesky network # WVM_PRIV_KEY= ``` -## About WeaveVM-EigenDA Side Server Proxy -WeaveVM-EigenDA Sidecar Proxy is a fork of EigenDA's sidecar proxy modified to use [WeaveVM](https://wvm.dev) as a permanent archive layer for EigenDA blobs dispersed from this customized proxy server. + +# Examples and how to + +## How to boot EigenDA proxy with wvm as a secondary backend + +Without signer: +```log +./bin/eigenda-proxy \ + --addr 127.0.0.1 \ + --port 3100 \ + --eigenda.disperser-rpc disperser-holesky.eigenda.xyz:443 \ + --eigenda.signer-private-key-hex $PRIVATE_KEY \ + --eigenda.eth-rpc https://ethereum-holesky-rpc.publicnode.com \ + --eigenda.svc-manager-addr 0xD4A7E1Bd8015057293f0D0A557088c286942e84b \ +--wvm.endpoint https://testnet-rpc.wvm.dev/ \ +--wvm.chain_id 9496 \ +--storage.fallback-targets wvm \ +--storage.concurrent-write-routines 2 +``` + +you should also set WVM_PRIV_KEY env variable with the private key of your WVM account + +### web3signer + +#### WARNING +Using a remote signer comes with risks, please read the following two warnings before proceeding: + +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. + +#### USAGE + +to see the most simple test deploy of local web3signer: +https://github.com/allnil/web3signer_test_deploy + +also consult docs: https://docs.web3signer.consensys.io/ + + +Command to run eigendaproxy + wvm as a secondary storage & web3signer: +``` +./bin/eigenda-proxy \ + --addr 127.0.0.1 \ + --port 3100 \ + --eigenda.disperser-rpc disperser-holesky.eigenda.xyz:443 \ + --eigenda.signer-private-key-hex $PRIVATE_KEY \ + --eigenda.eth-rpc https://ethereum-holesky-rpc.publicnode.com \ + --eigenda.svc-manager-addr 0xD4A7E1Bd8015057293f0D0A557088c286942e84b \ +--wvm.endpoint https://testnet-rpc.wvm.dev/ \ +--wvm.chain_id 9496 \ +--storage.fallback-targets wvm \ +--storage.concurrent-write-routines 2 \ +--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 `batch_id:blob_index -> wvm_tx_hash` +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 account wchich holds tWVM test token. You may propagate private key to the EigenDA proxy via WVM_PRIV_KEY env variable or use web3signer. @@ -42,23 +101,41 @@ You may see transactions from your address in weave vm explorer: https://explore 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) -## WeaveVM Proxy Methods - -### 1- Get WeaveVM tx hash of a dispersed blob +### Commands and example of usage: +#### 1) Put ```bash -curl -X GET "https://eigenda-proxy-1047776281941.us-central1.run.app/get/0x$COMMITMENT?commitment_mode=simple" \ - -H "Content-Type: application/octet-stream" +curl -X POST "http://127.0.0.1:3100/put?commitment_mode=simple" \ + --data-binary "some data that will successfully be written to EigenDA" \ + -H "Content-Type: application/octet-stream" \ + --output response.bin ``` -### 2- Get a dispersed blob from WeaveVM +#### 2) Get ```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" +COMMITMENT=$(xxd -p response.bin | tr -d '\n' | tr -d ' ') +curl -X GET "http:/127.0.0.1:3100/get/0x$COMMITMENT?commitment_mode=simple" \ + -H "Content-Type: application/octet-stream" +``` + +### example workflow log + +```log +➜ ✗ curl -X POST "http://127.0.0.1:3100/put?commitment_mode=simple" \ + --data-binary "some data that will successfully be written to EigenDA" \ + -H "Content-Type: application/octet-stream" \ + --output response.bin + + +➜ ✗ COMMITMENT=$(xxd -p response.bin | tr -d '\n' | tr -d ' ') + +➜ ✗ curl -X GET "http:/127.0.0.1:3100/get/0x$COMMITMENT?commitment_mode=simple" \ + -H "Content-Type: application/octet-stream" +some data that will successfully be written to EigenDA% ``` -REWORK!: + ## Data pipelines ### PUT blob workflow @@ -68,6 +145,7 @@ REWORK!: ![](./media/get-workflow.png) ## Full test workflow example + - `wvm-eigenda-proxy` WeaveVM archiver address: [0xF8a5a479f04d1565b925A67D088b8fC3f8f0b7eF](https://explorer.wvm.dev/address/0xF8a5a479f04d1565b925A67D088b8fC3f8f0b7eF) - Archive pool address: [0x606dc1BE30A5966FcF3C10D907d1B76A7B1Bbbd9](https://explorer.wvm.dev/address/0x606dc1BE30A5966FcF3C10D907d1B76A7B1Bbbd9) - EigenDA network: Holesky