Philipp Gackstatter
a27f9ad828
refactor: use `thiserror` to derive errors and update error messages ( #344 )
4 months ago
Al-Kindi-0
50dd6bda19
fix: skip using the field element containing the proof-of-work ( #343 )
5 months ago
Al-Kindi-0
0d75e3593b
chore: migrate to Winterfell v0.10.0 release ( #338 )
5 months ago
Bobbin Threadbare
689cc93ed1
chore: update crate version to v0.11.0 and set MSRV to 1.82
6 months ago
Al-Kindi-0
a734dace1e
feat: update RPO's padding rule to use that in the xHash paper ( #318 )
6 months ago
Andrey Khmuro
940cc04670
feat: add `Smt::is_empty` ( #337 )
6 months ago
Andrey Khmuro
e82baa35bb
feat: return error instead of panic during MMR verification ( #335 )
6 months ago
Philipp Gackstatter
8adc0ab418
feat: implement `get_size_hint` for `Smt` ( #331 )
6 months ago
Philipp Gackstatter
a924ac6b81
feat: Add size hint for digests ( #330 )
6 months ago
Bobbin Threadbare
e214608c85
fix: bug introduced due to merging
7 months ago
Bobbin Threadbare
e34900c7d8
chore: update version to v0.10.1
7 months ago
Santiago Pittella
2b184cd4ca
feat: add de/serialization to `InOrderIndex` and `PartialMmr` ( #329 )
7 months ago
Bobbin Threadbare
913384600d
chore: fix typos
7 months ago
Qyriad
ae807a47ae
feat: implement transactional Smt insertion ( #327 )
* feat(smt): impl constructing leaves that don't yet exist
This commit implements 'prospective leaf construction' -- computing
sparse Merkle tree leaves for a key-value insertion without actually
performing that insertion.
For SimpleSmt, this is trivial, since the leaf type is simply the value
being inserted.
For the full Smt, the new leaf payload depends on the existing payload
in that leaf. Since almost all leaves are very small, we can just clone
the leaf and modify a copy.
This will allow us to perform more general prospective changes on Merkle
trees.
* feat(smt): export get_value() in the trait
* feat(smt): implement generic prospective insertions
This commit adds two methods to SparseMerkleTree: compute_mutations()
and apply_mutations(), which respectively create and consume a new
MutationSet type. This type represents as set of changes to a
SparseMerkleTree that haven't happened yet, and can be queried on to
ensure a set of insertions result in the correct tree root before
finalizing and committing the mutation.
This is a direct step towards issue 222, and will directly enable
removing Merkle tree clones in miden-node InnerState::apply_block().
As part of this change, SparseMerkleTree now requires its Key to be Ord
and its Leaf to be Clone (both bounds which were already met by existing
implementations). The Ord bound could instead be changed to Eq + Hash,
if MutationSet were changed to use a HashMap instead of a BTreeMap.
* chore(smt): refactor empty node construction to helper function
7 months ago
Paul-Henry Kajfasz
ee42d87121
Replace i. by 1.
8 months ago
Paul-Henry Kajfasz
b1cb2b6ec3
Fix comments
8 months ago
Paul-Henry Kajfasz
8bf6ef890d
fmt
8 months ago
Paul-Henry Kajfasz
e2aeb25e01
Updated doc comments
8 months ago
Bobbin Threadbare
a12e62ff22
feat: improve MMR api ( #324 )
8 months ago
Paul-Henry Kajfasz
ad0f472708
Updated Makefile and Readme
8 months ago
Bobbin Threadbare
dfdd5f722f
chore: fix lints
8 months ago
Elias Rad
d6ab367d32
chore: fix typos ( #321 )
8 months ago
Al-Kindi-0
b06cfa3c03
docs: update RPO with a comment on security given domain separation ( #320 )
10 months ago
Al-Kindi-0
8556c8fc43
fix: encoding Falcon secret key basis polynomials ( #319 )
10 months ago
Augusto Hack
78ac70120d
fix: `hex_to_bytes` can be used for data besides RpoDigests ( #317 )
11 months ago
Al-Kindi-0
f967211b5a
feat: migrate to new Winterfell ( #315 )
11 months ago
Augusto Hack
d58c717956
rpo/rpx: export digest error enum ( #313 )
11 months ago
Augusto Hack
c0743adac9
Rpo256: Add RpoDigest conversions ( #311 )
11 months ago
Menko
63f97e5621
feat: add rpx random coin ( #307 )
1 year ago
Al-Kindi-0
bb42388827
fix: bug in Falcon secret key basis order ( #305 )
1 year ago
Dominik Schmid
2a0ae70645
feature: adding serialization to the SMT ( #304 )
1 year ago
Bobbin Threadbare
4bf087daf8
fix: decrement leaf count in simple SMT when inserting empty value ( #303 )
1 year ago
polydez
b4dc373925
feat: add leaf count to `SimpleSmt` ( #302 )
1 year ago
Bobbin Threadbare
5a2e917dd5
Tracking PR for v0.9.0 release ( #278 )
* chore: update crate version to v0.9.0
* chore: remove deprecated re-exports
* chore: remove Box re-export
* feat: implement pure-Rust keygen and signing for RpoFalcon512 (#285 )
* feat: add reproducible builds (#296 )
* fix: address a few issues for migrating Miden VM (#298 )
* feat: add RngCore supertrait for FeltRng (#299 )
---------
Co-authored-by: Al-Kindi-0 <82364884+Al-Kindi-0@users.noreply.github.com>
Co-authored-by: Paul-Henry Kajfasz <42912740+phklive@users.noreply.github.com>
1 year ago
Bobbin Threadbare
2be17b74fb
fix: add re-exports of vec and format macros
1 year ago
Paul Schoenfelder
4c8a9809ed
fix: re-add unintentionally removed re-exported liballoc macros ( #292 )
1 year ago
Paul Schoenfelder
999a64fca6
chore: handle deprecations in winterfell 0.8.3 release
1 year ago
Augusto Hack
dbab0e9aa9
fix: clippy warnings ( #280 )
1 year ago
Andrey Khmuro
cd4525c7ad
refactor: update repo to be compatible with Winterfell 0.8 ( #275 )
1 year ago
Philippe Laferrière
552d90429b
Remove `TieredSmt` ( #277 )
1 year ago
Philippe Laferrière
119c7e2b6d
`SmtProof`: add accessors ( #276 )
* add accessors
* fmt
* comments
1 year ago
Philippe Laferrière
45e7e78118
Clone ( #274 )
1 year ago
Philippe Laferrière
a9475b2a2d
reexport ( #273 )
1 year ago
Philippe Laferrière
e55b3ed2ce
Introduce `SmtProof` ( #270 )
* add conversion for `SmtLeaf`
* introduce `SmtProof` scaffolding
* implement `verify_membership()`
* SmtLeaf: knows its index
* `SmtLeaf::index`
* `SmtLeaf::get_value()` returns an Option
* fix `verify_membership()`
* impl `SmtProof::get`
* impl `into_parts()`
* `SmtProof::compute_root`
* use `SmtProof` in `Smt::open`
* `SmtLeaf` constructors
* Vec
* impl `Error` for `SmtLeafError`
* fix std Error
* move Word/Digest conversions to LeafIndex
* `SmtProof::new()` returns an error
* `SparseMerkleTree::path_and_leaf_to_opening`
* `SmtLeaf`: serializable/deserializable
* `SmtProof`: serializable/deserializable
* add tests for SmtLeaf serialization
* move `SmtLeaf` to submodule
* use constructors internally
* fix docs
* Add `Vec`
* add `Vec` to tests
* no_std use statements
* fmt
* `Errors`: make heading
* use `SMT_DEPTH`
* SmtLeaf single case: check leaf index
* Multiple case: check consistency with leaf index
* use `pub(super)` instead of `pub(crate)`
* use `pub(super)`
* `SmtLeaf`: add `num_entries()` accessor
* Fix `SmtLeaf` serialization
* improve leaf serialization tests
1 year ago
Bobbin Threadbare
61a0764a61
fix: peak index calculation in MmrProof
1 year ago
Philippe Laferrière
3d71a9b59b
`Smt`: remove inner nodes when removing value ( #269 )
1 year ago
Philippe Laferrière
da12fd258a
Add missing methods to `Smt` ( #268 )
1 year ago
Bobbin Threadbare
5fcf98669d
feat: add PartialMmr::from_parts() constructor
1 year ago
Philippe Laferrière
1cdd3dbbfa
Add methods to `Smt` necessary for VM tests ( #264 )
* Smt::inner_nodes
* Add conversion Smt -> MerkleStore
* add docstring to `Smt`
* add to docstring
* fmt
* add `leaves()` method to `Smt`
* add `kv_pairs` functions
* rewrite `into_elements()` in terms of `into_kv_pairs()`
* change docstring
1 year ago
Bobbin Threadbare
d59ffe274a
feat: add Debug and Clone derives for Falcon signature
1 year ago