Commit Graph

30141 Commits

Author SHA1 Message Date
Duke Leto
98e9ed80d7 Merge branch 'danger' of github.com:MyHush/hush3 into danger 2020-09-13 13:28:46 -04:00
Duke Leto
b22a73fc29 Run-time randomly generated Sietch zdust addresses
This commit drastically improves the privacy of the HUSH anonymity set
under attacks which ingest wallet.dat's which have been obtained by
seizure, i.e. stealing someones HUSH wallet.dat and putting it into
chain analysis software. Ciphertrace is known to do this to ZEC and XMR
and we can assume all chain analysis companies are implementing new
ways to de-anonymize privacy coins with any data they can obtain.

Instead of randomly sending to a randomly chosen static address,
hushd Sietch zdust addresses are now randomly generated at run-time. These
addresses are not stored in wallet.dat in any way and their private keys
are not known except by the internal memory of hushd for a few milliseconds.
This data is not stored in long-lived data structures of hushd, only as long
as the RPC z_getnewaddress is running or the equivalent function for internals
code paths. The seeds or private keys of these addresses are never stored on disk.

This now brings hushd on par with SDL, which already does this via a
different but equivalent seed phrase technique.

With this technique, if a HUSH wallet.dat is seized, it's impossible to tell
if any of the shielded outputs are random Sietch zdust with random data payload
or a one-time-use zaddr with encrypted payload.
2020-09-13 12:35:41 -04:00
Duke Leto
4f70252524 Increase max --sietch-min-zouts to 50 2020-09-13 11:24:47 -04:00
Duke Leto
85a40ae2ed Tweak copyright 2020-09-13 11:23:55 -04:00
DenioD
702ea5fe91 delete joinsplit from rawtransactions #127 2020-09-12 15:11:52 +02:00
DenioD
2075d0da25 Port scheduler race condition fix from BTC upstream #133, 12519bf62b 2020-09-12 10:01:33 +02:00
DenioD
5d86afef6a Port -txsend from str4d #37, https://github.com/zcash/zcash/pull/4522 2020-09-12 09:12:40 +02:00
Duke Leto
a45ee31765 Add a static makefile for now 2020-09-11 10:30:56 -04:00
Duke Leto
7ae5a565d5 Add a bunch of things required by bip39 dependencies 2020-09-11 10:30:01 -04:00
Duke Leto
514348c427 Add various bip39 and base32/base58 stuff 2020-09-11 10:29:00 -04:00
Duke Leto
650498ec27 bip39 updates + tweaks 2020-09-11 10:27:14 -04:00
Duke Leto
5d08cd7b57 Refactor Hush supply curve into a dedicated function and increase logspam 2020-09-11 07:23:44 -04:00
Duke Leto
032c7cbb9f Add transaction time to z_listreceivedbyaddress which drastically speeds up SD operations 2020-09-09 12:58:53 -04:00
Duke Leto
0614f51f28 Fix more docs bugs 2020-09-09 11:51:59 -04:00
Duke Leto
fc9725ca44 Fix docs 2020-09-09 11:45:23 -04:00
Duke Leto
ba4f1710a4 Merge branch 'danger' of github.com:MyHush/hush3 into danger 2020-09-09 11:43:00 -04:00
Duke Leto
5412da7d71 Connect z_listreceivedaddress to the outside world 2020-09-09 11:42:52 -04:00
Denio
7f602de255 Merge pull request #136 from MyHush/danger
Sync danger to duke
2020-09-09 14:49:14 +02:00
Jonathan "Duke" Leto
844626f457 Block 128 has a block reward of 11.25 HUSH 2020-09-08 15:06:06 -07:00
Jonathan "Duke" Leto
dd13bfb394 Yep 2020-09-08 14:38:58 -07:00
Jonathan "Duke" Leto
f4294a25cf Be more explicit 2020-09-08 14:33:52 -07:00
Duke Leto
b432e27f1b Refactor hush block subsidy 2020-09-08 16:10:32 -04:00
Duke Leto
3744f429f2 Re-enable 3rd block subsidy era 2020-09-08 15:52:09 -04:00
Duke Leto
fbc34ef071 Implement custom Hush block subsidy code since changing our blocktime and using many eras breaks assumptions of existing code 2020-09-08 15:49:10 -04:00
Duke Leto
1751f986f1 Logspam for last and max eras 2020-09-08 15:16:00 -04:00
Duke Leto
5871b3019a Mo debug regarding current era and block subsidy 2020-09-08 14:57:38 -04:00
Duke Leto
807a37e740 Behold vast logspam, refactoring and dead code removal 2020-09-08 12:47:17 -04:00
Duke Leto
fe4f0f7e9e Logspam 2020-09-08 12:01:07 -04:00
Duke Leto
67ed136e25 Only give 3 values for now to match how many values come in via CLI 2020-09-08 11:45:19 -04:00
Duke Leto
95ff64404c Specify that secret_key is a decimal not hex value 2020-09-08 11:10:43 -04:00
Duke Leto
2d90cef651 Merge branch 'danger' of github.com:MyHush/hush3 into danger 2020-09-08 09:54:20 -04:00
Duke Leto
31940f2b3a Thanks to @DenioD for reminding me we must modify -ac_end internals variable as well 2020-09-08 09:54:13 -04:00
Jonathan "Duke" Leto
d53e39aa4d Good ol' off-by-one strikes again 2020-09-08 05:47:53 -07:00
Duke Leto
b572ef0228 Calculate this value at run-time because it's not set yet when this header file is parsed 2020-09-07 18:40:51 -04:00
Duke Leto
9ae40031d6 Add -ac_halving1 + -ac_halving2 CLI args for devs
These new CLI args control the interval of the 1st halving (between
1st and 2nd halving blocks) and the 2nd halving (between 2nd and 3rd
halving blocks). -ac_halving2 is used for all subsequent halvings.

