summaryrefslogtreecommitdiff
path: root/src/ht.erl
Commit message (Collapse)AuthorAgeFilesLines
* Move timeouts to separate include fileMagnus Ahltorp2015-11-111-1/+2
|
* Allow ht:load_tree() 30 seconds to finish.Linus Nordberg2015-06-121-3/+3
| | | | Default 5 seconds was not enough on a tree with around 5.2M entries.
* Fix copyright strings.Linus Nordberg2015-04-091-1/+1
|
* Make ht:leaf_hash/1 non-synchronousMagnus Ahltorp2015-03-081-3/+1
|
* ht:init: Build tree after reading itMagnus Ahltorp2015-03-071-1/+6
|
* ht: read database when startedMagnus Ahltorp2015-03-051-1/+1
|
* ht: Only process a limited amount of entries per gen_server callMagnus Ahltorp2014-11-191-10/+46
|
* Make ht load tree and verify root hash before updating tree sizeMagnus Ahltorp2014-11-191-1/+14
|
* Invoke gen_server:call/2 via stacktrace:call/2.stacktraceLinus Nordberg2014-11-041-12/+13
| | | | stacktrace:call() logs an error if the gen_server:call() throws timeout.
* Fix tests which broke in b676b219.Linus Nordberg2014-10-281-6/+6
| | | | Broke when we changed add/1 to take a hash instead of an entry.
* Break include dependency on plop.hrlMagnus Ahltorp2014-10-241-1/+0
|
* Credit Emilia Käsper for the placeholder idea.Linus Nordberg2014-10-201-4/+10
|
* Clean up the plop interface, in preparation for a new db implementation.Linus Nordberg2014-09-291-13/+13
|
* Store and retrieve extra-data in/from db.Linus Nordberg2014-09-201-1/+1
| | | | Also, add more specs to db.
* Hash over the MerkleTreeLeaf.Linus Nordberg2014-09-191-6/+5
| | | | | 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-181-20/+22
| | | | | | | | | | 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-161-27/+24
| | | | | | | | | | | 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.
* 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-121-33/+69
|
* Add some explaining comments. Remove some debugging code.Linus Nordberg2014-09-111-11/+20
|
* Another hashtree implementation, first cut.Linus Nordberg2014-09-111-148/+181
| | | | | 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
|
* Indent properly.Linus Nordberg2014-09-101-4/+4
|
* 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.
* Handle empty tree.Linus Nordberg2014-09-101-0/+2
|
* New hash tree implementation, using an ETS table for the hashes.Linus Nordberg2014-09-091-371/+189
| | | | | Also, add an untested entry storage implementation, using multiple DETS tables.
* Add licensing information.Linus Nordberg2014-06-091-0/+2
|
* Add explanatory header.Linus Nordberg2014-06-051-0/+22
|
* 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
|
* Remove a debug printout.Linus Nordberg2014-05-071-1/+0
| | | | In a test.
* Function documentation.Linus Nordberg2014-05-071-13/+23
|
* Formatting.Linus Nordberg2014-05-071-10/+13
|
* Remove support for crypto:sha().Linus Nordberg2014-05-071-11/+1
| | | | We're not on R15 any more.
* Doc and placeholders for audit path and consistency proof functions.Linus Nordberg2014-05-071-6/+41
|
* Fix bug with adding first element of empty tree.Linus Nordberg2014-04-261-6/+17
| | | | And tests!
* Won't test sth's in ht.Linus Nordberg2014-04-261-3/+0
|