Jude Nelson
3ca538136f
pass along name to zonefile storage driver whenever possible
2016-09-13 16:31:23 -04:00
Jude Nelson
eb179d23d5
update zonefile acquisition logic: try storage drivers first, and then
...
try atlas peers. Only try storage drivers once per zonefile hash either
way (add a 'tried_storage' column to the atlas db to track this)
2016-09-13 16:30:41 -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
06bc0bb15c
find the current epoch's namespace lifetime multiplier and use it to
...
calculate the expire block for a name
2016-09-12 17:58:38 -04:00
Jude Nelson
5f11ba1658
set default port
2016-09-09 17:11:24 -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
f60a9b73d4
report correct expire block
2016-09-09 16:53:27 -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
70b7957141
add get_namespace_cost(); pass working db path to verifydb
2016-09-09 11:15:51 -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
e93328c09a
refactoring: move history verification to lib/consensus; specialize
...
debug output when using the atlas network simulator; use get_records_*
instead of get_nameops_*
2016-09-02 00:12:50 -04:00
Jude Nelson
c7c8183c9a
remove now-unused files
2016-08-31 11:31:19 -04:00
Jude Nelson
e692706058
don't remove a peer if it's whitelisted or blacklisted
2016-08-30 20:37:06 -04:00
Jude Nelson
8e27fc5586
abort on fatal error
2016-08-30 20:23:52 -04:00
Jude Nelson
bc40d5a901
abort on fatal error; better atlas start/stop logic; report JSON
...
tracebacks as strings
2016-08-30 20:23:33 -04:00
Jude Nelson
069037077b
bugfixes found in testing; better socket error logging
2016-08-30 20:23:20 -04:00
Jude Nelson
03da6c4a66
runtime sanity checks on lock state
2016-08-30 12:31:46 -04:00
Jude Nelson
da509dc2ba
atlas_start() and atlas_stop() as explicit methods
2016-08-30 00:37:25 -04:00
Jude Nelson
7edcafa753
more bugfixes from mesh testing
2016-08-30 00:37:02 -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