feat(DA): Minimal PeerDAS Data Availability Client - DA client side#1485
feat(DA): Minimal PeerDAS Data Availability Client - DA client side#1485KimiWu123 wants to merge 10 commits into
Conversation
* init: da_node cli * memory store framework * add verification service * chore: eliminate warnings
* complete store read/write * optimize in-memory index * refine the file format * chore: define DA_VERIFICATION_QUEUE_CAPACITY
* impl. the verification of candidate columns * spawn store put (a file write)
* impl. ingest_handle for the verification queue * test ingest handle
* impl availability struct * add data prune fn under store * test: add tests for data prune * process retention * add a retention test
* rpc for ingest * start da rpc in run_da_node * support availability * support column data query * support retention hint * add rpc tests * restrict local ip only
* verifier adapter * add tests and minor refinement * wire up new kzg verifier * warm up trusted setup * set beacon network for max_blobs_per_block
* comment to explain the division of labor * test: a mock verifier fore da_node service * test: add a real sidecar case * refactor: minor KzgVeririder refactor * health check api * support 503 error in da rpc
87877d6 to
20eb069
Compare
|
Thanks for putting this together and for mentioning me. |
|
Hi @perfogic If you just stick a thin interface in front of the availability + verification bits, anything that's really DA node's job can sit behind it — mock it for now, and later we swap the mock for the actual RPC call to the DA node. That way you don't have to touch any DA logic to keep going: it runs against the mock today, and in phase 3 we just plug in the real thing instead of reworking the checker. Basically lets us build both sides in parallel, and makes phase 3 a wiring job instead of a rewrite. |
|
Currently, the The plan is closer to the Later, if we decide to integrate a standalone |
|
|
|
Yeah, still the same as what we discussed in the common channel. Also, I just updated the Phase 3 description in the tracking issue (#1478) to add the boundary, that should answer the duplication concern. |
* check availability before verify * check slot in candidate and in block header if consistent * add a helper function - holds in DaAvailability * fix da path and move trusted setup to the end of run_da_node * fix typo and format
What was wrong?
To address #1408, have a standalone DA client.
This is an MVP of the minimal DA client, and I want to hear your feedback regarding the architecture before jumping into the implementation details.
It's easier to review the PR commit by commit.
How was it fixed?
Summary
The core of a minimum DA node. It runs as its own process beside the beacon node and does one thing: durably store a block's data columns and verify them, over a small local HTTP/RPC surface. The beacon keeps consensus logic; the DA node keeps the data.
Command:
cargo run -p ream -- -v 4 --ephemeral da_nodeDesign philosophy
Crate layout
graph TB bin["bin/ream<br/>"] rpc["ream-rpc-da<br/>HTTP / RPC ingress"] node["ream-da-node<br/>(pipeline) ingest → verify → store"] kzg["da_adapters<br>(ream-da-verifier-kzg)<br/>KZG verifier"] core["ream-da<br/>core: traits + domain types"] ext["ream-consensus-beacon<br/>+ KZG libraries"] bin --> rpc bin --> node bin --> kzg rpc --> core rpc --> node node --> core kzg --> core kzg --> ext style core fill:#e8f5e9,stroke:#43a047 style bin fill:#e3f2fd,stroke:#1e88e5 style ext fill:#f5f5f5,stroke:#bbbArrows read "depends on".
ream-dadepends on nothing beacon- or crypto-specific; beacon types and KZG are reachable only through the adapter. The pipeline depends solely on the core's traits, so the concrete verifier is injected at bin/ream.What's included
Next steps
To-Do