Commit Graph

177 Commits

Author SHA1 Message Date
Jude Nelson
6c676a4290 include metadata with an account in the genesis block 2018-04-23 16:17:11 -04:00
Jude Nelson
fd20fead1d when storing a preorder on namedb_state_create(), make sure its token_fee is a string so we don't accidentally load and return big integers 2018-04-19 19:04:25 -04:00
Jude Nelson
aea826bd80 execute account vesting commits as a single transaction (greatly improves performance), also change some method names to clarify that they concern only name operations 2018-04-19 11:56:51 -04:00
Jude Nelson
e6a84586d7 clarify names of some methods to mention that they specifically concern name operations (not token operations) 2018-04-19 11:56:31 -04:00
Jude Nelson
44e6224589 be more rigorous about checking for the presence of required consensus fields *early* 2018-04-19 11:56:10 -04:00
Jude Nelson
c0b416b09d small bugfixes 2018-04-15 22:37:11 -04:00
Jude Nelson
c6caca22eb ascending, not descending 2018-04-15 22:37:01 -04:00
Jude Nelson
c763e03122 small bugfixes 2018-04-15 22:36:46 -04:00
Jude Nelson
0319985a87 define check-wrappers and state tags for token operations 2018-04-13 19:19:07 -04:00
Jude Nelson
e994fb319a commit vesting at block_height+1 at the end of the block, so vested tokens are immediately usable. Also, expand the set of acceptable operations to include token operations 2018-04-13 19:17:06 -04:00
Jude Nelson
86d5102bb0 add full-fledged support for token operations that both credit and debit accounts when they are applied. Also, add high-level methods for querying account state 2018-04-13 19:16:37 -04:00
Jude Nelson
aa729548c7 add a transfer-lock to accounts to force them to vest and spend, instead of sell tokens. Also, remove some dead code and add the ability to query account histories 2018-04-13 19:16:03 -04:00
Jude Nelson
8f4f2f6653 typo in comment 2018-04-03 19:00:37 -04:00
Jude Nelson
5426171feb typo in debug output 2018-04-03 17:59:51 -04:00
Jude Nelson
8d426ca9b5 vest tokens at each block 2018-03-22 19:24:14 -04:00
Jude Nelson
32552487e0 add state invariant tags for account debits 2018-03-22 19:19:59 -04:00
Jude Nelson
2c15d29f03 add wrappers for querying account state; make it so committing preorders can trigger an account debit; update interfaces to pass in the token genesis block 2018-03-22 19:19:26 -04:00
Jude Nelson
66966f5011 add a multi-token accounting system:
* add a table for token expenditure history
* track debits and credits separately
* initialize the database with a caller-given genesis block and vesting schedule
* add operations to debit accounts
* add safety checks to ensure that accounts can never go negative
* add methods to query accounts' balances and tokens
* add methods to query account history
2018-03-22 19:17:23 -04:00
Jude Nelson
4bfc224af8 fix DID resolution 2018-02-18 00:32:52 -05:00
Jude Nelson
9648242d25 remove excess debugging output 2018-02-16 12:12:46 -05:00
Jude Nelson
900b4ae3af remove print 2018-02-16 12:12:39 -05:00
Jude Nelson
975a662e6f make sure a DID that points to an expired but reregistered name will resolve to the name as it was just before it was reregistered 2018-02-15 23:26:24 -05:00
Jude Nelson
b2bbd69a9d make sure DIDs that point to old expired versions of a name still resolve 2018-02-15 23:25:58 -05:00
Jude Nelson
b470bdd9d7 remove unused code 2018-02-14 17:42:32 -05:00
Jude Nelson
aa07488e49 whitespace in query 2018-02-12 23:54:43 -05:00
Jude Nelson
99329c1d80 return sorted names 2018-02-12 23:53:14 -05:00
Jude Nelson
d9aa6c90e0 atlas.db and subdomain.db are now considered state paths 2018-02-12 18:39:06 -05:00
Jude Nelson
24d5533949 document semantics on history queries 2018-02-12 11:00:32 -05:00
Jude Nelson
d1eec47ac8 add method for resolving DIDs to names, and getting DID info for a given name 2018-02-11 18:58:07 -05:00
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