Commit Graph

169 Commits

Author SHA1 Message Date
Jude Nelson
de2df704c0 commas and spelling 2016-10-05 14:39:07 -04:00
Jude Nelson
6a2639bc49 do not allow a name to be registered to a p2sh script until the multisig
support activates (this is to keep 0.14 consistent with 0.13 until then)
2016-10-04 18:16:50 -04:00
Jude Nelson
488d1ad1d3 do not allow a transfer sender to be a p2sh script until the multisig
support activates
2016-10-04 18:16:18 -04:00
Jude Nelson
ea7a286e26 our public key extraction logic only works (by design) on p2pkh scripts 2016-10-04 18:16:03 -04:00
Jude Nelson
15a87a595f keep the list of features that will activate when a new epoch passes.
provide a query interface to these features, so the consensus logic
activates them at the appropriate times
2016-10-04 18:15:25 -04:00
Jude Nelson
5f23f5be56 2-year multiplier kicks in at 436600 2016-10-03 18:34:39 -04:00
Jude Nelson
e7b7ad8fa0 justify why we check lastblock when we open the db 2016-10-03 00:47:35 -04:00
Jude Nelson
2a78fb1ad4 add a way to remove invalid cached zonefiles, and check that the
zonefile *data* is cached (not that the zonefile cached is a standard
zonefile).
2016-10-03 00:20:55 -04:00
Jude Nelson
527f7d3e16 require a name for getting the txid 2016-09-28 20:28:57 -04:00
Jude Nelson
0851ffc901 take namespace parameter when getting namespace price 2016-09-28 20:27:48 -04:00
Jude Nelson
46abc13e9a improve error-path log messages a bit 2016-09-28 20:26:18 -04:00
Jude Nelson
4233614110 take an optional lastblock when determining whether or not a preorder is
"new"
2016-09-28 20:26:01 -04:00
Jude Nelson
438647fea2 update preorder schema to include the txid as well as preorder hash, so
we don't violate the uniqueness constraint if someone reuses the same
key
2016-09-28 19:54:00 -04:00
Jude Nelson
8b5c554a93 accept a dict of expected consensus hashes while verifying the database,
and check each block along the way (instead of just the last one)
2016-09-28 19:53:15 -04:00
Jude Nelson
78f773db00 rework epoch logic to consider per-epoch rules on a per-namespace basis. 2016-09-28 19:52:50 -04:00
Jude Nelson
22bdb8045c whitespace 2016-09-25 23:47:38 -04:00
Jude Nelson
def3b3d632 remove needless import 2016-09-22 20:30:33 -04:00
Jude Nelson
7b5fe6deff Merge branch 'develop' into release-candidate 2016-09-21 14:11:10 -04:00
Jude Nelson
6ed3457ea2 remove unused code; pass through db from RPC endpoint 2016-09-21 14:04:28 -04:00
Jude Nelson
c38c0d4c19 use separate variables for epoch constants 2016-09-20 16:35:16 -04:00
Jude Nelson
c57bfab3bd pass -1 for offset/length if not known or we don't care (don't use None) 2016-09-16 17:46:14 -04:00
Jude Nelson
6df34adb46 when looking up the txid that funded a zonefile update, go and look up
the name if we aren't given one
2016-09-16 17:45:47 -04:00
Jude Nelson
b7f0b5ae9e when getting all names or names in a namespace, just get the names
themselves.
2016-09-16 17:45:24 -04:00
Jude Nelson
993f880eb0 while testing keep the price of a 1-char namespace low so we don't run
out of regtest bitcoin
2016-09-15 17:00:30 -04:00
Jude Nelson
d8f9367e16 remove dead code 2016-09-15 15:46:42 -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
2a8352a17d separate zonefile parsing from storage processing 2016-09-14 17:38:54 -04:00
Jude Nelson
90bd4fa2aa sync symbols 2016-09-14 17:38:45 -04:00
Jude Nelson
49f4e3e624 zonefile cache directories are broken down by byte 2016-09-14 16:19:26 -04:00
Jude Nelson
ed67947572 pass zonefile=True hint when loading zonefiles 2016-09-14 16:12:57 -04:00
Jude Nelson
61ba8eb3a2 inform virtualchain of our read-only intent 2016-09-14 16:12:43 -04:00
Jude Nelson
67ce3c557b use 2-char zonefile directory names 2016-09-14 14:52:26 -04:00
Jude Nelson
5d39ee7fc9 pass along name to zonefile storage driver whenever possible 2016-09-13 16:31:40 -04:00
Jude Nelson
fc62c5892f fix epoch look up and abort on failure 2016-09-12 18:00:44 -04:00
Jude Nelson
c4cf324e1b register/renew can mutate op_fee, since the epoch can change between
preorder/register or register/renew.  Also, when considering name
prices, use the preorder's block number (i.e. the epoch the preorder
occurred in determines the price to pay, not the register).  For
renewals, however, use the current block height to determine the fee.
2016-09-12 17:59:35 -04:00
Jude Nelson
41c22f172a remove dead code 2016-09-12 17:59:29 -04:00
Jude Nelson
f6d81c332d back up op_fee, since it can change due to an epoch change 2016-09-12 17:59:14 -04:00
Jude Nelson
7792395b69 optionally get a preorder for a name that already exists (i.e. a failed
preorder)
2016-09-12 17:58:58 -04:00
Jude Nelson
8e7c78f3d3 remove dead code 2016-09-09 16:55:30 -04:00
Jude Nelson
84266a9f2e if re-revealing an expired namespace of the same name, reconstruct the
appropriate history snapshot first (i.e. the previous revealed state)
2016-09-09 16:55:01 -04:00
Jude Nelson
8f7e37a414 add include_expired to get_namespace_op_state; fix get_namespace_at to
work at all block heights
2016-09-09 16:54:36 -04:00
Jude Nelson
d33aa69228 check namespace fields before updating it; when selecting a namespace at
a block height, optionally ignore the reveal block
2016-09-09 16:53:45 -04:00
Jude Nelson
dfb4cbea2d use new epoch system to determine correct price multipliers 2016-09-09 11:20:26 -04:00
Jude Nelson
c6c8c9a4f9 API sync 2016-09-09 11:20:16 -04:00
Jude Nelson
f094d3cb1d WIP: make expired namespace_reveals restorable 2016-09-09 11:19:56 -04:00
Jude Nelson
0143b7cb85 new price_name() API sync 2016-09-09 11:19:38 -04:00
Jude Nelson
60e82529fe better history index notation in debug output 2016-09-09 11:19:23 -04:00
Jude Nelson
feed3422ee get_namespace_op_state() for getting historic namespace states; on
committing a state transition, include expired namespace op sequences
(this is because the block we're processing is one block later than the
block we used to query properties about the namespace--we need to ensure
that if we have a state-transition on a namespace that occurred on the
last possible block, we still accept it)
2016-09-09 11:17:53 -04:00
Jude Nelson
4802c6638b WIP: use the new epoch system; working on restoring expired
namespace_reveals
2016-09-09 11:16:55 -04:00
Jude Nelson
eb430d4258 WIP: add a notion of a "settings epoch" to the server, where some
settings are only valid for certain block ranges
2016-09-09 11:16:18 -04:00