Commit Graph

963 Commits

Author SHA1 Message Date
Jude Nelson
e28314eae6 add getters/setters for global genesis block 2018-07-05 18:47:17 -04:00
Jude Nelson
cd45b533ec pass in genesis block data to namedb initialization code 2018-07-05 18:47:00 -04:00
Jude Nelson
260cec690f sanity-check the genesis block on start-up 2018-07-05 18:46:37 -04:00
Jude Nelson
16a071a62b make the default maximum number of RPC connections 1000 (we have ~6 open at any given point in time, but this expands briefly when the server processes a new block) 2018-07-05 17:42:13 -04:00
Jude Nelson
875ce2dba4 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:32:55 -04:00
Jude Nelson
503e5137c7 docs: big-endian token representation 2018-07-05 17:32:04 -04:00
Jude Nelson
c321451c23 docs: big-endian token representation 2018-07-05 17:31:54 -04:00
Jude Nelson
5b0e170e7d docs: big-endian token representation 2018-07-05 17:31:44 -04:00
Jude Nelson
8a3621b0fb docs: big-endian token representation 2018-07-05 17:31:31 -04:00
Jude Nelson
4c19b29d90 take the global GENESIS_BLOCK 2018-07-05 17:31:21 -04:00
Jude Nelson
d5bccbec17 block_height is an int 2018-07-05 17:31:12 -04:00
Jude Nelson
fd2a2f4236 clarify query-string args 2018-07-05 17:30:59 -04:00
Jude Nelson
892c2801a7 genesis block will be obtained from blockstack/lib/config.py, always 2018-07-05 17:29:04 -04:00
Jude Nelson
b609ece33e load genesis block from a module, or from source 2018-07-05 17:28:46 -04:00
Jude Nelson
4b46473c3b genesis block schema 2018-07-05 13:48:04 -04:00
Jude Nelson
b849169ade store the hash of the canonical serialization of the genesis history in the accounts table 2018-06-21 18:29:59 -04:00
Jude Nelson
660db55060 advance block time for the next fork to "sometime in the indefinite future" 2018-06-20 19:08:23 -04:00
Jude Nelson
1c1d4eeb96 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:59:18 -04:00
Jude Nelson
e5829f523d name records can have a resolver field 2018-06-20 18:58:58 -04:00
Jude Nelson
edd7a866b0 use name record's resolver to find subdomains 2018-06-20 18:58:20 -04:00
Jude Nelson
01fe7c9fbe remove <<<<<< from merge 2018-06-20 18:58:13 -04:00
Jude Nelson
f502c203d3 bugfix; pass resolver from subdomain db to name on get_name_record 2018-06-20 18:58:05 -04:00
Aaron Blankstein
19cb51d8a2 force paging on the /v1/names/<name>/history endpoint 2018-06-20 18:57:44 -04:00
Jude Nelson
acbad556ab optionally get name history rows in reverse 2018-06-20 18:57:04 -04:00
Jude Nelson
3b007221e4 optionally get name history rows in reverse 2018-06-20 18:56:19 -04:00
Jude Nelson
2e01578a8b add code to get a name and its history using pagination, with a fallback to get_name_blockchain_record() 2018-06-20 18:55:39 -04:00
Jude Nelson
9138da8da8 clarify offset/count 2018-06-20 18:55:34 -04:00
Jude Nelson
535f43be67 add rpc_get_name_history_page() 2018-06-20 18:55:07 -04:00
Jude Nelson
d4e7e3e616 require 'vesting_total' in the genesis block, and use it to check the vesting schedule 2018-06-18 18:42:02 -04:00
Jude Nelson
437ec95d89 fix bug in querying atlas zonefile inventories so we get the right range (we missed this before because we were querying the entire range only) 2018-06-18 18:40:37 -04:00
Jude Nelson
60342b48d4 clarify get_zonefile_inventory 2018-06-18 18:40:06 -04:00
Jude Nelson
2236004919 set token fee to 0 on renew with btc 2018-06-16 14:48:51 -04:00
Jude Nelson
11530e840c technicall p2sh was allowed in epoch 1 (we just ignored it) 2018-06-16 14:48:34 -04:00
Jude Nelson
bb72d73219 add code to check scriptpubkeys in senders and outputs for parsed transactions 2018-06-16 11:28:55 -04:00
Jude Nelson
8dde05b85b check output scriptpubkey types when parsing 2018-06-16 11:28:39 -04:00
Jude Nelson
93226faa4a a few bugfixes to token accounting for renewals and v2 namespaces 2018-06-16 11:28:19 -04:00
Jude Nelson
2894671e52 reject a token transfer if the recipient address is not whitelisted. however, disable this in the public testnet 2018-06-16 11:27:50 -04:00
Jude Nelson
af520b35ff refuse to process a transaction if it has a sender scriptpubkey we don't know how to parse 2018-06-16 11:27:20 -04:00
Jude Nelson
f98bbce9f8 implement database concern of recipient address whitelisting 2018-06-16 11:27:04 -04:00
Jude Nelson
09abf6078e define for each epoch which sender scriptpubkey and output scriptpubkey script types will be acceptable 2018-06-16 11:26:39 -04:00
Jude Nelson
7ac805df54 a name register/renewal can be paid for in stacks or btc, but if stacks were paid, btc *should not be checked* since the intention of the sender was to use stacks. 2018-06-11 18:56:04 -04:00
Jude Nelson
29f29c02f1 clarify the need for checking the burn address on token burns 2018-06-11 18:55:50 -04:00
Jude Nelson
5ae3029e34 refactor the price-check code in register/renew so as to remove any balance-queries and side-effects from check_payment(). Only name renewals will need a balance check; check this in check_renewal(). Also, if a name is preordered/renewed using both BTC and Stacks, only accept if *at least one of them* paid the full name fee, but *debit both BTC and Stacks* if both are given 2018-06-11 01:01:27 -04:00
Jude Nelson
687a8b2ae5 do not accept token burns that aren't Stacks at this time 2018-06-11 01:01:14 -04:00
Jude Nelson
71d8f022e9 parse namespace preorder without burn address, but fail to check it 2018-06-11 01:00:43 -04:00
Jude Nelson
d6158916fc add a method to get the price of a name in Stacks even though the namespace price curve was meant for Bitcoin (allows us to price names in Stacks in v1 namespaces) 2018-06-10 13:40:44 -04:00
Jude Nelson
5ae578403f refactor the register cost-checking code so it's broken down by namespace version. also, isolate the code that extracts the token payment if applicable. 2018-06-10 13:39:41 -04:00
Jude Nelson
b4cb2320f9 if the preorder spent tokens, then enforce *early on* that the tokens get burned 2018-06-10 13:39:17 -04:00
Jude Nelson
875093713f error early and explicitly if the burn address is wrong 2018-06-10 13:38:32 -04:00
Jude Nelson
c8aa887c21 record microstack <--> satoshi conversion rate 2018-06-10 13:38:12 -04:00