summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Hash over the MerkleTreeLeaf.Linus Nordberg2014-09-192-16/+11
| | | | | Hash over correct timestamp when adding submitted entries. Hash over the full #mtl{} when adding entries from db.
* Add field 'mtlhash' to the database, for get-proof-by-hash.Linus Nordberg2014-09-184-49/+68
| | | | | | | | | | Also, in db: Add field 'mtlhash' to record 'plop'. Rename 'hash' -> 'entryhash'. Add leaf_hash(), calculating a leaf hash from data. Fix a bug where print_tree() print half a byte of the hashes. Rename tree_hash() -> root(). Closes CATLFISH-3.
* Rewrite ts to use a list of lists and change its API.Linus Nordberg2014-09-162-88/+94
| | | | | | | | | | | We want to get rid of maps because they're a bit too new for some distributions. Replacing the arrays with lists is not necessary and arguably not even the right move -- they're about twice as costly RAM wise and the CPU cost for accesses are O(n). This cleans up the implementation though so let's keep it as a reference implementation. Changes to ht include poping potential placeholders in parent layer before adding and swapping IR -> RI all over, for consistency.
* Have inclusion/2 return Index too.newerhtLinus Nordberg2014-09-151-5/+5
|
* Add inclusion/2.Linus Nordberg2014-09-151-1/+11
|
* Make two comments @doc.Linus Nordberg2014-09-151-3/+2
|
* Add consistency/2.Linus Nordberg2014-09-151-5/+6
|
* Adjust plop for changes in ht.Linus Nordberg2014-09-142-43/+30
|
* Add comments to separate public API from testing and debugging funs.Linus Nordberg2014-09-141-0/+2
|
* Update #tree.evaluated for V=0 too.Linus Nordberg2014-09-141-1/+1
|
* Add reset_tree/1 and change new() and init().Linus Nordberg2014-09-141-10/+18
|
* Guard path/4 against future versions.Linus Nordberg2014-09-141-4/+6
|
* Add three more test vectors for consistency proofs.Linus Nordberg2014-09-141-12/+33
| | | | Also add print_tree/1.
* Implement consistency proofs.Linus Nordberg2014-09-141-11/+101
|
* Implement path/2.Linus Nordberg2014-09-131-65/+199
|
* Add docu in comments, rename two external functions, add a larger test.Linus Nordberg2014-09-121-8/+23
|
* Add support for retrieving historical tree heads.Linus Nordberg2014-09-122-34/+77
|
* Add a few tests.Linus Nordberg2014-09-111-3/+8
|
* Add some explaining comments. Remove some debugging code.Linus Nordberg2014-09-111-11/+20
|
* Another hashtree implementation, first cut.Linus Nordberg2014-09-112-171/+239
| | | | | This one stores the tree in arrays, one per layer in the tree. It's implemented as gen_server.
* Remove some lying comments.newhtLinus Nordberg2014-09-101-3/+1
|
* Add size/1.Linus Nordberg2014-09-101-2/+5
|
* Indent properly.Linus Nordberg2014-09-101-4/+4
|
* Make dialyzer happier.Linus Nordberg2014-09-101-2/+2
| | | | | Make sure test function returns something. I would imagine that eunit.hrl should take care of this but haven't investigated.
* Fix missing spec change.Linus Nordberg2014-09-101-1/+1
|
* Fix (unused) test function.Linus Nordberg2014-09-101-1/+1
|
* Add fun specs.Linus Nordberg2014-09-101-0/+3
|
* Make dialyzer happier.Linus Nordberg2014-09-101-1/+1
| | | | V = -1 is a valid tree version.
* Make dialyzer happier.Linus Nordberg2014-09-101-2/+2
| | | | Protocol version can be 0.
* Get rid of dialyzer warning.Linus Nordberg2014-09-101-1/+1
| | | | | | | | Specify the match as a tuple rather than a record since dialyzer correctly reports that #plop fields cannot be atoms. The drawback is that the match needs updating when the definition of #plop{} changes, including merely reordering of fields.
* Handle empty tree.Linus Nordberg2014-09-101-0/+2
|
* New hash tree implementation, using an ETS table for the hashes.Linus Nordberg2014-09-094-386/+311
| | | | | Also, add an untested entry storage implementation, using multiple DETS tables.
* Add db:get_by_index_sorted/2.Linus Nordberg2014-09-091-4/+26
|
* Add licensing information.Linus Nordberg2014-06-097-0/+20
|
* Add explanatory header.Linus Nordberg2014-06-051-0/+22
|
* Make serialise/1 return a binary.Linus Nordberg2014-06-041-45/+36
| | | | Lists became nested.
* plop.hrl has finally moved into include/.Linus Nordberg2014-06-043-3/+2
|
* Add get/1; remove debug printouts; formatting.Linus Nordberg2014-06-041-14/+23
|
* Fix add_more_test/0 and rename it.Linus Nordberg2014-06-021-6/+8
| | | | | One probably don't want it to be run automatically since it bloats the db.
* Don't use maps.Linus Nordberg2014-06-021-21/+28
| | | | We want to support R16 too.
* Clean upp append/2, append/3 a bit.Linus Nordberg2014-06-011-9/+8
|
* Language.Linus Nordberg2014-06-011-6/+6
|
* Clean up the mkhash / gethash name mess a bit.Linus Nordberg2014-06-011-9/+8
|
* Implement audit_path/2.Linus Nordberg2014-06-011-19/+54
|
* Add note about appending trees.Linus Nordberg2014-06-011-6/+10
| | | | Also remove unused code and clearify append/1.
* Implement path/1 for testing.Linus Nordberg2014-06-011-4/+44
|
* Start db prior to plop.Linus Nordberg2014-05-291-9/+7
| | | | So that plop can read the database at startup.
* Test adding 200 3kB entries.Linus Nordberg2014-05-291-0/+7
|
* Add db:size/0 and some error checking.Linus Nordberg2014-05-292-14/+37
|
* Formatting.Linus Nordberg2014-05-271-1/+2
|