Commit Graph

1034 Commits

Author SHA1 Message Date
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
Jude Nelson
fdea829dd7 port subdomain lookup redirect 2018-04-30 15:55:58 -04:00
Jude Nelson
6830db642a when running as a public testnet node, require an *exact* server version match 2018-04-30 10:36:57 -04:00
Jude Nelson
fab0301701 make sure testnet nodes assume that a remote peer is mainnet if they do not reply a 'testnet' field (and ignore them if so) 2018-04-30 09:39:42 -04:00
Jude Nelson
5b9a7f5944 set bind address in test config 2018-04-30 00:43:39 -04:00
Jude Nelson
39d82c671e allow testnet to set api host to 0.0.0.0 2018-04-30 00:35:37 -04:00
Jude Nelson
a85475f140 conditional check for public testnet envar 2018-04-30 00:06:38 -04:00
Jude Nelson
6c6d3ee763 crawl at a normal rate when in the public testnet 2018-04-30 00:04:50 -04:00
Jude Nelson
ef358c891b make getinfo faster so we can use it more in atlas in order to tell if we're talking to a testnet or mainnet node. We'll make it so mainnet nodes and testnet nodes ignore each other. 2018-04-29 23:01:57 -04:00
Jude Nelson
0e97ea1f6f serialize token to string 2018-04-29 02:27:01 -04:00
Jude Nelson
febfbf73d7 fix a few regressions from the move away from blockstack_client 2018-04-27 01:11:03 -04:00
Jude Nelson
6501e17c48 return renewal_deadline 2018-04-26 00:09:45 -04:00
Jude Nelson
bfe729c6c2 proxy objects no longer contain SPV headers 2018-04-26 00:09:34 -04:00
Jude Nelson
013bb6564d version bump 2018-04-24 17:25:38 -04:00
Jude Nelson
12b7e3727f REST endpoint's zonefile hash length is 2x the length in bytes 2018-04-24 17:24:13 -04:00
Jude Nelson
8f51bcb4a0 separate out error validation 2018-04-24 10:43:00 -04:00
Jude Nelson
eb646ba665 add doctests to scripts module 2018-04-23 16:17:46 -04:00
Jude Nelson
c2a6bd5eb8 note that in the next release, we're going to have to change the subdomain regex 2018-04-23 16:17:28 -04:00
Jude Nelson
6c676a4290 include metadata with an account in the genesis block 2018-04-23 16:17:11 -04:00
Jude Nelson
9513f5d672 check that the name is valid in register/renewal (we already do this implicitly through the check() method, but we should do it explicitly for clarity) 2018-04-23 16:16:49 -04:00
Jude Nelson
ff4488eed5 add doctests to b40 module 2018-04-23 16:16:38 -04:00