Commit Graph

193 Commits

Author SHA1 Message Date
Jude Nelson
a18028589e get number of names and number of names in a namespace; fix bugs found
in testing
2016-10-24 17:08:45 -04:00
Jude Nelson
e0449d6ed7 clean up symbols 2016-10-24 03:23:24 -04:00
Jude Nelson
e67b506619 remove superfluous method 2016-10-24 03:23:16 -04:00
Jude Nelson
d857be4762 move verify_zonefile to the client 2016-10-24 03:23:03 -04:00
Jude Nelson
707e6a9086 move SNV consensus restoration logic to the client 2016-10-24 03:22:47 -04:00
Jude Nelson
22a84cbb78 track 'last_create_op' in the db 2016-10-24 03:22:28 -04:00
Jude Nelson
527e46ad6d use the new 'last_creation_op' column instead of (expensively)
calculating it from the DB.
2016-10-24 03:21:47 -04:00
Jude Nelson
7929d100d9 calculate the SNV block operations hash at each block 2016-10-24 03:21:26 -04:00
Jude Nelson
9c61836944 update the calls that query historic name operations to allow the caller
to page through the history.  Also, pre-calculate the SNV block
operation hash, since it never changes and it's expensive to calculate
on-the-fly.
2016-10-24 03:20:36 -04:00
Jude Nelson
432d70d57b Refactor the db to make expensive queries pageable, so we don't
overwhelm the node with one bad RPC.  In particular, make
it so the caller can page through the list of operations that occurred
at a particular block (so the caller can fetch them in small batches),
and make it possible to query the history table directly.
2016-10-24 03:18:47 -04:00
Jude Nelson
002078c57e don't return virutalchain fields 2016-10-24 03:18:31 -04:00
Jude Nelson
eaed8bd49d DRY up op_get_opcode_name 2016-10-24 03:18:09 -04:00
Jude Nelson
d70f003ec2 remove unused code 2016-10-13 20:47:32 -04:00
Jude Nelson
e62739c1e4 take out gratuitous timestamps 2016-10-13 20:47:11 -04:00
Jude Nelson
42a9d9feb2 when looking for points in the blockchain where a name was updated, do
not forget to select on the name itself (lest we read the whole database
into RAM)
2016-10-13 20:20:31 -04:00
Jude Nelson
0774dcb072 update symbols 2016-10-11 08:16:27 -04:00
Jude Nelson
c5142344a8 remove all need to open the name database, so the atlas logic no longer
shares the db with the blockchain indexer
2016-10-11 08:15:57 -04:00
Jude Nelson
1e32f1e506 remove is_current_zonefile_hash, since it's not used 2016-10-11 08:15:48 -04:00
Jude Nelson
d4a9b365e9 expand role of method to fetch zonefile information from the name
database
2016-10-11 08:15:08 -04:00
Jude Nelson
333fee0fe7 use a huge timeout for db connections 2016-10-10 12:51:18 -04:00
Jude Nelson
25c5c62c13 do not give back virtualchain fields when restoring operations for
get_nameops_at
2016-10-10 12:03:12 -04:00
Jude Nelson
4a8de8c118 add namedb_get_last_nameops() and namedb_get_blocks_with_ops() 2016-10-10 12:02:57 -04:00
Jude Nelson
c5f1029a96 use namedb_get_blocks_with_ops() as a more efficient version of
namedb_get_history_range(), and add get_last_nameops()
2016-10-10 12:02:33 -04:00
Jude Nelson
5508e89ca5 pass along virtualchain implementation 2016-10-10 12:02:21 -04:00
Jude Nelson
de2df704c0 commas and spelling 2016-10-05 14:39:07 -04:00
Jude Nelson
6a2639bc49 do not allow a name to be registered to a p2sh script until the multisig
support activates (this is to keep 0.14 consistent with 0.13 until then)
2016-10-04 18:16:50 -04:00
Jude Nelson
488d1ad1d3 do not allow a transfer sender to be a p2sh script until the multisig
support activates
2016-10-04 18:16:18 -04:00
Jude Nelson
ea7a286e26 our public key extraction logic only works (by design) on p2pkh scripts 2016-10-04 18:16:03 -04:00
Jude Nelson
15a87a595f keep the list of features that will activate when a new epoch passes.
provide a query interface to these features, so the consensus logic
activates them at the appropriate times
2016-10-04 18:15:25 -04:00
Jude Nelson
5f23f5be56 2-year multiplier kicks in at 436600 2016-10-03 18:34:39 -04:00
Jude Nelson
e7b7ad8fa0 justify why we check lastblock when we open the db 2016-10-03 00:47:35 -04:00
Jude Nelson
2a78fb1ad4 add a way to remove invalid cached zonefiles, and check that the
zonefile *data* is cached (not that the zonefile cached is a standard
zonefile).
2016-10-03 00:20:55 -04:00
Jude Nelson
527f7d3e16 require a name for getting the txid 2016-09-28 20:28:57 -04:00
Jude Nelson
0851ffc901 take namespace parameter when getting namespace price 2016-09-28 20:27:48 -04:00
Jude Nelson
46abc13e9a improve error-path log messages a bit 2016-09-28 20:26:18 -04:00
Jude Nelson
4233614110 take an optional lastblock when determining whether or not a preorder is
"new"
2016-09-28 20:26:01 -04:00
Jude Nelson
438647fea2 update preorder schema to include the txid as well as preorder hash, so
we don't violate the uniqueness constraint if someone reuses the same
key
2016-09-28 19:54:00 -04:00
Jude Nelson
8b5c554a93 accept a dict of expected consensus hashes while verifying the database,
and check each block along the way (instead of just the last one)
2016-09-28 19:53:15 -04:00
Jude Nelson
78f773db00 rework epoch logic to consider per-epoch rules on a per-namespace basis. 2016-09-28 19:52:50 -04:00
Jude Nelson
22bdb8045c whitespace 2016-09-25 23:47:38 -04:00
Jude Nelson
def3b3d632 remove needless import 2016-09-22 20:30:33 -04:00
Jude Nelson
7b5fe6deff Merge branch 'develop' into release-candidate 2016-09-21 14:11:10 -04:00
Jude Nelson
6ed3457ea2 remove unused code; pass through db from RPC endpoint 2016-09-21 14:04:28 -04:00
Jude Nelson
c38c0d4c19 use separate variables for epoch constants 2016-09-20 16:35:16 -04:00
Jude Nelson
c57bfab3bd pass -1 for offset/length if not known or we don't care (don't use None) 2016-09-16 17:46:14 -04:00
Jude Nelson
6df34adb46 when looking up the txid that funded a zonefile update, go and look up
the name if we aren't given one
2016-09-16 17:45:47 -04:00
Jude Nelson
b7f0b5ae9e when getting all names or names in a namespace, just get the names
themselves.
2016-09-16 17:45:24 -04:00
Jude Nelson
993f880eb0 while testing keep the price of a 1-char namespace low so we don't run
out of regtest bitcoin
2016-09-15 17:00:30 -04:00
Jude Nelson
d8f9367e16 remove dead code 2016-09-15 15:46:42 -04:00
Jude Nelson
e9af1f6406 be pedantic: close the DB handle when we're done with it 2016-09-14 18:17:02 -04:00