From d0d3372013b83cb743de6f7475aff79e7fc067a7 Mon Sep 17 00:00:00 2001 From: curiecrypt <36852463+curiecrypt@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:59:05 +0300 Subject: [PATCH] Documentation - Folder organization for Centralized docs (#89) ## Content This PR includes a new folder structure for centralized documentation. Some example markdown files are created and they are linked to the related source files. The content will be filled out after the team approves the doc structure and pr #66 and #73 are merged. ## Pre-submit checklist - Branch - [x] Commit sequence broadly makes sense - [x] Key commits have useful messages - PR - [x] No clippy warnings in the CI - [x] Self-reviewed the diff - [x] Useful pull request description - [x] Reviewer requested - Documentation - [x] Update documentation website (if relevant) ## Issue(s) Closes #88 --- docs/centralized_telescope/main.md | 3 +++ docs/centralized_telescope/params.md | 3 +++ docs/centralized_telescope/proof.md | 2 ++ docs/centralized_telescope/round.md | 2 ++ src/centralized_telescope/mod.rs | 2 ++ src/centralized_telescope/params.rs | 2 ++ src/centralized_telescope/proof.rs | 2 ++ src/centralized_telescope/round.rs | 2 ++ src/docs.rs | 12 ++++++++++++ 9 files changed, 30 insertions(+) create mode 100644 docs/centralized_telescope/main.md create mode 100644 docs/centralized_telescope/params.md create mode 100644 docs/centralized_telescope/proof.md create mode 100644 docs/centralized_telescope/round.md diff --git a/docs/centralized_telescope/main.md b/docs/centralized_telescope/main.md new file mode 100644 index 00000000..7e348fa3 --- /dev/null +++ b/docs/centralized_telescope/main.md @@ -0,0 +1,3 @@ +# Telescope - Construction with Bounded DFS +This is the main page of centralized documentation. +It will include a generic explanation of the protocol. diff --git a/docs/centralized_telescope/params.md b/docs/centralized_telescope/params.md new file mode 100644 index 00000000..f03d0bbb --- /dev/null +++ b/docs/centralized_telescope/params.md @@ -0,0 +1,3 @@ +# Parameters +It will include the documentation of the implementation related to `params`. +It also will cover the parameter derivation. diff --git a/docs/centralized_telescope/proof.md b/docs/centralized_telescope/proof.md new file mode 100644 index 00000000..03febd52 --- /dev/null +++ b/docs/centralized_telescope/proof.md @@ -0,0 +1,2 @@ +# Proof +It will include the documentation of the implementation related to `proof`. diff --git a/docs/centralized_telescope/round.md b/docs/centralized_telescope/round.md new file mode 100644 index 00000000..e92e4227 --- /dev/null +++ b/docs/centralized_telescope/round.md @@ -0,0 +1,2 @@ +# Round +It will include the documentation of the implementation related to `round`. diff --git a/src/centralized_telescope/mod.rs b/src/centralized_telescope/mod.rs index 5fa2ca28..a011f611 100644 --- a/src/centralized_telescope/mod.rs +++ b/src/centralized_telescope/mod.rs @@ -1,6 +1,8 @@ //! ALBA's bounded DFS scheme using Blake2b as hash function. //! (c.f. Section 3.2.2 of Alba paper) +#![doc = include_str!("../../docs/centralized_telescope/main.md")] + mod algorithm; pub mod init; diff --git a/src/centralized_telescope/params.rs b/src/centralized_telescope/params.rs index 680468eb..d61d229a 100644 --- a/src/centralized_telescope/params.rs +++ b/src/centralized_telescope/params.rs @@ -1,5 +1,7 @@ //! ALBA's Setup structure +#![doc = include_str!("../../docs/centralized_telescope/params.md")] + /// Setup input parameters #[derive(Debug, Clone, Copy)] pub struct Params { diff --git a/src/centralized_telescope/proof.rs b/src/centralized_telescope/proof.rs index 19ae72f1..b97ad20a 100644 --- a/src/centralized_telescope/proof.rs +++ b/src/centralized_telescope/proof.rs @@ -1,5 +1,7 @@ //! ALBA's Proof structure +#![doc = include_str!("../../docs/centralized_telescope/proof.md")] + use crate::utils::types::Element; /// Alba proof diff --git a/src/centralized_telescope/round.rs b/src/centralized_telescope/round.rs index ce1bbe93..c5b566f8 100644 --- a/src/centralized_telescope/round.rs +++ b/src/centralized_telescope/round.rs @@ -1,5 +1,7 @@ //! ALBA's Round structure and associated functions +#![doc = include_str!("../../docs/centralized_telescope/round.md")] + use super::types::Hash; use crate::utils::sample; use crate::utils::types::Element; diff --git a/src/docs.rs b/src/docs.rs index 8295dff3..7a6d47fc 100644 --- a/src/docs.rs +++ b/src/docs.rs @@ -4,3 +4,15 @@ #[doc = include_str!("../docs/varmap.md")] pub mod variables {} + +#[doc = include_str!("../docs/centralized_telescope/main.md")] +pub mod centralized { + #[doc = include_str!("../docs/centralized_telescope/params.md")] + pub mod params {} + + #[doc = include_str!("../docs/centralized_telescope/proof.md")] + pub mod proof {} + + #[doc = include_str!("../docs/centralized_telescope/round.md")] + pub mod round {} +}