Nikolay Volf
9ea0427678
MMR trees API ( #118 )
...
The main design goals of this mmr implementation were
1. Avoid database callbacks. As it is implemented, calling side must just smartly pre-load MMR nodes from the database (about log2(tree length) for append, twice as much for deletion).
2. Reuse as much code/logic between rust and c++ clients.
3. Close to zero memory consumption.
2019-12-04 21:24:26 +00:00
Nikolay Volf
e2c131fdc3
Merge pull request #5 from NikVolf/review-fixes
...
Review and other fixes
2019-11-29 01:10:27 -08:00
NikVolf
9059f53873
fix review notes and other issues
2019-11-28 15:36:39 +03:00
NikVolf
26be46573e
add hash of the node method
2019-11-28 10:31:16 +03:00
Nikolay Volf
71c6188bf8
Merge pull request #2 from NikVolf/review-fixes
...
Address offline review
2019-10-11 09:48:06 +03:00
NikVolf
acad37924b
test updates
2019-10-11 09:14:19 +03:00
NikVolf
481e43689c
use NodeData::combine
2019-10-11 09:04:04 +03:00
NikVolf
f24ec04340
add is_empty
2019-10-11 09:00:47 +03:00
NikVolf
b9bfc07146
style fixes
2019-10-11 08:58:59 +03:00
NikVolf
3082593fcc
add intented use of the api
2019-10-11 08:50:44 +03:00
NikVolf
6b7a3dec9c
store generated as vec
2019-10-11 08:44:20 +03:00
NikVolf
e701687b69
various small fixes
2019-10-11 08:28:50 +03:00
NikVolf
29b8d7a756
serialization roundtrip test
2019-10-11 08:18:36 +03:00
NikVolf
cb818ecbe3
serialization sizes notice
2019-10-11 08:04:42 +03:00
NikVolf
9d4412103b
more clear leaf_count
2019-10-11 08:00:07 +03:00
NikVolf
84dc3bf73c
license notice
2019-10-11 07:58:29 +03:00
NikVolf
7844394364
Remove unneeded extern crate
2019-10-08 16:12:14 +03:00
NikVolf
730d2cbc7e
fix outdated example
2019-09-28 12:50:28 +03:00
NikVolf
7476e4ea28
alphabetical order
2019-09-28 12:49:37 +03:00
NikVolf
b42477a0bf
update from rand_os to fix warnings
2019-09-28 10:48:43 +03:00
Nikolay Volf
4c9ebcce9a
Bump Rust to 1.37 on CI
2019-09-25 12:07:48 +02:00
NikVolf
da0d0a669a
more idiomatic naming
2019-09-25 09:53:06 +02:00
NikVolf
443f45f430
dry example a bit and reduce api
2019-09-25 09:50:59 +02:00
NikVolf
43efdf992b
prepare tree for deleting also
2019-09-24 15:28:34 +02:00
NikVolf
08806cc109
proper elapsed time calc
2019-09-24 13:47:32 +02:00
NikVolf
1eb4fb91f6
add invariant about number of returned links
2019-09-24 13:15:35 +02:00
NikVolf
7879b63321
add docs
2019-09-24 12:45:23 +02:00
NikVolf
ce2416623f
get rid of derive_more
2019-09-24 12:19:25 +02:00
NikVolf
fb6fef4e9c
update readme
2019-09-24 10:36:28 +02:00
NikVolf
38aa09b6a1
change package name
2019-09-24 10:35:44 +02:00
NikVolf
4cbc0451c1
switch to blake2_simd
2019-09-24 10:34:27 +02:00
NikVolf
79cba2e500
run against long examples
2019-09-10 12:51:23 +03:00
NikVolf
4ec651d172
update naming
2019-09-09 18:28:23 +03:00
NikVolf
f5c1381c4c
arrange data generator example properly
2019-09-09 18:23:18 +03:00
NikVolf
a0c33945ab
write for entry
2019-09-09 14:33:49 +03:00
NikVolf
96b130e034
update readme
2019-09-09 14:06:05 +03:00
NikVolf
636f3e3751
update readme
2019-09-09 11:52:57 +03:00
NikVolf
b73f49c968
add optional file generation
2019-09-09 11:50:41 +03:00
NikVolf
a5c4d51652
improve on api
2019-09-08 09:32:47 +03:00
NikVolf
c87122561f
add .travis.yml
2019-09-08 00:17:40 +03:00
NikVolf
9470610b75
license and readme
2019-09-07 19:23:13 +03:00
NikVolf
0afa122970
add .travis.yml
2019-09-07 19:18:49 +03:00
NikVolf
0bfd1d6b0d
resolve_link is of course public
2019-09-07 18:30:57 +03:00
NikVolf
ad403f1cca
add data reader
2019-09-07 18:22:37 +03:00
NikVolf
a9d2ce7150
from_bytes for NodeData
2019-09-07 18:15:18 +03:00
NikVolf
6d9deefb93
fix read and add from_bytes
2019-09-07 14:10:08 +03:00
NikVolf
49763d1c01
arrange constants
2019-09-07 14:04:51 +03:00
NikVolf
de053e1d8f
reading for Entry
2019-09-07 14:00:34 +03:00
NikVolf
03524ba7d0
entry to the dedicated module
2019-09-07 13:52:19 +03:00
Nikolay Volf
265c6e5303
Merge pull request #1 from niklasad1/na-rust2018ify
...
fix: use rust2018 idioms
2019-09-07 11:35:06 +03:00
NikVolf
5d0aa521c2
missing deserialization bits
2019-09-07 11:19:06 +03:00
NikVolf
a46ace4c2d
simplify tree preparation
2019-09-06 19:19:58 +03:00
NikVolf
942a976ef5
refactor numerous tests
2019-09-06 19:14:53 +03:00
NikVolf
5d2f84a154
carry root with tree
2019-09-06 18:52:27 +03:00
NikVolf
6b36cb5a51
example and neccessary fixes
2019-09-06 15:40:26 +03:00
NikVolf
872ac5af7b
avoid drain of vec
2019-09-03 18:31:51 +03:00
NikVolf
efac432128
remove todo and de-pub
2019-09-03 18:13:33 +03:00
NikVolf
b03b4cf958
hashing with blake2
2019-09-03 17:47:21 +03:00
NikVolf
d8c04e8143
node serialization
2019-09-03 17:22:21 +03:00
NikVolf
f432983f09
add notes and remove todos
2019-09-03 13:11:10 +03:00
NikVolf
bce88797f4
move node data to separate mod
2019-09-03 12:56:24 +03:00
NikVolf
771aa867c1
derive display for errors
2019-09-03 12:52:50 +03:00
NikVolf
615c4f662e
refactor to rust-only structures
2019-09-02 19:51:00 +03:00
NikVolf
49f20e6735
extra long truncate
2019-09-02 18:26:51 +03:00
NikVolf
d58b33fb78
simplify and optimize get_peaks
2019-09-02 18:18:33 +03:00
NikVolf
4c49f09515
extra quick-checks and fixes for deleting from full root
2019-09-02 18:05:20 +03:00
NikVolf
68983dc0c1
extra tests and notes
2019-09-02 15:28:51 +03:00
NikVolf
fa04929891
refactored append and fixed tests
2019-09-02 15:11:23 +03:00
NikVolf
c05446d2ae
add get_peaks method
2019-08-29 19:34:27 +03:00
NikVolf
e7d67364cc
add quickcheck(failing) also failing append
2019-08-23 16:25:34 +03:00
NikVolf
5a479363ff
new initializer
2019-08-22 20:35:56 +03:00
NikVolf
27337f1bb0
use assert_matches!
2019-08-22 17:43:03 +03:00
NikVolf
bd8eea97b7
add docs/comments and fix bug
2019-08-22 17:36:05 +03:00
NikVolf
3a09eef6b3
some ascii fun
2019-08-22 15:59:18 +03:00
NikVolf
767d73f777
extra asserts
2019-08-22 15:49:43 +03:00
NikVolf
5c6d856714
extra test
2019-08-22 15:47:49 +03:00
NikVolf
f316c1b439
remove whitespaces
2019-08-22 14:37:26 +03:00
NikVolf
261ad90d33
truncate leaf and test
2019-08-22 14:36:57 +03:00
NikVolf
66c31be6c5
commit from cbindgen
2019-08-20 20:10:29 +03:00
NikVolf
fec7e07764
refactor and fix warnings
2019-08-20 20:07:50 +03:00
NikVolf
845babc3c2
remove unuse dep
2019-08-20 18:42:44 +03:00
NikVolf
c794cdc680
fix signature and generate h
2019-08-20 18:09:09 +03:00
NikVolf
ae364f3ae7
initial commit
2019-08-20 18:05:14 +03:00
Nikolay Volf
081937162c
Initial commit
2019-08-19 11:29:06 +03:00