Commit graph

21 commits

Author SHA1 Message Date
Jimmy Kiselak
eb25177f5e do some rebranding and change default ports 2015-09-24 01:15:28 -04:00
Jimmy Kiselak
243dd23818 fix bug where update to best claim doesnt take effect immediately if there are other claims on the name 2015-06-25 14:05:27 -04:00
Jimmy Kiselak
d3df7747d7 change user-facing mention of ncc to lbrycrd/name, and move all UniValue out of ncctrie.cpp 2015-06-11 22:55:12 -04:00
Jimmy Kiselak
3d7b9221b5 merge in upstream changes 2015-06-11 17:20:54 -04:00
Jimmy Kiselak
30d123a70b enable expiration of claims after a certain number of blocks 2015-05-27 17:53:12 -04:00
Jimmy Kiselak
71a28f8d8f store ncc trie insertion queues on disk, so that eventually removal queues can be stored on disk the same way 2015-05-21 13:50:40 -04:00
Jimmy Kiselak
49c7c3ef25 fix bug due to unitialized var in CTxInUndo, and create rpc calls for getting some statistics about the ncc trie 2015-04-10 16:50:50 -04:00
Jimmy Kiselak
0e0fb4a056 hash txid and nOut in CNodeValue hash to make spoofing the value more difficult 2015-03-25 22:10:05 -04:00
Jimmy Kiselak
361c99b104 merge bitcoin changes 2015-03-25 14:06:04 -04:00
Jimmy Kiselak
c9785bb21f flush ncc trie to disk at the same time pcoins and pblocktree are flushed to disk, so that if the program crashes they are at the same block 2015-03-23 14:51:29 -04:00
Jimmy Kiselak
7813f3157b show depth, whether spent, and whether in ncc trie for listnameclaims 2015-03-19 17:16:35 -04:00
Jimmy Kiselak
c8834c5551 finish enabling delayed ncc trie claim insertions, and rewrite the test for the delays so that it uses the actual block processing system 2015-03-19 12:57:56 -04:00
Jimmy Kiselak
f2a7a5c401 delay insertion of claims into trie 2015-03-17 01:16:37 -04:00
Jimmy Kiselak
a1fca49174 fix bug where some new claims aren't written to the ncc trie on disk if they don't change the hash of their node 2015-03-08 20:24:13 -04:00
Jimmy Kiselak
bc266a1677 hash the value of a node before computing the hash of the node, to prevent a false value from being crafted which will result in the same node hash yet mask the existence of child nodes 2015-02-23 17:51:52 -05:00
Jimmy Kiselak
6f9808faff add an rpc command for getting the value of a name 2015-02-10 18:44:14 -05:00
Jimmy Kiselak
e7654b8703 add best block hash to ncc trie, and remove possibility of a null base to ncc cache
ensure the ncc trie and any caches are always in sync with the current best block
by informing the trie when the block changes, and have the ncc trie persist that
in the database. check against that whenever modifying the trie.

get rid of the possibility of a CNCCTrieCache having a null base, and create a
CNCCTrie in test_bitcoin.cpp so one exists during testing.
2015-02-10 15:30:40 -05:00
Jimmy Kiselak
389a2a963e fix a few bugs and add some assertions
ncctrietests.cpp:
add test to make sure emptying the ncc trie cache results in a
default hash ("00...01")
ncctrie.cpp:
fix the ncc trie cache so that emptying it causes the root hash
to be computed as the default hash ("00...01")
fix two bugs in reading the ncc trie from disk:
all insertions were returning immediately due to parenthesis
misplacement, and the loop reading nodes from disk wasn't
terminating due to a lack of an incrementing operation
miner.cpp
fix a bug in the miner where input coins in the cache were being
spent before their txouts could be checked for NCC commands
main.cpp
add some assertions when disconnecting blocks from the active
chain, ensuring the merkle root of the ncc trie after undoing the
block is equal to the hashNCCTrie in the previous block
fix an erroneous assertion in ConnectBlock to assert the correct
expected value
change some log statements to use __func__
init.cpp
change the order of some init operations so the NCC trie is
restored from disk before the DB is verified
2015-02-10 11:19:41 -05:00
Jimmy Kiselak
79be562ff2 rpc commands for browsing ncc trie, fix bugs caused by adding ncc merkle to header
create an rpc command to print the whole ncc trie
create an rpc command to search get transaction info
for a particular name
change the number of bytes in the header expected by miner.cpp
make sure the ncc merkle hash is copied to all structures that
need it
2015-02-07 12:32:05 -05:00
Jimmy Kiselak
b2b0bd5bb5 implement reading and writing the NCC trie to disk, create the global trie upon initialization, add and remove NCC claims when connecting and disconnecting blocks, and check block headers against the NCC merkle hash 2015-02-05 14:24:09 -05:00
Jimmy Kiselak
9bb4ecef2a move everything trie related into its own file, enable serialization of trie nodes and values, and create some tests for serialization 2015-02-02 20:57:53 -05:00