Commit Graph

2152 Commits

Author SHA1 Message Date
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
94fdfaa9d4 Merge ../blockstack-server.sqlite3 into develop 2016-08-31 11:37:41 -04:00
Jude Nelson
6246404fd7 sync with develop 2016-08-31 11:33:16 -04:00
Jude Nelson
c7c8183c9a remove now-unused files 2016-08-31 11:31:19 -04:00
Jude Nelson
789f77d299 remove pkg; sync readme from develop 2016-08-31 11:29:38 -04:00
Jude Nelson
dd2da4d66f sync .gitignore with develop 2016-08-31 11:26:26 -04:00
Jude Nelson
ebb4bd69fe sync with develop branch and remove things that are now obsolete and
will conflict
2016-08-31 11:25:47 -04:00
Jude Nelson
85c3dac223 remove dht and old test framework 2016-08-31 11:20:03 -04:00
Jude Nelson
84e88221af move to sqlite3 dir (for easy merge) 2016-08-31 10:58:51 -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
Muneeb Ali
8b4860aa44 Merge pull request #238 from blockstack/services
updated README with Core API status and goals
2016-08-29 11:55:30 -04:00
Muneeb Ali
ac608b48c0 updated README with Core API status and goals 2016-08-29 11:55:06 -04:00
Muneeb Ali
dd76b52c9a Merge pull request #237 from blockstack/services
Services
2016-08-29 11:48:32 -04:00
Muneeb Ali
555612cbd9 moved blockstack pypi package management here 2016-08-29 11:47:35 -04:00
Muneeb Ali
4b976c4c59 tested direct resolver calls (same interface), updated resolver code to latest (w/ owner_address) 2016-08-29 11:45:06 -04:00
Muneeb Ali
a9d8fda40b reorg files and directly access resolver (no background process) 2016-08-29 11:25:06 -04:00
Muneeb Ali
b756716613 reorg files and cleaned up files 2016-08-29 11:05:56 -04:00
Muneeb Ali
456b438c9f remove functionality for certain post requests and get flask interface working 2016-08-29 10:52:05 -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
Jude Nelson
f67c2258b1 rework peer discovery and peer retention logic:
* use metropolis-hastings random walk with random backtracking (variant of MRWB)
to sample the peer graph in as unbiased a way as we can.  The only major
difference between this and MRWB is that we don't maintain a peer stack;
we just select a random peer instead of backtracking.
* keep the peer table and the peer database in sync--the table is the
cache-coherent copy.
* keep only 65536 peers.  Hash the peer address and a nonce to select a
slot, and ping an old peer before evicting it on collision (and keep the
old peer on collision if it responds)
* a peer can ask for all other peers.
* remove up to 10 peers that are unhealthy per walk; add up to 10 new
peers that we discover on remote peer queries.
* use socket-determined peer address, not RPC-given peer address
* various code cleanups.
2016-08-22 17:55:58 -04:00
Muneeb Ali
95294c2b12 Merge pull request #236 from blockstack/services
fixed typo
2016-08-18 19:10:12 -04:00
Muneeb Ali
dd207514cd fixed typo 2016-08-18 19:09:24 -04:00
Muneeb Ali
9999682f7e Merge pull request #235 from blockstack/services
fixed typo
2016-08-18 19:08:53 -04:00