This allows devs to simulate things via the CLI without changing code,
to verify things work as expected at halvings in the far future.
2020-09-07 12:58:50 -04:00
Duke Leto
727abe0ef2 Be more precise 2020-09-07 12:36:26 -04:00
Duke Leto
d420e14472 Explicitly set the Hush block reward and halving intervals for the next two halvings (8 years) 2020-09-07 12:35:15 -04:00
Duke Leto
880cbc6b0d Mo docs for hushd 2020-09-07 08:54:12 -04:00
Duke Leto
58f7ae1336 Document hushd a bit 2020-09-07 08:51:50 -04:00
Duke Leto
043d58709d Fix off-by-one-decimal-place error discovered by @DenioD 2020-09-07 08:36:48 -04:00
Duke Leto
b9fd0ce900 Fix bugs in porting zec upstream code 2020-09-07 08:34:19 -04:00
Duke Leto
1c4a2ee13c WIP hush_supply 2020-09-07 08:33:38 -04:00
Jonathan "Duke" Leto
2bb5454020 Explicitly set BR in each halving interval
This extremely important consensus-changing code takes into account
that with our new 75s block time, which gives us twice as many blocks
per day, we must divide our block reward by two in the next
halving interval, becoming 3.125 HUSH per block insted of 6.25 HUSH
under the old rules of 150s blocks.

Subsequent halving intervals do not change block times, and so they
follow the normal pattern of halving.

This commit has a number of rough edges:
        * Final BR height is still incorrect
        * Due to above, exact number of halvings is unknown under new
          75s blocktime
2020-09-05 05:38:09 -07:00
Jonathan "Duke" Leto
0c0b2ec1cc cleanup 2020-09-05 05:36:28 -07:00
Jonathan "Duke" Leto
86ad289a42 Clean up dead code 2020-09-05 04:45:54 -07:00
Jonathan "Duke" Leto
820a48bb73 Add trezor bip39 code 2020-09-04 22:50:23 -07:00
Jonathan "Duke" Leto
b3ff90ed6f Add constant time AES routines 2020-09-04 22:29:28 -07:00
Jonathan "Duke" Leto
ad3e5db501 Update help regarding new -wallet option for relative paths 2020-09-04 19:40:29 -07:00
Jonathan "Duke" Leto
5315ded786 Support wallet.dat outside of datadir
Ported from 6a7cfdea54
which did not apply cleanly.
2020-09-04 19:31:05 -07:00
Duke Leto
e067453f49 Merge pull request #132 from jahway603/master
Added stdexcept to src/crypto/equihash.h
2020-08-24 22:18:49 -07:00