Commit Graph

954 Commits

Author SHA1 Message Date
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
Jude Nelson
d280d5b1a8 better debug output for cost 2018-06-10 13:37:56 -04:00
Jude Nelson
577e5de7e8 in the next epoch (with stacks), use integer division to avoid float shenanigans for values greater than 2**53 2018-06-06 15:22:31 -04:00
Jude Nelson
701a092862 keep bitcoin prices as a float for backwards-compatibility (for now) 2018-06-06 15:21:30 -04:00
Jude Nelson
870acf8d1f add a 'price divisor' field to the system's epochs, and make it so that in the fourth epoch we will no longer use float multiplication but instead use integer division 2018-06-06 15:20:49 -04:00
Jude Nelson
5e9ab1ac5d be strict about allowing name renewals with token burns---there must be an 8-byte token burn field or nothing at all (assuming the epoch features permit tokens) 2018-05-30 11:59:58 -04:00
Jude Nelson
a34e000535 be strict in our namespace-preorder parser about rejecting namespace-preorders that don't have a token burn field in the token epoch (we rejected these already in the check() method, but why not reject them early if possible?) 2018-05-30 11:59:14 -04:00
Jude Nelson
68ba7fe64c stacks token fee is an int, not a float 2018-05-29 11:14:17 -04:00
Jude Nelson
ac226bda6b fields can be non-None, but evaluate to False 2018-05-29 11:14:02 -04:00
Jude Nelson
9da2642075 only log verbose HTTP output while testing 2018-05-03 18:14:11 -04:00