Jude Nelson
378c4cbe98
add method to get the DID info for a name
2018-02-11 18:57:52 -05:00
Jude Nelson
fc50f48fc9
handle timeouts in db queries
2018-02-08 19:16:06 -05:00
Jude Nelson
79742bc8c1
use db_format_query
2018-02-07 19:01:43 -05:00
Jude Nelson
13c415cb6e
not required to build up the subdomain index using the instance provided in the db state
2018-02-02 18:39:51 -05:00
Jude Nelson
df19e94ca3
process subdomain-enqueued zone files once per block
2018-01-29 19:09:11 -05:00
Jude Nelson
4afe4ab356
use common db query execution code that handles database locks
2018-01-29 19:08:55 -05:00
Jude Nelson
c02ddd9cfc
tell state engine to restore
2018-01-22 17:13:13 -05:00
Jude Nelson
c76eddbac6
remove dead code
2018-01-21 00:58:06 -05:00
Jude Nelson
2d786a939b
don't preserve nameop_consensus_hash in name-transfer (for now). It looks like we don't need it.
2018-01-20 16:17:13 -05:00
Jude Nelson
a6a2109886
remove dead code; allow omitting history when querying names and namespaces
2018-01-19 18:44:07 -05:00
Jude Nelson
63ba1e16a0
remove dead code
2018-01-19 18:43:57 -05:00
Jude Nelson
df8aba81b0
slightly better docs
2018-01-19 15:13:25 -05:00
Jude Nelson
1de3e01037
on name transfers, verify that the transfer consensus hash quirk is applied before snapshotting
2018-01-19 15:13:03 -05:00
Jude Nelson
f13ab07766
only run op_canonicalize_quirks() once on an operation, and eagerly filter out extra data (e.g. transient quirk-related data) on a state-transition
2018-01-19 15:12:20 -05:00
Jude Nelson
5f7e6c68d2
sync the atlas db with operation(s) we just committed
2018-01-17 22:31:19 -05:00
Jude Nelson
4302c958d7
whitespace
2018-01-17 18:59:00 -05:00
Jude Nelson
b8bd31f0f3
expect returned db record to have all consensus fields
2018-01-17 17:01:18 -05:00
Jude Nelson
822127dee3
return merged record on state transition, and canonicalize it and preserve quirks
2018-01-17 17:00:59 -05:00
Jude Nelson
8ed95cd48b
preorders don't have last_creation_op
2018-01-17 15:29:24 -05:00
Jude Nelson
72a04eb734
check for serialization quirks before commiting a new name record
2018-01-17 14:18:06 -05:00
Jude Nelson
0e5d1822c8
take canonicalized records (with quirks) from the namedb_...() methods, instead of trying to do it in this layer
2018-01-17 14:17:38 -05:00
Jude Nelson
7e7e8e6d39
have all state-commit operations calculate a record's canonical form, *with* all quirks built in
2018-01-17 14:17:15 -05:00
Jude Nelson
c3c0659fd5
typo
2018-01-16 18:48:19 -05:00
Jude Nelson
95427874a2
add method to set up the db
2018-01-16 16:36:08 -05:00
Jude Nelson
a5e23bfb45
when getting a name or namespace at a particular time under the condition that it must not be expired, don't return None if the name/namespace hadn't been registered/revealed at the given block height. The caller may be expecting a preorder
2018-01-16 16:35:34 -05:00
Jude Nelson
faca96fd51
missing cursor instantiation
2018-01-16 16:35:23 -05:00
Jude Nelson
0d6bff034c
typo: get a cursor correctly
2018-01-14 15:52:00 -05:00
Jude Nelson
5f2671e728
must_equal constraints must include all public key columns (TODO: extract from DB schema)
2018-01-14 15:51:39 -05:00
Jude Nelson
a64f4019c0
expose getting all namespace preorders; fix typo
2018-01-13 23:50:35 -05:00
Jude Nelson
6e3078b34e
add back getting all namespace preorders; fix offset pagination for quering name history
2018-01-13 23:50:14 -05:00
Jude Nelson
c7cfed891f
pass constraints-ignored hints to state-creation
2018-01-13 22:54:07 -05:00
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
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
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
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
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
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
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
c6e7399c46
add methods to get the last block and consensus hashes
2017-09-29 00:49:38 -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
d65269d5bd
burn_address is an indirect consensus field
2017-09-29 00:49:35 -04:00
Jude Nelson
f57c1e14b2
delegate determining the burn output and value to the operation; don't try to do it universally
2017-09-29 00:49:30 -04:00