Commit Graph

98 Commits

Author SHA1 Message Date
Jude Nelson
05058e4040 return standard-formatted RPC message for prior records 2016-10-24 19:03:13 -04:00
Jude Nelson
5b24430205 standardize the RPC interface further: return {'status': True, ...} on
successful RPCs, and return {'errror': ...} on failures
2016-10-24 17:10:47 -04:00
Jude Nelson
a699af9af9 don't do server-side name history traversal from an RPC call. Instead,
have the client determine which names were affected at which block,
query the name's history rows, and do the re-assembly and traversal
client-side.  This takes a lot less time per RPC call (even though the
overall method will be slower), and stops us from running out of memory.
2016-10-24 03:16:37 -04:00
Jude Nelson
0b7b20e572 pass name and txid to zonefile driver storage logic 2016-10-11 08:14:36 -04:00
Jude Nelson
08b9739c5f better printing for get peers 2016-10-10 12:27:35 -04:00
Jude Nelson
4e8fd312d1 add get_all_namespaces(), add get_last_nameops(), fix #240 in a
backwards-compatible way (needs more testing)
2016-10-10 11:57:34 -04:00
Jude Nelson
d70028ca44 do not activate new features until F-day 2016-10-05 14:38:50 -04:00
Jude Nelson
93ed8389ad when getting zonefiles and profiles, don't forget that they can be
non-standard and not necessariliy parseable
2016-10-03 18:34:19 -04:00
Jude Nelson
dbad8e4b7f better logging of error cases when requesting zonefiles 2016-10-03 01:40:21 -04:00
Jude Nelson
753fcc76af do not attempt to pull zonefiles from storage drivers in the RPC loop.
The zonefile crawler logic in the Atlas system does this.
2016-10-03 01:27:16 -04:00
Jude Nelson
8312db7f41 check the validity of cached zonefile data only after we load it. also,
debug cache hits/misses for now
2016-10-03 01:15:27 -04:00
Jude Nelson
3f0d668032 close the db when we're done with it, but not before 2016-10-03 00:46:55 -04:00
Jude Nelson
110bc01024 serve back *arbitrary* zonefiles, not just ones that are standard.
TODO: don't serve them back if they're too big, but find a way to cap
this at the driver level.
2016-10-03 00:18:56 -04:00
Jude Nelson
1795f0ebf8 clear indexing state before loading the db 2016-09-29 14:36:19 -04:00
Jude Nelson
7fa57c2468 accept raw base64-encoded zonefiles via put_zonefile (API break in 0.14);
do not attempt to parse zonefiles, but instead just store them directly.
2016-09-28 19:52:18 -04:00
Jude Nelson
2dcc7ff522 pass db to zonefile verification 2016-09-25 16:12:15 -04:00
Jude Nelson
7b5fe6deff Merge branch 'develop' into release-candidate 2016-09-21 14:11:10 -04:00
Jude Nelson
65d8a827af pass db handle through to look up txid. don't get_db_state() 2016-09-21 14:04:12 -04:00
Jude Nelson
cf71d6b84e bugfix: get_all_names 2016-09-16 17:45:13 -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
Jude Nelson
a256e77bc5 clarify that atlas only takes well-formed zonefiles 2016-09-14 16:12:29 -04:00
Jude Nelson
2d1a4a9e84 put the PID file *before* bootstrapping atlas 2016-09-13 22:07:23 -04:00
Jude Nelson
3ca538136f pass along name to zonefile storage driver whenever possible 2016-09-13 16:31:23 -04:00
Jude Nelson
06bc0bb15c find the current epoch's namespace lifetime multiplier and use it to
calculate the expire block for a name
2016-09-12 17:58:38 -04:00
Jude Nelson
5f11ba1658 set default port 2016-09-09 17:11:24 -04:00
Jude Nelson
f60a9b73d4 report correct expire block 2016-09-09 16:53:27 -04:00
Jude Nelson
3400526d8e correct calcuation of name expiration date 2016-09-09 11:36:05 -04:00
Jude Nelson
70b7957141 add get_namespace_cost(); pass working db path to verifydb 2016-09-09 11:15:51 -04:00
Jude Nelson
e93328c09a refactoring: move history verification to lib/consensus; specialize
debug output when using the atlas network simulator; use get_records_*
instead of get_nameops_*
2016-09-02 00:12:50 -04:00
Jude Nelson
bc40d5a901 abort on fatal error; better atlas start/stop logic; report JSON
tracebacks as strings
2016-08-30 20:23:33 -04:00
Jude Nelson
da509dc2ba atlas_start() and atlas_stop() as explicit methods 2016-08-30 00:37:25 -04:00
Jude Nelson
d4a7c5e772 set initial peer table 2016-08-29 17:35:17 -04:00
Jude Nelson
b0876869b5 make blockstack server amenable to being run as an atlas peer in the
test framework.
2016-08-26 18:46:15 -04:00
Jude Nelson
1298b543a3 conditionally enable atlas support based on config file 2016-08-23 11:39:41 -04:00
Jude Nelson
fe8741da4b all rpc_ methods receive **con_info to contain client information 2016-08-22 18:00:05 -04:00
Jude Nelson
5e6344dc37 atlas inventory requests are in terms of byte offset and length 2016-08-18 18:33:25 -04:00
Jude Nelson
f71b91983a plumb through atlas support to peer and zonefile queries 2016-08-17 00:36:54 -04:00
Jude Nelson
3d96a7ad55 WIP: add Atlas RPC methods 2016-08-15 18:19:26 -04:00
Jude Nelson
6263fb41a2 add tx_filter to select only 'id' op_returns 2016-08-10 19:49:18 -04:00
Jude Nelson
59930bfcbf use blockstack_client's semvar; add expected_snapshots argument (pulled
from sqlite3 branch)
2016-08-10 19:30:58 -04:00
Jude Nelson
7a7692ba8e if there's no analytics key, then log it 2016-08-10 16:07:03 -04:00
Jude Nelson
3baea6dae8 catch exceptions from mixpanel 2016-08-07 17:38:21 -04:00
Jude Nelson
2f4c0019e8 disable mock_bitcoind support 2016-08-04 13:50:16 -04:00
Jude Nelson
225b7e1964 If there is no server_version in the config file, automatically add it
when generating the new config file (#229).  However, don't add it if it
was already present in the config file, or if the config file already
exists (in which case, the appropriate action is to use the version
given, or back up the old config file).
2016-07-27 16:12:28 -04:00
Jude Nelson
e0ca82f97f remove dead code 2016-07-18 16:44:53 -04:00
Jude Nelson
bfda61280f get public key from zonefile and then from profile once the profile has
been validated.  Don't try to extract it from the old profile.
2016-07-18 16:40:57 -04:00
Jude Nelson
c666852baf debug all returns in put_profiles 2016-07-18 16:26:34 -04:00
Jude Nelson
c1be35a888 no profile == empty string 2016-07-18 16:13:42 -04:00
Jude Nelson
88cb282c95 add server analytics 2016-07-18 15:59:20 -04:00
Jude Nelson
a59a62c27c store server version in the config file, and use it to determine whether
or not the config file is obsolete and needs to be regenerated
2016-07-13 15:42:47 -04:00