From 95ac1846b2a03a8dd813137ae3b79256c9f82d02 Mon Sep 17 00:00:00 2001 From: utsire <190686333+utsire@users.noreply.github.com> Date: Sat, 15 Feb 2025 14:08:08 +0900 Subject: [PATCH 1/2] Add docs for multiproof API --- rpc/kate-rpc/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rpc/kate-rpc/src/lib.rs b/rpc/kate-rpc/src/lib.rs index 0d3d8373c..97612c996 100644 --- a/rpc/kate-rpc/src/lib.rs +++ b/rpc/kate-rpc/src/lib.rs @@ -47,6 +47,14 @@ where at: Option>, ) -> RpcResult>; + /// This method returns a multiproof for the given cells. + /// The multiproof grid size can be calculated using [`kate::gridgen::multiproof_dims`] + /// Cell indices must be valid for the dimensions returned by [`kate::gridgen::multiproof_dims`]. + /// Each cell index will return a proof for a 2d-contiguous block of underlying grid cells. + /// You can figure out which using the [`kate::gridgen::multiproof_block`] method. + /// This specifies the indices to validate the proof against + /// * commitment indices should be taken from (`start_y`, `end_y`) + /// * field elements should be taken from ('start_x`, `end_x`) #[method(name = "kate_queryMultiProof")] async fn query_multiproof( &self, From 6f606c84adfa594ebed22374b9f9a9dbe77537ba Mon Sep 17 00:00:00 2001 From: utsire <190686333+utsire@users.noreply.github.com> Date: Sat, 15 Feb 2025 14:11:51 +0900 Subject: [PATCH 2/2] Add example of returned value to doc --- rpc/kate-rpc/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rpc/kate-rpc/src/lib.rs b/rpc/kate-rpc/src/lib.rs index 97612c996..245d7fad4 100644 --- a/rpc/kate-rpc/src/lib.rs +++ b/rpc/kate-rpc/src/lib.rs @@ -55,6 +55,10 @@ where /// This specifies the indices to validate the proof against /// * commitment indices should be taken from (`start_y`, `end_y`) /// * field elements should be taken from ('start_x`, `end_x`) + /// The data in each [`GMultiProof`] is both the underlying field values in the corresponding + /// cell block in row-major order and the multiproof for that block. + /// Ex: the first cell in [`GMultiProof.0`] is the top-left cell in the block with underlying + /// grid indices `start_y` and `start_x`. #[method(name = "kate_queryMultiProof")] async fn query_multiproof( &self,