Commit Graph

975 Commits

Author SHA1 Message Date
Jude Nelson
8f944ddd33 merge /v1/prices and /v2/prices -- make the /v2 endpoint return the same information expected by the /v1 endpoint 2018-10-02 23:36:46 -04:00
Jude Nelson
c059c17469 set blockstack atlas hostname (BLOCKSTACK_ATLAS_HOSTNAME) as an environ 2018-10-02 23:35:52 -04:00
Jude Nelson
ccdd7fa0d6 reword comment 2018-09-27 17:52:28 -04:00
Jude Nelson
f03d23aa95 rename *_nameops_* to *_blockstack_ops_* for code clarity 2018-09-27 17:52:20 -04:00
Jude Nelson
132bb957ab get subdomain history in reverse chronological order; add method to test if a zone file hash was created by a subdomain 2018-09-19 18:32:50 -04:00
Jude Nelson
7bd6b849b3 have GET /v1/names/:name/zonefile/:hash use the is_name_zonefile_hash() client method, which is considerably faster (both in absolute terms and asymptotic terms) than the status quo 2018-09-19 18:32:06 -04:00
Jude Nelson
559afc5471 fix bug in getting subdomain history; add method to check if a name created a zone file 2018-09-19 18:31:45 -04:00
Jude Nelson
c929e4fa4a add method to check if a name created a zone file hash; remove dead code 2018-09-19 18:31:27 -04:00
Jude Nelson
1d4c05bcd7 pass through new DB methods 2018-09-19 18:30:58 -04:00
Jude Nelson
c157b6c224 fix bugs in getting the history for subdomains; add a method to check if a zone file was created by a name (to speed up the GET /v1/names/:name/zonefile/:hash endpoint) 2018-09-19 18:26:38 -04:00
Jude Nelson
40d06dd447 restructure the epoch data so that we no longer need user-defined sqlite3 functions to select the right namespace lifetime and grace period data. instead, bake them directly into the queries. speeds up lots of queries significantly 2018-09-18 18:52:58 -04:00
Jude Nelson
1302140973 expose getinfo as a RESTful endpoint 2018-09-18 18:52:00 -04:00
Jude Nelson
94bcf41cf6 modify the BoundedThreadingMixIn so it will eagerly close client sockets when it has too many outstanding requests. Do some housekeeping so that we can use this in both the backplane RPC server and the API server, and update the relevant integration test to test for this behavior 2018-09-18 17:15:31 -04:00
Jude Nelson
419557f7c8 get_index_range() should return a tuple; return HTTP status code from RPC 2018-09-17 18:32:51 -04:00
Jude Nelson
993a8ff68c push back f-day 2018 2018-09-17 18:26:03 -04:00
Jude Nelson
c7c8ea188f use get_name_history_page for getting pages of a name's history. do not rely on start_block or end_block, since we have the power to paginate directly 2018-09-13 16:14:25 -04:00
Jude Nelson
6390ee3476 fix a race condition that would cause the node to deadlock if it could not bind on a particular port when starting up; also, simplify the name history query interface so it only requires a page 2018-09-13 16:13:18 -04:00
Aaron Blankstein
ac6dc486f9 add environment variable for overriding atlas_seed_peers setting (BLOCKSTACK_ATLAS_SEEDS) 2018-09-13 07:51:20 -05:00
Jude Nelson
19a1d7f9b3 make API endpoint match master better, except where appropriate (e.g. return 400 instead of 401 and 502 instead of 500 in a few cases) 2018-08-23 15:59:15 -04:00
Jude Nelson
4bbae859fb use the right public key that matches the owner address 2018-08-23 15:58:55 -04:00
Jude Nelson
16d4d131f2 store fast-sync snapshot to ~/.blockstack-server 2018-08-23 15:58:39 -04:00
Jude Nelson
097fc369bd serialize all calls to enqueue zone files 2018-08-06 18:14:16 -04:00
Jude Nelson
66e8edc08f dead comment 2018-08-06 18:14:03 -04:00
Jude Nelson
e808ea9ca3 when synchronizing the atlasdb with the namedb, call the storage callback for each zone file we already have. That way, if a zone file hash is re-announced, it will be processed by the storage callback again (as desired) 2018-08-06 18:12:51 -04:00
Jude Nelson
1b56e1bba2 api tweak: pass the server state to the virtualchain hooks (including the atlas state) 2018-08-06 18:12:29 -04:00
Jude Nelson
720c94049d check virtualchain for unclean shutdown and handle accordingly 2018-08-06 11:17:29 -04:00
Jude Nelson
0499d3fa68 fix a race condition in the atlas database that can occasionally cause a zone file to not get forwarded to the subdomain system 2018-07-27 15:08:13 -04:00
Jude Nelson
0ed8c393d5 pass through fsync 2018-07-23 19:43:32 -04:00
Jude Nelson
3d577a7aa0 re-store zone files unconditionally (again), so we can recover from corrupt zone files 2018-07-20 00:29:56 -04:00
Jude Nelson
0641feebbe cap the number of zone files we process per block for subdomains 2018-07-19 22:08:35 -04:00
Jude Nelson
ed988897a4 disable durability pragmas in the subdomain db, since if the node crashes we have to restore the subdomain db anyway (2x speed improvement). also, add a 'zonefile_offset' column to the subdomain db that fixes DID creation in the case where the same owner address created multiple subdomains in the same zone file 2018-07-18 18:57:12 -04:00
Jude Nelson
2288672b08 nearly 100x performance improvement if we don't fsync() each time we write a zone file (not strictly necessary for subdomain zone files, but definitely necessary for zone files arriving via Atlas) 2018-07-18 18:56:38 -04:00
Jude Nelson
b55d23f609 also export subdomain db and atlas db (meant mainly for testing) 2018-07-18 18:56:21 -04:00
Jude Nelson
7114040e3a if we don't get a DID back, then the name doesn't exist 2018-07-18 18:56:03 -04:00
Jude Nelson
e1b4c0b5bc lint 2018-07-06 15:20:58 -04:00
Jude Nelson
b82d6428ed de-lint 2018-07-06 14:23:36 -04:00
Jude Nelson
58604448fd Merge branch 'master' into develop 2018-07-06 14:08:31 -04:00
Jude Nelson
efbcaccc5a up to 1000 threads (only 1024 file descriptors are available anyway) 2018-07-06 14:06:58 -04:00
Jude Nelson
01ef6b022b de-lint; version bump 2018-07-06 14:04:09 -04:00
Jude Nelson
a1709b3a2f reduce the multiplier for the maximum rpc size to 150 (really can get away with more like 133, but let's play it safe--it's only 0.6 MB) 2018-07-05 23:41:39 -04:00
Jude Nelson
541c20afd6 set MAX_DATA in all places where we import defusedxml packages 2018-07-05 23:41:27 -04:00
Jude Nelson
1582197c7a version bump 2018-07-05 21:43:13 -04:00
Jude Nelson
800f82911d make the max RPC length equal to the expected amount of space 100 fully-loaded zone files take when encoded 2018-07-05 21:42:26 -04:00
Jude Nelson
8358c1d783 add a bounded threading mixin to the RPC server that allows it to have up to a maximum number of outstanding threads handling requests. serialize all RPC access so we don't introduce database contention or corruption. make the maximum number of RPC threads overridable in the environment. 2018-07-05 17:24:30 -04:00
Jude Nelson
f3621fa5c9 Merge branch 'develop' into feature/blockstack_client_refactor 2018-06-27 17:36:34 -04:00
Jude Nelson
b51caa6a0e have the subdomain system track the last known resolver for each subdomain, so queries on the domain will return the resolver 2018-06-20 18:51:00 -04:00
Jude Nelson
39709442ec name records can have a resolver field 2018-06-20 18:50:49 -04:00
Jude Nelson
badcf9d7d8 use name record's resolver to find subdomains 2018-06-20 18:50:31 -04:00
Jude Nelson
6648ec84a1 remove <<<<<< from merge 2018-06-20 18:50:02 -04:00
Jude Nelson
57153b9d3a bugfix; pass resolver from subdomain db to name on get_name_record 2018-06-20 18:49:36 -04:00