- Aug 01, 2024
-
-
STEVAN Antoine authored
this is a refactor to prepare the addition of other cryptographic methods. ## changelog - moves Semi-AVID code from `lib.rs` to `semi_avid.rs`
-
- Jul 31, 2024
-
-
STEVAN Antoine authored
- 1c9077f6 add documentation to the errors - c388cbbb better FEC doc - 8d58278d doc of `zk.nb_elements_in_setup`
-
- Jul 12, 2024
-
-
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
-
STEVAN Antoine authored
## results     
-
- Jul 05, 2024
-
-
STEVAN Antoine authored
see the changelogs of - [Nushell `0.94.0`](https://www.nushell.sh/blog/2024-05-28-nushell_0_94_0.html) - [Nushell `0.94.1`](https://www.nushell.sh/blog/2024-05-30-nushell_0_94_1.html) - [Nushell `0.94.2`](https://www.nushell.sh/blog/2024-06-03-nushell_0_94_2.html) i also removed the `bytes encode` and `bytes decode` commands from `.nushell/binary.nu` because... well they did not work anymore and they were not used anywhere
-
STEVAN Antoine authored
## results >
**Note** > > using the improved plots from dragoon/komodo!153    -
STEVAN Antoine authored
this adds a new custom field to the `benchmarks::fields` new module and fixes the "linalg" commands to run the benchmarks ## results >
**Note** > > using the data from dragoon/komodo!156    -
STEVAN Antoine authored
## results  
-
STEVAN Antoine authored
adds a `.env.nu` file to load Nushell modules automatically thanks to the `nuenv` hook from the `nu-hooks` package.
-
STEVAN Antoine authored
- show the log of the degree for high values - don't show the "time" Y label because the units are in the times values - don't rotate the X tick labels ## results  
-
- Jun 07, 2024
-
-
STEVAN Antoine authored
-
STEVAN Antoine authored
see [`dragoon/nc-diversity`](https://gitlab.isae-supaero.fr/dragoon/nc-diversity)
-
STEVAN Antoine authored
-
STEVAN Antoine authored
this will - recode for $\#steps \in [10, 20, 100]$ - at $t = 0$, $k$ random shards among the $n$ encoded will be selected at random - at $t \geq 1$, all $k$ shards will be used to recode $k$ brand new shards - make sure the last set of $k$ shards recoded $\#steps$ together can decode the data ## example with $(k, n) = (3, 5)$ and $\#steps = 3$ - $(s_i)_{1 \leq i \leq k}$ are the $k$ source shards - $(e_j)_{1 \leq j \leq n}$ are the $n$ encoded shards - $(m_i)_{1 \leq i \leq k}$ are the $k$ randomly selected shards - $(n_i)_{1 \leq i \leq k}$ are the shards after step $1$ - $(o_i)_{1 \leq i \leq k}$ are the shards after step $2$ - $(p_i)_{1 \leq i \leq k}$ are the shards after step $3$ - the $(p_i)_{1 \leq i \leq k}$ will be used for decoding ```mermaid graph TD; s1 --> e1; s1 --> e2; s1 --> e3; s1 --> e4; s1 --> e5; s2 --> e1; s2 --> e2; s2 --> e3; s2 --> e4; s2 --> e5; s3 --> e1; s3 --> e2; s3 --> e3; s3 --> e4; s3 --> e5; e1 --> m1; e3 --> m2; e4 --> m3; m1 --> n1; m1 --> n2; m1 --> n3; m2 --> n1; m2 --> n2; m2 --> n3; m3 --> n1; m3 --> n2; m3 --> n3; n1 --> o1; n1 --> o2; n1 --> o3; n2 --> o1; n2 --> o2; n2 --> o3; n3 --> o1; n3 --> o2; n3 --> o3; o1 --> p1; o1 --> p2; o1 --> p3; o2 --> p1; o2 --> p2; o2 --> p3; o3 --> p1; o3 --> p2; o3 --> p3; ```
-
STEVAN Antoine authored
- pass `n` to `try_all_decoding_combinations` and don't try to decode when shards have been recoded ($\#shards > n$) and there are no recoded shards in the $k$ combination under review ($\max(is) < n$) - pass `recoding_steps` and `should_not_be_decodable` as arguments to `end_to_end_with_recoding_template` - fix $n = 5$ => this leads to tests that run in less than 10sec again - add $(k, n) = (8, 10)$ => tests still run in less than 13sec - split recoding scenarii into "_simple_" and "_chain_" - show indices in a "_pretty_" format, i.e. showing indices greater than $n$ as `(n)`, `(n + 1)`, ...
-
- Jun 06, 2024
-
-
STEVAN Antoine authored
- `komodo::linalg::Matrix::random` is tested - `komodo::linalg::Matrix::inverse` is tested on more matrix sizes, from $1$ to $20$ random matrices - `komodo::field` tests have been double-checked - pure "recoding" tests from `komodo::fec` have been double-checked - `end_to_end` and `end_to_end_with_recoding` now runs for $k \in [3, 5]$ and $\rho \in [\frac{1}{2}, \frac{1}{3}]$ with $n = \lfloor \frac{k}{\rho} \rfloor$ - all "_$k$ among $n + t$_" combinations are tested with `try_all_decoding_combinations`, possibly with some removals in case recoding is involved with `is_inside` >
**Important** > on my machine, `make test` goes from less than 8sec on latest `main` to around 40sec with this MR -
STEVAN Antoine authored
they have been moved to [dragoon/binaries](https://gitlab.isae-supaero.fr/dragoon/binaries).
-
- Jun 05, 2024
-
-
STEVAN Antoine authored
this is the trivial case where it is always possible to decode the original data, so there is no need to have it here.
-
- Jun 03, 2024
-
-
STEVAN Antoine authored
this MR - moves the Nushell modules from `bins/inbreeding/` to `bins/inbreeding/src/.nushell/` - creates a `NUSHELL` constant in `consts.nu` to allow the following more robust construct ```bash use consts.nu use $consts.NUSHELL ... ``` - updates the README
-
STEVAN Antoine authored
-
STEVAN Antoine authored
this simply makes "parsing" in the inbreeding modules more robust and centralized.
-
STEVAN Antoine authored
-
- May 31, 2024
-
-
STEVAN Antoine authored
- early return when format is bad twice - refactor
-
STEVAN Antoine authored
wait for - !134 ## description assuming !134 has been merged, this MR allows to run something like ```bash inbreeding list | input list --fuzzy | inbreeding load $in | inbreeding plot ``` which will fuzzy find the available experiments and then plot it after load
-
STEVAN Antoine authored
this can be used by `plot` without passing extra arguments, i.e. the pipeline becomes ```bash use bins/inbreeding let experiment = "..." ``` ```bash inbreeding load $experiment | inbreeding plot ``` instead of having to know the value of `k` and do ```bash inbreeding load $experiment | inbreeding plot --options { k: $k } ```
-
STEVAN Antoine authored
- addresses #9 - needed !133 to work this MR simply adds `+ Clone` to `rng` and removes the `mut` from the `rng` of the `measure_inbreeding` function. running the same snippet of code from #9 yields the following two images with a schedule of $1$ and $5$ respectively   we see that all measurements on $t$ where $t = 0 \mod 5$ are the same in both images
-
- May 30, 2024
-
-
STEVAN Antoine authored
related to - #9 in order for the measurements not to influence the experiment, the seeds passed to the runs need to not include the _measurement schedule_ parameters! EDIT: in the end, it's more than that, we want to only include things related to the environment in its hash, nothing related to the measurements, i.e. we want to either - exclude `strategies`, `nb_scenarii`, `measurement_schedule`, `measurement_schedule_start`, `nb_measurements` and `max_t` - include `nb_bytes`, `k`, `n` and `environment`
-
STEVAN Antoine authored
## output sample let's say the current seed is `"b239e48345ac457b492cc164f58c010d07292c88e4791e607d91796baec7f334"` and the experiment has ID `fixed:0-single:3-5-50-10240`, and that we are watching both the creation of the first experiment and a few runs, e.g. - `002d8de28913efbf7dbd111b817ae901fee2d47882ba7aa76d293c2d95d9652c` - `015672b37c9cf1a6b475937987294f9a503a922ffbcfdfc5d18ef839fac91b8c` - `080a51a17ac43fcbdf08f77f3bc993983fef589bd9672f04382af4b16dd09b13` then the output would look like ``` b239e48 fixed:0-single:3-5-50-10240 at 2024-05-30 15:24:12 b239e48 fixed:0-single:3-5-50-10240 002d8de at 2024-05-30 15:24:14 b239e48 fixed:0-single:3-5-50-10240 015672b at 2024-05-30 15:24:16 b239e48 fixed:0-single:3-5-50-10240 080a51a at 2024-05-30 15:24:18 ```
-
STEVAN Antoine authored
we are switching - _naive recoding_ to _$(k, 1)$-re-encoding_ - _true recoding_ to _$k$-recoding_
-
STEVAN Antoine authored
this is to have a complete identifier for each run, which does not depend at all on the time at which the experiment runs.
-
STEVAN Antoine authored
related to - !122 ## description !122 introduced a `draw_unique_indices` function which uses a `HashSet` to accumulate unique indices in the range `0..<len`. however, a `HashSet` does not preserve the order of insertion when iterating over the elements of the set... which results in apparent randomness, even though the RNG seed is the same
this MR switches back to using `shuffle` which used to work, even though a bit less performant it's basically a revert of !122, while keeping the refactoring into `random.rs`. ## measuring the performance i did run the same timing experiment from !122 but with `main` on `bb55005f` and the MR on `fix-shuffle` | env | main | mr | improvement | | ------- | ---------------------- | ----------------------- | ------------------- | | fixed:0 | 6sec 244ms 238µs 45ns | 8sec 734ms 929µs 328ns | -39.88783363238997 | | fixed:1 | 639ms 720µs 39ns | 731ms 360µs 261ns | -14.325051024390373 | we loose a bit -
STEVAN Antoine authored
- add optional `$.help` to argument `err` of `error throw` - parse `prng_seed: [u8; 32]` in `rng` and `inbreeding` - compute the "_local_" seed by hashing the "_global_" seed, the strategy and the iteration index - pass `--prng-seed: string`, a 64-char long seed to `inbreeding run`
-
- May 29, 2024
-
-
STEVAN Antoine authored
because the "_environment_" can contain an experiment separator, e.g. `random-fixed`, more powerful `parse` patterns needs to be used.
-
STEVAN Antoine authored
* 7b44a886 refactor constants from `inbreeding load` * 64e446f7 move `remove-cache-prefix` to new `path.nu` * 822b03fd add `inbreeding inspect`
-
STEVAN Antoine authored
in order to add more information in the experiment names, e.g. $k$, $n$ and $\#\text{bytes}$, this MR changes the cache files format from ``` {seed}/{timestamp}/{env}/{strategy}/... ``` to ``` {seed}/{timestamp}-{env}-{strategy}-{k}-{n}-{nb_bytes}/... ```
-
STEVAN Antoine authored
this MR turns `./.nushell/` into a directory module by - adding `mod.nu` - exporting all the modules all uses of `.nushell/` have been fixed to not mention `.nu` internal modules anymore. >
**Note** > the `.nushell venv` module has been removed because, when the `$venv.VENV` activation script is not there, Nushell can't parse the whole `.nushell` module, which is very annoying to have to rely of the state of the external filesystem to be able to simply parse a module... -
STEVAN Antoine authored
-
STEVAN Antoine authored
this also bumps Nushell to 0.93.0 to include the "extra" command `fmt`, see [Nushell 0.92.0](https://www.nushell.sh/blog/2024-04-02-nushell_0_92_0.html#incorporating-the-extra-feature-by-default-toc)
-
STEVAN Antoine authored
in `./bins/inbreeding/`, this MR does - refactor the "list item drawing" from `environment.rs` and `strategy.rs` into the `draw_unique_elements` function of new `random.rs` module - use a `HashSet` to draw unique indices in the slice of "things" to draw from and then extracts the items corresponding to these indices ## results ```bash use ./bins/inbreeding use std bench const PRNG_SEED = 0 const OPTS = { nb_bytes: (10 * 1_024), k: 10, n: 20, nb_measurements: 100, nb_scenarii: 10, measurement_schedule: 1, measurement_schedule_start: 2_000, max_t: 2_000, strategies: [ "single:5" ], environment: null, } def run [rev: string] { git co $rev inbreeding build let a = bench --rounds 5 { inbreeding run --options ($OPTS | update environment "fixed:0") --prng-seed $PRNG_SEED } let b = bench --rounds 5 { inbreeding run --options ($OPTS | update environment "fixed:1") --prng-seed $PRNG_SEED } { 0: $a, 1: $b, } } let main = run a29b511d let mr = run fix-shuffle ``` ```bash let table = [ [env, main, mr, improvement]; ["fixed:0", $main."0".mean, $mr."0".mean, (($main."0".mean - $mr."0".mean) / $main."0".mean * 100)], ["fixed:1", $main."1".mean, $mr."1".mean, (($main."1".mean - $mr."1".mean) / $main."1".mean * 100)], ] $table | to md --pretty ``` | env | main | mr | improvement | | ------- | ----------------------- | ----------------------- | ------------------ | | fixed:0 | 8sec 504ms 794µs 784ns | 6sec 353ms 206µs 645ns | 25.298530930431912 | | fixed:1 | 727ms 648µs 292ns | 639ms 443µs 782ns | 12.12186037811795 | the improvement is quite nice, even though not huge, but the code is cleaner anyways
-
- May 28, 2024
-
-
STEVAN Antoine authored
this adds `$.diversity.e` to the output of `inbreeding load` and input of `inbreeding plot` to show errors bars in the final plot. these can be discarded by running something similar to ```bash inbreeding load $experiment | reject diversity.e | inbreeding plot --options { k: $OPTS.k } ```
-