Commit Graph

222 Commits

Author SHA1 Message Date
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
Jude Nelson
d4a7c5e772 set initial peer table 2016-08-29 17:35:17 -04:00
Jude Nelson
eb2015307b more code clean-up:
* autoincrement peer index
* enable test network methods only if we're a subordinate atlas peer,
and not the main test thread
* locking bugfixes
* remove redundant code
* more debug output
2016-08-29 17:34:36 -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
b0876869b5 make blockstack server amenable to being run as an atlas peer in the
test framework.
2016-08-26 18:46:15 -04:00
Jude Nelson
28f01ac54d more bugfixes found during testing; remove dead code; fix deadlocks 2016-08-26 18:45:52 -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
d23bdf3c16 bugfixes found in testing; add top-level startup/shutdown logic; add db
sync logic
2016-08-24 17:41:53 -04:00
Jude Nelson
848cfff660 fix a few bugs in MHRWDA, found during testing 2016-08-23 23:13:05 -04:00
Jude Nelson
8039310238 Implement Metropolis-Hastings Random Walk with Delayed Acceptance,
instead of Metropolis-Hastings Random Walk with Backtracking.  This is
in light of reading the SIGCOMM 2012 paper by Lee, Xu, and Eun.  Also,
update documentation to briefly explain the peer selection and
exploration rationale.
2016-08-23 18:01:50 -04:00
Jude Nelson
89c0fc2572 support atlas = [True|False] under [blockstack] 2016-08-23 11:39:56 -04:00
Jude Nelson
1298b543a3 conditionally enable atlas support based on config file 2016-08-23 11:39:41 -04:00
Jude Nelson
fe8741da4b all rpc_ methods receive **con_info to contain client information 2016-08-22 18:00:05 -04:00