Skip to content
Snippets Groups Projects
  1. Aug 01, 2024
    • STEVAN Antoine's avatar
      refactor repo architecture (!161) · 3608e95a
      STEVAN Antoine authored
      ## changelog
      - `src/main.rs` has been moved to a new crate: `bins/saclin` which stands for **S**emi-**A**VID **CLI** in **N**ushell
      - dependencies of `komodo` have been fixed
      - Nushell and Rust tests have been split in the Makefile: by default, only Rust tests will run locally and Nushell tests and examples can be run manually if desired. The CI will still run everything.
      - the README has been updated
      - test images have been moved to `assets/`
      - the majority of the old `./nu-utils/` module have been moved to internals of `./benchmarks/` and imports have been fixed
      - `cargo.nu` has been moved to `./bins/` and a new `./bins/README.md` mentions it
      - `./bins/saclin/` has been created and should be a self-contained Rust crate + Nushell module
      3608e95a
  2. Jul 12, 2024
    • STEVAN Antoine's avatar
      refactor the Nushell modules (dragoon/komodo!158) · dad69f2c
      STEVAN Antoine authored
      this MR is two-fold
      - it restructures the two main Nushell modules so that they are easier to read and use
      - it improves the "run" and "plot" modules for the benchmarks
      
      ## changelog
      - `.nushell/` is now renamed to `nu-utils/`
      - `benchmarks/` is now a valid Nushell module which exports a bunch of modules
        - `benchmarks linalg`: measure and plot linear algebra operations
        - `benchmarks setup`: measure and plot trusted setup building
        - `benchmarks commit`: measure and plot crafting commitments
        - `benchmarks recoding`: measure and plot the recoding of shards
        - `benchmarks fec`: measure and plot FEC operations, such as encoding and recoding, and allow combining these results with the pure recoding ones
      - the submodules of `benchmarks` typically have a `run` and a `plot` command, whith the exception of `benchmarks fec` which has a `run` module and multiple "plot" commands in `benchmarks fec plot`
      - the "run" commands will create a random temp file by default and ask for confirmation otherwise if the output file already exists, unless `--force` is used
      - snippetds in `benchmarks/README.md` have been updated
      dad69f2c
  3. May 28, 2024
    • STEVAN Antoine's avatar
      split `examples/` into `benchmarks/` and `bins/` (dragoon/komodo!117) · bb626120
      STEVAN Antoine authored
      ## new structure for the repository
      - benchmarks are in `./benchmarks/` and can be run with either `cargo run --package benchmarks --bin <bench>` or the commands in `./benchmarks/README.md`
      ```
      ├── Cargo.toml
      ├── README.md
      └── src
          └── bin
              ├── commit.rs
              ├── fec.rs
              ├── linalg.rs
              ├── operations
              │   ├── curve_group.rs
              │   └── field.rs
              ├── recoding.rs
              ├── setup.rs
              └── setup_size.rs
      ```
      
      - examples are now in `./bins/` as standalone binaries and can be run either with `cargo run --package <pkg>` or with the help of the `cargo bin` command from `.nushell/cargo.nu`
      ```
      ├── curves
      │   ├── Cargo.toml
      │   ├── README.md
      │   └── src
      │       └── main.rs
      ├── inbreeding
      │   ├── build.nu
      │   ├── Cargo.toml
      │   ├── consts.nu
      │   ├── mod.nu
      │   ├── plot.nu
      │   ├── README.md
      │   ├── run.nu
      │   └── src
      │       ├── environment.rs
      │       ├── main.rs
      │       └── strategy.rs
      ├── rank
      │   ├── Cargo.toml
      │   └── src
      │       └── main.rs
      └── rng
          ├── Cargo.toml
          └── src
              └── main.rs
      ```
      
      - Nushell modules are now located in `./.nushell/`
      
      ## changelog
      apart from the changes to the general structure of the repo:
      - `binary.nu` -> `.nushell/binary.nu`
      - new `cargo bin` command from `.nushell/cargo.nu`
      - `error throw` is now defined in `.nushell/error.nu`
      - main TOML has been greatly simplified because the dependencies of "examples" have been moved to the associated crates
      - the rest is basically the same but in the new structure
      bb626120
  4. May 23, 2024
    • STEVAN Antoine's avatar
      Refactor plot commands (dragoon/komodo!104) · 0f43be24
      STEVAN Antoine authored
      this MR moves run and plot commands from `examples/benches/README.md` to
      - `scripts/setup/`: `run.nu` and `plot.nu`
      - `scripts/commit/`: `run.nu` and `plot.nu`
      - `scripts/recoding/`: `run.nu` and `plot.nu`
      - `scripts/fec/`: `run.nu` and `plot.nu`
      - `scripts/inbreeding/`: `build.nu`, `run.nu` and `plot.nu`
      
      to generate all the figures at once
      ```bash
      use scripts/setup/run.nu; seq 0 13 | each { 2 ** $in } | run --output data/setup.ndjson
      use ./scripts/setup/plot.nu; plot data/setup.ndjson --save ~/setup.pdf
      
      use scripts/commit/run.nu; seq 0 13 | each { 2 ** $in } | run --output data/commit.ndjson
      use ./scripts/commit/plot.nu; plot data/commit.ndjson --save ~/commit.pdf
      
      use scripts/recoding/run.nu; seq 0 18 | each { 512 * 2 ** $in } | run --ks [2, 4, 8, 16] --output data/recoding.ndjson
      use ./scripts/recoding/plot.nu; plot data/recoding.ndjson --save ~/recoding.pdf
      
      use scripts/fec/run.nu; seq 0 18 | each { 512 * 2 ** $in } | run --ks [2, 4, 8, 16] --output data/fec.ndjson
      use ./scripts/fec/plot.nu; plot encoding data/fec.ndjson --save ~/encoding.pdf
      use ./scripts/fec/plot.nu; plot decoding data/fec.ndjson --save ~/decoding.pdf
      use ./scripts/fec/plot.nu; plot e2e data/fec.ndjson --save ~/e2e.pdf
      
      use ./scripts/fec/plot.nu; plot combined data/fec.ndjson --recoding data/recoding.ndjson --save ~/comparison.pdf
      use ./scripts/fec/plot.nu; plot ratio data/fec.ndjson --recoding data/recoding.ndjson --save ~/ratio.pdf
      
      ./scripts/inbreeding/build.nu
      ./scripts/inbreeding/run.nu --output data/inbreeding.nuon
      ./scripts/inbreeding/plot.nu data/inbreeding.nuon --save ~/inbreeding.pdf
      ```
      
      > 💡 **Note**  
      > this took around 27min 18sec in total on my machine with 14min 45sec for the inbreeding section only and 12min 33sec for the rest
      0f43be24
Loading