Commit Graph

7104 Commits

Author SHA1 Message Date
Jude Nelson
9d64dc091a do either an INSERT or an UPDATE, depending on whether or not we're preorder/registering or re-preordering/registering. Also, tighten the input validation logic to ensure that each state-create and state-transition op data contains both the history ID (name or namespace) as well as the block number (i.e. all column data that goes into the table's primary key) 2018-01-13 22:52:53 -05:00
Jude Nelson
3e2a15e8ad patch tests to conform to new virtualchain and blockstack APIs 2018-01-12 18:39:27 -05:00
Jude Nelson
199ad78b07 sync with new APIs for verifying databases and verifying final name states. also, pass around virtualchain directory instead of relying on a global 2018-01-12 18:38:24 -05:00
Jude Nelson
bbca6ad3de api sync with new atlas methods 2018-01-12 18:38:00 -05:00
Jude Nelson
dd21340b89 pass around virtualchain working directory, since it's not global anymore. also, contend with getting read/only versus read/write BlockstackDB database handles (i.e. do so explictily) 2018-01-12 18:37:28 -05:00
Jude Nelson
785de7bccb add utility methods from blockstack_client, like serializing an atlas zone file inventory message to a string and parsing host:port strings. This cuts dependency on blockstack_client 2018-01-12 18:36:55 -05:00
Jude Nelson
8aa485909b copy RPC client code from blockstack_client to blockstackd so the atlas peers can talk to one another. This cuts the dependency on blockstack_client in the Atlas subsystem 2018-01-12 18:36:22 -05:00
Jude Nelson
7457076825 use blockstackd's virtualchain_hooks library for getting ops fields 2018-01-12 18:35:49 -05:00
Jude Nelson
36b61b5bae add code path for the new get_nameops_at() RPC call that will be present on new blockstackd nodes. This invocation can simply paginate through historic name snapshots without needing to fetch histories and replay them locally (making SNV much faster and more reliable) 2018-01-12 18:35:05 -05:00
Jude Nelson
ceaa70bdd1 mark certain ancilliary methods as deprecated. 2018-01-12 18:34:47 -05:00
Jude Nelson
3269d7bcf3 api sync 2018-01-12 18:34:36 -05:00
Jude Nelson
2705d59e1e remove all restore_delta() and snv_consensus_extras() code, and remove all dependence on blockstack_client from our operations. Also remove deprecated state_*() helpers that had been required for propagating ancilliary operation state to the database, i.e. in order to ensure that name operations' histories could be rewound. This is now handled automatically with a better database schema. 2018-01-12 18:33:04 -05:00
Jude Nelson
41c8693bae now that restore_delta() and snv_consensus_extras() and BACKUP_FIELDS are no longer required, remove all ancilliary ops_*() methods that are used to query and manipulate them. 2018-01-12 18:32:35 -05:00
Jude Nelson
54444e455e the new database schema no longer requires us to fetch and store prior name histories in our check() decorators. Remove the ancilliary code that they had been using to do this. 2018-01-12 18:31:45 -05:00
Jude Nelson
d8fd4d5284 rework the RPC client: remove the storage and profile load/store APIs (now handled by gaiahub), simplify the SNV API so that we can simply paginate through historic name snapshots (which is now efficient, thanks to the new database schema), remove the asynchronous storage queue (now that we don't load/store data via blockstack_client), remove old CLI options (rebuilddb, importdb), rely on functionality provided by virtualchain wherever possible (like for verifydb) 2018-01-12 18:30:15 -05:00
Jude Nelson
ed54c905de update virtualchain_hooks (the virtualchain implementation) to adhere to the new StateEngine standards in virtualchain 0.18. In particular:
* add method for which blockchain we're on
* add method for determining how long a consensus hash is valid
* add method for getting all opcodes
* add method for getting all operations' serialization fields
* accept transactions in the virtualchain-standardized format, not the bitcoind RPC format
* stronger and more explicit adherence to acquiring read/only versus read/write BlockstackDB handles
2018-01-12 18:28:06 -05:00
Jude Nelson
68c0828a6d rework the BlockstackDB class to rely on virtualchain-provided database functionality (such as getting a block's ops hash), and rework the methods to use the new queries. In particular, history replaying is no longer necessary since we store all snapshots of all name records now. 2018-01-12 18:27:02 -05:00
Jude Nelson
26c6fec052 do not store name operation history deltas any longer. Instead, when an operation is committed, store the new name state in the history table. This *greatly* simplifies the code for getting historic states of a name, and obviates the need for the per-operation restore_delta() and snv_consensus_extras() methods. It also simplifies a lot of queries. 2018-01-12 18:25:12 -05:00
Jude Nelson
e50005da2f this file is now dead. all functionality it provides is now handled by virtualchain 2018-01-12 18:24:47 -05:00
Jude Nelson
86b57aaf48 add config file parsing code from blockstack_client, so we no longer depend on it. Similar for semver parsing and environment variable munging 2018-01-12 18:24:22 -05:00
Jude Nelson
0d1b9a29b8 refactor fast_sync functionality to use new chainstate routines in virtualchain 2018-01-12 18:24:01 -05:00
Jude Nelson
9798186a18 add zonefile hashing methods, removing dependency on blockstack_client 2018-01-12 18:23:20 -05:00
Jude Nelson
063c02d7d8 remove code for loading/storing data and profiles, and loading/storing zonefiles to 3rd party storage. This is the gaiahub's responsibility. 2018-01-12 18:22:49 -05:00
Jude Nelson
b8e6425f47 all methods: expect either an atlas database connection or an atlas database path. All atlas components: require a virtualchain working dir and a path to the atlas db 2018-01-12 18:22:06 -05:00
Jude Nelson
1dfdb5ade6 refactor tx public key extraction to use the virtualchain-standardized transaction data structure, instead of the emulated bitcoind RPC structure 2018-01-12 18:21:22 -05:00
Jude Nelson
4abbb85f94 require virtualchain 0.18 2018-01-12 18:20:59 -05:00
Jude Nelson
ad3e743285 ls-tests tool 2018-01-03 12:53:26 -05:00
Jude Nelson
0e16d827a3 don't copy blockstack package 2018-01-03 12:52:46 -05:00
Jude Nelson
417bab4501 don't link 2018-01-03 12:52:30 -05:00
Jude Nelson
7cf58582d0 start rpc 2018-01-03 12:52:23 -05:00
Jude Nelson
98e8a7cbb4 Merge branch 'master' into hotfix/ipfs-support 2018-01-03 12:49:28 -05:00
Jude Nelson
76b21f8f60 Merge branch 'master' of https://github.com/blockstack/blockstack-core 2018-01-03 12:47:52 -05:00
Aaron Blankstein
8c387211e8 update api example call for name lookups to fred.id 2017-12-29 09:41:51 -05:00
Aaron Blankstein
0a06cff114 Merge branch 'master' into hotfix/bad-gateway-resolver 2017-12-29 08:38:10 -05:00
Jude Nelson
f0ca145389 typo 2017-12-29 02:43:16 -05:00
Jude Nelson
0135c81683 version bump 2017-12-06 12:11:59 -05:00
Jude Nelson
58fbd0bbb8 include namespace keychains in the state we snapshot 2017-12-06 12:11:24 -05:00
Jude Nelson
8be20e18ce version bump 2017-12-01 13:59:43 -05:00
Jude Nelson
a696b2ec81 Merge branch 'hotfix/disable-segwit' 2017-12-01 13:59:04 -05:00
Jude Nelson
13b5df0cdb don't initliaze segwit wallets by default (yet) 2017-12-01 13:57:58 -05:00
Jude Nelson
cdbbc63091 Update namespace_creation.md v0.17.0.14 2017-11-21 13:31:26 -05:00
Jude Nelson
dae82306c2 Merge pull request #678 from friedger/patch-1
Fix debug msg about cost for renewal
2017-11-20 23:17:57 -05:00
Jude Nelson
0ed55f419e Merge branch 'master' into hotfix/ipfs-support 2017-11-20 23:08:37 -05:00
Jude Nelson
7ea4da5400 don't rely on the shell for npm commands 2017-11-20 23:08:05 -05:00
Jude Nelson
b86a62f448 behave correctly if we're PID 1; rework launch script so we become PID 1 in the PID namespace (not /bin/sh) 2017-11-20 23:07:29 -05:00
Jude Nelson
135f0eed8a don't spin forever 2017-11-20 23:07:07 -05:00
Jude Nelson
75960f089d if we're PID 1, then reap children 2017-11-20 21:55:04 -05:00
Jude Nelson
13a7a82c9b pass proxy through 2017-11-20 21:54:29 -05:00
Jude Nelson
da2a126a3a better docs on return values in listing history 2017-11-20 21:54:14 -05:00
Aaron Blankstein
38a7cd229a version bump 2017-11-20 10:24:57 -05:00