Commit Graph

524 Commits

Author SHA1 Message Date
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
58fbd0bbb8 include namespace keychains in the state we snapshot 2017-12-06 12:11:24 -05:00
Jude Nelson
8aeda60924 add API wrappers around the DB calls to get unexpired and cumulative names and counts 2017-11-08 11:28:32 -05:00
Jude Nelson
b8f23bd8d7 add DB queries for getting the unexpired and cumulative name counts 2017-11-08 11:28:16 -05:00
Jude Nelson
a4be04ffd1 Merge branch 'hotfix/nameop-library-support' into hotfix/did-support 2017-10-30 16:39:36 -04:00
Jude Nelson
6807734dea typo 2017-10-29 22:38:18 -04:00
Jude Nelson
dfa26846b0 add API methods to find out the list of names ever created by an address 2017-10-27 19:25:06 -04:00
Jude Nelson
01bad1dcb2 remember the address that creates (i.e. imports-for-the-first-time or registers) a name 2017-10-27 19:24:24 -04:00
Jude Nelson
8cd29bb2d1 only check rc value, not exit bits 2017-10-11 17:26:25 -04:00
Jude Nelson
4888f5bd87 whitespace 2017-10-11 15:30:28 -04:00
Jude Nelson
18ef1a5ac1 verbose output when using the CLI 2017-10-05 12:15:38 -04:00
Jude Nelson
e54dd15e32 select zonefiles that are present 2017-10-05 12:15:26 -04:00
Jude Nelson
a4c77e3294 require 0.17 or newer 2017-10-04 17:54:43 -04:00
Jude Nelson
effc2d6db3 a NAME_REGISTRATION/NAME_RENEWAL's burn address must go to a v2 namespace's address for the first year (fee collection period) of its existence, starting from its reveal block. after that, fees go to the null burn address (to discourage squatting or gratuitous namespace registration) 2017-10-04 00:03:54 -04:00
Jude Nelson
f13df668a5 introduce a fixed interval of time during which a v2 namespace can collect fees. 2017-10-04 00:03:19 -04:00
Jude Nelson
5d0bcbce19 plug DoS problem whereby a namespace can be preordered by a non-p2pkh script (this is allowed; this fix stops nodes from crashing when it happens) 2017-10-03 13:07:20 -04:00
Jude Nelson
36e506e18b feed stdout and stderr to the parent process when doing a sqlite3 backup, so we can properly catch database-lock errors 2017-10-01 16:31:50 -04:00
Jude Nelson
b8f340c3a1 preserve sender_pubkey across renewal 2017-10-01 14:37:45 -04:00
Jude Nelson
4e579bdbed fix debug output on burn fee 2017-09-29 18:09:58 -04:00
Jude Nelson
c2c293f040 Merge branch 'develop-hardfork' of https://github.com/blockstack/blockstack-core into develop-hardfork 2017-09-29 16:04:14 -04:00
Jude Nelson
65147a144e print exceptions in test mode 2017-09-29 16:03:27 -04:00
Aaron Blankstein
c91d130d97 fix logging typo 2017-09-29 15:28:26 -04:00
Jude Nelson
3961f9cd2c minimum atlas version is now 0.17 2017-09-29 01:59:39 -04:00
Jude Nelson
b61ab54747 don't forget namespace lifetime multiplier 2017-09-29 00:50:02 -04:00
Jude Nelson
9563b9bcf4 a preorder will expire in min(144, namespace['lifetime']) blocks 2017-09-29 00:50:02 -04:00
Jude Nelson
8eb8028bb8 log deletes 2017-09-29 00:50:02 -04:00
Jude Nelson
5aec8946d1 f-day 2014 is at 488500; renewal grace period is 5000 blocks; price multiplier for names and namespaces is 1/10 2017-09-29 00:50:02 -04:00
Jude Nelson
5842fed87a op_fee can be None, if it is not given 2017-09-29 00:49:38 -04:00
Jude Nelson
c6e7399c46 add methods to get the last block and consensus hashes 2017-09-29 00:49:38 -04:00
Jude Nelson
511679c03e check version, block height, and consensus hash when talking to other atlas nodes 2017-09-29 00:49:38 -04:00
Jude Nelson
7145bcfee8 don't allow transfer if we're in the renewal grace period 2017-09-29 00:49:37 -04:00
Jude Nelson
1860edb8f6 don't allow update if we're in the renewal grace period 2017-09-29 00:49:37 -04:00
Jude Nelson
f74e14c033 don't allow revoke if we're in the name renewal grace period 2017-09-29 00:49:37 -04:00
Jude Nelson
6de96721b0 don't clear out sender_pubkey 2017-09-29 00:49:37 -04:00
Jude Nelson
6063d4b5e5 add checks to see if the name is in the renewal grace period 2017-09-29 00:49:37 -04:00
Jude Nelson
d880b43031 include grace period in name expiration calculation 2017-09-29 00:49:37 -04:00
Jude Nelson
4620edf6e7 include epoch config for grace period 2017-09-29 00:49:36 -04:00
Jude Nelson
0451d81d92 log renewal fee 2017-09-29 00:49:36 -04:00
Jude Nelson
f6fe5bb18d comment on burn addr 2017-09-29 00:49:36 -04:00
Jude Nelson
442457ddbe rearrange a few things so test framework constants get set correctly 2017-09-29 00:49:35 -04:00
Jude Nelson
d65269d5bd burn_address is an indirect consensus field 2017-09-29 00:49:35 -04:00