Jude Nelson
c0859d7bb1
propagating api change -- query account history by page, not block range
2018-09-13 16:20:27 -04:00
Jude Nelson
591a42c787
do not require a block range when getting an account's history; also, update the genesis block ingestion code to allow an arbitrary string to be an address *so long as it cannot receive tokens*. This is used to add "owned-by-contract" token allocations
2018-09-13 16:19:30 -04:00
Jude Nelson
c99e7947f6
api tweak: pass the server state to the virtualchain hooks (including the atlas state)
2018-08-13 16:01:51 -04:00
Jude Nelson
961b17cb16
Merge branch 'master' into feature/token-v1
2018-08-07 14:39:29 -04:00
Jude Nelson
1d4940f5f7
also export subdomain db and atlas db (meant mainly for testing)
2018-07-18 21:10:24 -04:00
Jude Nelson
01ef6b022b
de-lint; version bump
2018-07-06 14:04:09 -04:00
Jude Nelson
733e3ce9ef
delinting!
2018-07-06 13:48:24 -04:00
Jude Nelson
c62794f1b9
use getter for genesis block
2018-07-05 18:47:27 -04:00
Jude Nelson
cd45b533ec
pass in genesis block data to namedb initialization code
2018-07-05 18:47:00 -04:00
Jude Nelson
4c19b29d90
take the global GENESIS_BLOCK
2018-07-05 17:31:21 -04:00
Jude Nelson
d5bccbec17
block_height is an int
2018-07-05 17:31:12 -04:00
Jude Nelson
b849169ade
store the hash of the canonical serialization of the genesis history in the accounts table
2018-06-21 18:29:59 -04:00
Jude Nelson
acbad556ab
optionally get name history rows in reverse
2018-06-20 18:57:04 -04:00
Jude Nelson
3b007221e4
optionally get name history rows in reverse
2018-06-20 18:56:19 -04:00
Jude Nelson
cd51534d81
optionally get name history rows in reverse
2018-06-20 11:44:29 -04:00
Jude Nelson
98c59d4f80
optionally get name history rows in reverse
2018-06-20 11:44:15 -04:00
Jude Nelson
d4e7e3e616
require 'vesting_total' in the genesis block, and use it to check the vesting schedule
2018-06-18 18:42:02 -04:00
Jude Nelson
af520b35ff
refuse to process a transaction if it has a sender scriptpubkey we don't know how to parse
2018-06-16 11:27:20 -04:00
Jude Nelson
f98bbce9f8
implement database concern of recipient address whitelisting
2018-06-16 11:27:04 -04:00
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