* Progress towards mock MainPod verification
* add MockMainPod.pub_statements logic so that when originid==SELF it is replaced by self.id()
* Basic op checking for mock MainPOD
* More op checking
* Add TODO notes
---------
Co-authored-by: arnaucube <git@arnaucube.com>
* Merge changes to docs
* Fix typo
* Correct SUMMARY so it compiles; update .gitignore
* Clean up statements.md
Make syntax and notation consistent with Rust source code.
* Fix statements for Merkle trees and compound types
* First draft of custom statements and small updates to signedpod.md
* Update book/src/merkletree.md
Co-authored-by: Ahmad Afuni <root@ahmadafuni.com>
* merklestatements correct typo
Co-authored-by: Ahmad Afuni <root@ahmadafuni.com>
* add todo for gadget ids
Co-authored-by: Ahmad Afuni <root@ahmadafuni.com>
* Remove custom statements, will do on separate branch
* Restore Merkle examples and statements table
---------
Co-authored-by: Ahmad Afuni <root@ahmadafuni.com>
Reasoning: till now we're only compiling it when the changes land at the
`main` branch, which allows invalid changes to the mdbook to pass the PR
check. With the update at this commit we ensure that the new PRs pass
the mdbook compilation check.
Migrate fmt to use Display trait to simplify the usage of it.
Also with this, in the same snipped of code we can print types from
backend, middleware and frontend; which before needed to import the two
different `Printer` structs (frontend::Printer and mock_main::Printer).
Before:
```
let printer = mock_main::Printer { skip_none: false };
let mut w = io::stdout();
printer.fmt_mock_main_pod(&mut w, &pod).unwrap();
let printer = frontend::Printer { skip_none: false };
printer.fmt_main_pod_builder(&mut w, &pod_builder).unwrap();
```
now:
```
println!("{:#}", pod);
println!("{:#}", pod_builder);
```
And the equivalent to the old `skip_none: true`, now is done by just
using `println!("{}", pod);
* compute MainPod.id from pub_statements; and introduce the trait `ToFields`
Compute MainPod.id from pub_statements hash; for it, introduce the trait
`ToFields` at the middleware and implement it for the Statement related
types.
* cleaner statements tofield iter
Co-authored-by: Ahmad Afuni <root@ahmadafuni.com>
---------
Co-authored-by: Ahmad Afuni <root@ahmadafuni.com>
Extend merkletree spec, init SignedPod section, add typos checker in CI
- extend merkletree spec, converting old hand-drawn diagrams to drawio
diagrams, and adding new diagrams (related: #6)
- init SignedPod section (related: #2)
- initial draft of the types dictionary, set, array (related: #26)
- add typos checker in CI (and correct the ones that were detected)
Note on drawio diagrams: each image file contains the metadata to edit the diagram in the draw.io website.
- Add SignerPod.id computation (integrate kvs with MerkleTree).
- Updates frontend::SignerPod to be a wrapper on top of
backend::SignerPod with extra metadata (a keymap between hashes and
their strings).
- Get's rid of SignerPod.compile() since now the frontend::SignerPod
uses the method `::new()` which internally calls
backend::SignerPod::new which constructs the merkletree to use it's root
as PodID.
Add initial MerkleTree implementation, which is a wrapper on top of
Plonky2's MerkleTree, with the idea that the future iteration will
replace it by the MerkleTree specified at
https://0xparc.github.io/pod2/merkletree.html .