Auto merge of #979 - nathan-at-least:nathan.cleanup-nonofficial-tags, r=ebfull
A script to remove "unofficial" tags from a remote, such as github.
Officialness is determined by a regular expression. ;-)
This is handy because we often want upstream Bitcoin tags for local
diffs, but sometimes we accidentally upload them to github which then
claims they are our releases, which is confusing and misleading.
Flush to disk more consistently by accounting memory usage of serials/anchors in cache.
Closes #626.
It's important that this at least *approximates* the memory usage, so that we flush the cache to disk as expected. It's okay that we overestimate. The serials are stored in keys in the `boost::unordered_map`, so we can simply use that map's `DynamicMemoryUsage`. The anchors are another story.
Auto merge of #1049 - str4d:equihash-faster-sort-comparison, r=bitcartel
Only compare the first n/(k+1) bits when sorting
We only need to sort based on the bits we are colliding. In earlier solver rounds, this speeds up the comparison considerably (calling `memcmp()` on 3 bytes instead of 12 in the first round for the current parameters).
zkbot [Wed, 29 Jun 2016 19:15:23 +0000 (19:15 +0000)]
Auto merge of #1060 - str4d:1033-randomise-nonce, r=ebfull
Randomise the nonce in the block header
The top and bottom 16 bits of the nonce are left clear for local use as thread
flags and counters. This does not leak any more local information about the
miner than is currently exposed.
The cleared bits should not be considered a consensus rule, as miners are free
to set all bits of the nonce however they wish.
Jack Grigg [Mon, 27 Jun 2016 23:26:19 +0000 (11:26 +1200)]
Randomise the nonce in the block header
The top and bottom 16 bits of the nonce are left clear for local use as thread
flags and counters. This does not leak any more local information about the
miner than is currently exposed.
The cleared bits should not be considered a consensus rule, as miners are free
to set all bits of the nonce however they wish.
zkbot [Thu, 16 Jun 2016 18:52:30 +0000 (18:52 +0000)]
Auto merge of #1026 - ebfull:address-serialization, r=ebfull
Zcash address encoding
We need to encode Zcash addresses so they aren't as large and unweildy. We're using Base58Check just like upstream does, and to ensure the first character is "z" in our addresses we must use two bytes for the version string. Two bytes gives us an extra character for free, so this PR targets the beginning of addresses to have "zc".
zkbot [Wed, 15 Jun 2016 21:39:32 +0000 (21:39 +0000)]
Auto merge of #994 - ebfull:remove-redundant-constraints, r=ebfull
Final changes to the circuit
* Remove [redundant](https://github.com/scipr-lab/libsnark/issues/37) bitness constraints that I pointed out in #908.
* The depth is increased from 20 to 29. I chose 29 because the QAP degree ends up being a power of two, which is probably going to be useful for the FFT in our MPC. (Closes #16)
If we're happy with depth 29 (over 268 million possible joinsplits), this will probably be the final change to the constraint system before 1.0.
zkbot [Wed, 15 Jun 2016 03:06:23 +0000 (03:06 +0000)]
Auto merge of #1017 - ebfull:coinbase-must-be-protected, r=ebfull
Enforce that coinbases must be protected
This PR forces miners to place their funds in the private value transfer system, making "transparent coins" opt-in for users, and increasing privacy for all participants on a systemic level.
Jack Grigg [Wed, 8 Jun 2016 05:08:18 +0000 (17:08 +1200)]
Increase Equihash parameters to n = 96, k = 3 (about 430 MiB)
Includes a tweak to set the fixed-width of the rows based on whether the first
or last round is widest. This is necessary for some parameters, these ones
included.
zkbot [Thu, 9 Jun 2016 22:43:09 +0000 (22:43 +0000)]
Auto merge of #988 - str4d:optimised-equihash, r=ebfull
Use depth-first scan for eliminating partial solutions instead of breadth-first
This reduces the peak number of lists in-memory from 2^k to k, and enables the
solver to eliminate most duplicates before it has instantiated the full set of
leaves.
Jack Grigg [Tue, 7 Jun 2016 04:06:25 +0000 (16:06 +1200)]
Add a 256-bit reserved field to the block header
This field has no defined semantics. While it was added as a result of
discussions about merged mining in #724, this field will not necessarily ever be
used for that purpose.