Commit Graph

8912 Commits

Author SHA1 Message Date
Jude Nelson
dde76d520c Separate out code and tests for calculating a burn distribution -- a Vec of BurnSamplePoints. This allows us to take a block's worth of block commits and user burns, and figure out the total burns behind each candidate block. This code also takes the integer range [0, 2**256 - 1) and partitions it into disjoint ranges representing sets of possible sortition hashes whose sizes are proportional to how much burn support there is behind each block. 2019-02-18 21:52:48 -05:00
Jude Nelson
213f3083ec API sync with ed25519 and curve25519 2019-02-07 16:11:12 -05:00
Jude Nelson
113df58622 make all ops Eq; fix test imports 2019-02-07 16:10:53 -05:00
Jude Nelson
d8ebc59ecb use correct column name; fix imports in tests 2019-02-07 16:10:38 -05:00
Jude Nelson
c73f63e3fc add Eq derive 2019-02-07 16:10:26 -05:00
Jude Nelson
8e726caf4a bump curve25519 and ed25519 packages 2019-02-07 16:09:59 -05:00
Jude Nelson
ff14340a44 Merge branch 'develop-jude' into develop 2019-02-07 15:32:44 -05:00
Jude Nelson
e39ea808f5 generate hash160 from sha256 as a separate method 2019-02-07 15:32:13 -05:00
Jude Nelson
3dfba809d3 add system fork set version 2019-02-07 15:31:57 -05:00
Jude Nelson
ba06e20f99 implement check routine for user burn supports. In particular, a user burn support does _not_ need to correspond to a specific block to be accepted -- we'll still keep the burns around to measure chain quality 2019-02-07 15:30:28 -05:00
Jude Nelson
735dab927c finish check() routine for leader block commits 2019-02-07 15:30:16 -05:00
Jude Nelson
9ca2ac9817 roll the system fork version into the consensus hash 2019-02-07 15:29:57 -05:00
Jude Nelson
0cb854d272 make FromRow generic for Address 2019-02-07 15:29:37 -05:00
Jude Nelson
61d33a9230 select operations by txid and burn block hash; check that an existing DB has the right starting block height when connecting; add helper methods to be used in checking the validity of burn chain ops 2019-02-07 15:28:42 -05:00
Jude Nelson
71853544cd clarify that burnchain input types will be expanded as we add more support for burn chains 2019-02-07 15:28:12 -05:00
Jude Nelson
af928dca07 not dead yet! 2019-02-07 15:28:00 -05:00
Jude Nelson
8a2d7ce618 replace Bitcoin-specific methods for converting scriptsigs into scriptpubkeys with generic methods for turning tx inputs into address bits 2019-02-07 15:27:14 -05:00
Jude Nelson
058d1e1f14 make fields public; remove unused code 2019-02-07 15:26:44 -05:00
Aaron Blankstein
a74635ac4a Merge pull request #908 from blockstack/review/smart-contract-013019
Code Review: Smart contract VM 01/30/19
2019-02-07 08:12:34 -06:00
Aaron Blankstein
f5a019c739 unpin curve version. 2019-02-06 22:45:11 -06:00
Aaron Blankstein
78e9d6d9cf pin version on ed25519-dalek because the .1 version change was breaking... 2019-02-06 22:39:12 -06:00
Aaron Blankstein
3099555644 update src/vm files so that they will actually build 2019-02-06 17:31:26 -06:00
Aaron Blankstein
965fb71fa9 add author 2019-02-06 17:30:49 -06:00
Aaron Blankstein
6c13560f9f move to main src/ dir 2019-02-06 17:30:11 -06:00
Aaron Blankstein
1595a2ffb9 Merge branch 'develop-jude' into review/smart-contract-013019 2019-02-06 17:00:14 -06:00
Jude Nelson
9249c1fea3 de-lint; remove dead code 2019-02-05 17:55:59 -05:00
Jude Nelson
549e99c1e2 disable useless compiler warnings for this module (temporarily) 2019-02-05 17:55:44 -05:00
Jude Nelson
fd611cc5de remove util error enum -- it's no longer needed 2019-02-05 17:55:20 -05:00
Jude Nelson
ef3fa006fe de-lint 2019-02-05 17:55:13 -05:00
Jude Nelson
c9d9080371 de-lint; bugfix on argv count 2019-02-05 17:55:04 -05:00
Jude Nelson
155c99e967 most functionality here got moved to src/burnchains/burnchain.rs 2019-02-05 17:54:45 -05:00
Jude Nelson
7e2e6a2873 use a private sturct for storing parsed data 2019-02-05 17:54:34 -05:00
Jude Nelson
7542086522 de-lint 2019-02-05 17:54:25 -05:00
Jude Nelson
2e1a1ab051 use a private struct for parsed data; WIP check() implementation 2019-02-05 17:54:09 -05:00
Jude Nelson
5e9ac4e6aa use a private struct for storing parsed data 2019-02-05 17:53:57 -05:00
Jude Nelson
e30bc953e5 make BlockSnapshot a first-class struct; move consensus hash calculation to this module 2019-02-05 17:53:36 -05:00
Jude Nelson
ccf47b21ac de-lint 2019-02-05 17:53:27 -05:00
Jude Nelson
12bc934611 move code that doesn't directly call a SQL query out of this module 2019-02-05 17:53:11 -05:00
Jude Nelson
9703258032 de-lint; add Burnchain struct 2019-02-05 17:52:59 -05:00
Jude Nelson
a2104e97e5 update indexer API to de-lint 2019-02-05 17:52:47 -05:00
Jude Nelson
6e1daf31d9 de-lint; allow restarting downloading headers from where we left off 2019-02-05 17:52:32 -05:00
Jude Nelson
034c194077 de-lint; remove dead code 2019-02-05 17:52:22 -05:00
Jude Nelson
d3c84c4ffd de-lint 2019-02-05 17:52:14 -05:00
Jude Nelson
a82e2101ea de-lint 2019-02-05 17:52:07 -05:00
Jude Nelson
062f1bdf13 de-lint; fix a few bugs Aaron noticed 2019-02-05 17:51:54 -05:00
Jude Nelson
f2dc7698a1 de-lint 2019-02-05 17:51:38 -05:00
Jude Nelson
d7c8b5f37b de-lint 2019-02-05 17:51:29 -05:00
Jude Nelson
b826a32796 de-lint 2019-02-05 17:51:19 -05:00
Jude Nelson
2fbceefd85 remove the pipeline code -- it ended up not getting used 2019-02-05 17:51:03 -05:00
Jude Nelson
5a78fc96b1 move all burnchain-processing code into the overarching Burnchain struct. Removes the need for hilariously-long associated type hints 2019-02-05 17:50:19 -05:00