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
Jude Nelson
9cd931dcfa
print CHECK statements for the time being
2016-09-07 11:10:26 -04:00
Jude Nelson
a3cce7c843
when producing the op sequence on state transition, include expired
...
names. This is because the acceptance criteria are predicated on the
current block, whereas the op sequence calculation is predicated on the
next block.
2016-09-07 11:09:25 -04:00
Jude Nelson
c4abd401e1
pass both the working db and untrusted db when calculating extra
...
consensus fields (since the untrusted db might not have the data we
need when verifying). Also, when calculating consensus quirks, check if
a name operation is the first NAME_IMPORT for a name in order to handle
the NAME_IMPORT fee quirk correctly.
2016-09-07 11:08:06 -04:00
Jude Nelson
fefce0537d
log which code path we take
2016-09-05 20:46:24 -04:00
Jude Nelson
1952b935e4
preserve the *first* preorder name hash when restoring consensus extras
2016-09-05 20:46:00 -04:00
Jude Nelson
51617feead
log the SNV quirks as we apply them
2016-09-05 20:45:45 -04:00
Jude Nelson
234903c057
get_name_last_creation_opcode(); better abort debug output
2016-09-05 20:45:27 -04:00
Jude Nelson
f0443a0202
don't need history
2016-09-05 20:45:13 -04:00
Jude Nelson
b9d46bf0e4
remove dead code; better debug statement
2016-09-04 17:22:53 -04:00
Jude Nelson
d42a7614d5
whitespace
2016-09-02 00:21:37 -04:00
Jude Nelson
692319b263
Merge sqlite3 into develop. Mostly refactoring: move operation
...
parsing, validation, and consensus logic into the individual operation's
.py file.
2016-09-02 00:20:24 -04:00
Jude Nelson
45194de4bf
Merge sqlite3's database to develop. Use a sqlite3 database instead of
...
a flat file. Preserve the BlockstackDB API, but be a lot more rigorous
about checking invariants that must hold across state-preordering,
state-creating, and state-transitioning.
2016-09-02 00:19:06 -04:00
Jude Nelson
c93390ef0e
sqlite3 merger: add much more rigorous operation-checking:
...
* identify and preserve invariant properties that must hold across name
state-transitions (like no-collisions, or limiting fields that can
change).
* add history validation
* identify consensus-bearing fields, and how each state-creation or
state-transition may affect them (and add runtime checks to see that
they only affect the fields we say they will)
* add decorators that we can apply to name operations to enforce the
above.
2016-09-02 00:16:36 -04:00
Jude Nelson
4a7c1a3b47
merge sqlite3's operation relationship definitions
2016-09-02 00:15:55 -04:00
Jude Nelson
3d8228a914
move database and history verification to one place
2016-09-02 00:14:39 -04:00
Jude Nelson
acb0eb5104
refactoring: move name/namespace validation and pricing to lib/scripts;
...
move common transaction extraction logic to lib/scripts
2016-09-02 00:13:51 -04:00
Jude Nelson
8e27fc5586
abort on fatal error
2016-08-30 20:23:52 -04:00
Jude Nelson
940d29e14e
remove unused code
2016-08-29 17:35:40 -04:00
Jude Nelson
4655830e53
set NUM_CONFIRMATIONS to 0 when testing, so we can get faster results
2016-08-29 17:35:28 -04:00
Jude Nelson
5fd23a8938
make blockstack-server amenable to running in the network simulator
2016-08-26 18:46:41 -04:00
Jude Nelson
d999f1beb7
typo (bug)
2016-08-24 17:42:56 -04:00
Jude Nelson
3a625263e9
add atlas config options
2016-08-24 17:42:38 -04:00
Jude Nelson
89c0fc2572
support atlas = [True|False] under [blockstack]
2016-08-23 11:39:56 -04:00
Jude Nelson
4ac8651741
use correct zonefile cache path; disable update tx check when testing
2016-08-18 18:33:08 -04:00
Jude Nelson
7b69b499cc
tweak comments; add get_zonefile_hashes_at() for Atlas node support
2016-08-15 18:20:18 -04:00
Jude Nelson
7cd61e362f
remove dead imports; if unit-testing, then set a version directly (won't
...
be used unless the right envars are set)
2016-08-15 18:19:41 -04:00
Jude Nelson
5e570de5bf
remove dead code
2016-08-15 18:19:12 -04:00
Jude Nelson
21285a9d7e
remove dead code
2016-08-15 18:19:00 -04:00
Jude Nelson
4b5b72fa77
enforce op_fee formatting quirk; check for absurdly high-value transactions
...
while testing
2016-08-10 16:07:21 -04:00
Jude Nelson
ccc6f91e5e
some things don't have to be considered p2pkh scripts any longer :D
2016-08-06 00:15:45 -04:00
Jude Nelson
4656fe951a
CONSENSUS-BREAKING CHANGE: if we can't find the pubkey hex in the script
...
sig, then set it to "", not None. This hadn't been a problem before,
because all keys were p2pkh and always had public keys. With multisig
support, this will no longer be the case.
2016-08-06 00:14:42 -04:00
Jude Nelson
070e9b86de
period
2016-08-06 00:14:32 -04:00
Jude Nelson
0006c7b48d
remove now-unneeded code
2016-08-06 00:14:07 -04:00