Commit graph

1891 commits

Author SHA1 Message Date
hashmap
80f7ae678a Implement zeroing memory for wallet password ()
Testing ergonomics, if this approach is acceptable I'll implement it for other sensitive parts.
2018-12-28 14:12:59 -08:00
Gary Yu
69800bb6ec Stratum server should continue building new block if enter into sync state during a runing mining procedure () 2018-12-28 14:12:02 -08:00
Gary Yu
c0507b2ab1 Ban a fraud peer which claims a fake height and total difficulty ()
* ban a peer with highest height but can't send us the proper headers
* reset self.stalling_ts if syncing goes well
* fix: switch to peers.ban_peer() instead of peer.set_banned()
2018-12-28 14:09:09 -08:00
Gary Yu
55334caec8 fix: peers::is_banned need check peers data from database () 2018-12-28 13:54:37 -08:00
j0hnta
4f0582a984 Fix typo () 2018-12-27 16:01:31 +08:00
tabalt
0683792591 fix grin miner package name () 2018-12-27 07:38:59 +08:00
Antioch Peverell
ea51663f9c Remember to reset sync head on first transition to header sync ()
Also cleanup reset_sync_head code
2018-12-26 13:33:01 -08:00
Gary Yu
602bb25ec9
fix: a silly mistake on the keybase recipients count () 2018-12-25 12:09:43 +08:00
Gary Yu
0364168572
fix: exit code 1 on inst_wallet failure () 2018-12-25 10:37:34 +08:00
Gary Yu
12811a2445
Keybase notice on receiving grin transaction ()
* keybase notification on transaction received

* fix: use 'keybase status' to get own username

* refactor the code

* security enhancement for multiple recipients

* change the poll interval from 5s to 1s

* log the error message of keybase api
2018-12-25 08:05:24 +08:00
Gary Yu
eebc2b208e
fix a confusing log on body sync () 2018-12-24 11:14:59 +08:00
Ignotus Peverell
2a8456a9db
Started added some minor doc on keychain 2018-12-23 18:55:31 +00:00
Gary Yu
45ca7cff79
verify message signature on wallet ()
* add verify_slate_messages for wallet receive

* log the message content

* rustfmt

* verify the sender's message signature when receive_tx in wallet listen

* verify the sender's message signature when send by keybase
2018-12-23 07:25:02 +08:00
Ignotus Peverell
7a52c0ecd5
Revert "Verify features in one place; comment on needed Features enum type ()"
This reverts commit 151aa1c842.
2018-12-22 19:42:07 +00:00
Ignotus Peverell
75a39c504f
Fix gen_gen bitcoin root setting ()
* Move prev_root setting to after set_txhashset_roots so it doesn't get overwritten.
* Remove git interactions, easier done manually.

* rustfmt
2018-12-22 11:03:48 -08:00
John Tromp
151aa1c842 Verify features in one place; comment on needed Features enum type () 2018-12-22 10:27:54 -08:00
John Tromp
976bf1dbae Fix secondary scaling bugs; add global::is_mainnet(); use it to change pre-genesis pow type () 2018-12-22 10:22:36 -08:00
Ignotus Peverell
892fbc0ac4
rustfmt 2018-12-22 18:16:53 +00:00
Ignotus Peverell
58aa566e82
Move prev_root setting to after set_txhashset_roots so it doesn't get overwritten. Remove git interactions, easier done manually. 2018-12-22 18:16:41 +00:00
Gary Yu
84d2966663 fix: early reject late submited share to avoid wrong current_block_versions or get none () 2018-12-21 11:22:14 -08:00
Gary Yu
bc7780354c
reject share for small cuckoo size () 2018-12-21 18:14:19 +08:00
Ignotus Peverell
ecf736d78a
Merge pull request from mimblewimble/floonet
* Get last bitcon block hash, setup genesis header without PoW (for now)
* More a few properties to mainnet genesis. Don't get too excited, several are placeholders.
* Mine a valid Cuckaroo solution for genesis block
* Use miner as library to get a solution for genesis. Replace final values in genesis.rs before committing it.
* Complete genesis replacement
* Fixed various replacements to obtain a compilable, well-formed genesis
* Check plugin errors, uncomment PoW validation
* Fixes to nonce handling in genesis mining
* Also produce full block hashes
* Fix genesis hash test
* Switch commitments ()
* [Floonet] Use switch commits for all blinding factors ()
* move wallet mods back into dirs
* use switched keys for blinding factor in all cases
* re-implement flag to turn off switch commit derivation
* rename tx log entry field tx_hex -> stored_tx ()
* [Floonet] add feature for height locked kernels ()
* add feature for height locked kernels
* add function to compute kernel features appropriate for lock height, and use it
* only sign kernel-features relevant fields; refactor Features
* simplify invalid kernel logic
* remove unused height arg to reward::output and run some rustfmt
* replace nested if/else by match
* Floonet chain type and genesis, testnets cleanup ()
* [Floonet] Encrypt private slate data upon storage in DB ()
* xor encrypt stored nonce and blind sum in transaction data
* stop doc tests splatting wallet files throughout
* Remove bzip2 dependency
* Changed magic number and seeds for Floonet ()
* Genesis generator now loads a local wallet seed to build coinbase.
* Floonet genesis block
* Add floonet to generated grin-server.toml comments
* Test with final Floonet genesis hashes
* Fix get_header_for_output for genesis ()
* start search with min height 0 ()
2018-12-20 18:12:08 -08:00
Antioch Peverell
bf42767210
start search with min height 0 () 2018-12-20 22:37:13 +00:00
Ignotus Peverell
cab438efcb
Fix get_header_for_output for genesis () 2018-12-20 13:52:45 -08:00
Ignotus Peverell
5faeeedf65
Test with final Floonet genesis hashes 2018-12-20 21:07:53 +00:00
Ignotus Peverell
84d4777545
Add floonet to generated grin-server.toml comments 2018-12-20 21:04:57 +00:00
Ignotus Peverell
439a3915f6
Floonet genesis block 2018-12-20 20:34:25 +00:00
Ignotus Peverell
7284cfec72
Changed magic number and seeds for Floonet ()
* Changed magic number and seeds for Floonet.
* Genesis generator now loads a local wallet seed to build coinbase.
2018-12-20 11:08:01 -08:00
Quentin Le Sceller
b0c72827d9
Merge pull request from yeastplume/bzip_dep
Remove bzip2 dependency
2018-12-20 09:43:28 -05:00
yeastplume
b5fd06c2cb Remove bzip2 dependency 2018-12-20 13:15:46 +00:00
Yeastplume
7812a9e892
[Floonet] Encrypt private slate data upon storage in DB ()
* xor encrypt stored nonce and blind sum in transaction data

* rustfmt

* stop doc tests splatting wallet files throughout
2018-12-20 13:10:36 +00:00
Blade Doyle
2ca69498de Fix duplicate nonce in message, run rustfmt () 2018-12-19 15:32:01 -08:00
Ignotus Peverell
df671a8adb
Remove bit about ASIC resistant mining algo 2018-12-19 14:42:54 -08:00
Ignotus Peverell
18feae17dc
Fix domain for my email address 2018-12-19 12:11:42 -08:00
Ignotus Peverell
a42250445d
Floonet chain type and genesis, testnets cleanup () 2018-12-18 14:03:55 -08:00
Ignotus Peverell
87d256a318
Utility to automatically generate mainnet genesis block ()
* Get last bitcon block hash, setup genesis header without PoW (for now)

* More a few properties to mainnet genesis. Don't get too excited, several are placeholders.

* Mine a valid Cuckaroo solution for genesis block

* Use miner as library to get a solution for genesis. Replace final values in genesis.rs before committing it.

* Complete genesis replacement

* Fixed various replacements to obtain a compilable, well-formed genesis

* Check plugin errors, uncomment PoW validation

* Fixes to nonce handling in genesis mining

* Also produce full block hashes

* Fix genesis hash test
2018-12-18 11:26:29 -08:00
hashmap
0d44c5405f Make tx weight safer ()
Currently it fails on fuzz tests. Also type conversion to i32 is
dangerous per se
2018-12-18 11:19:19 -08:00
John Tromp
f43df5f601 [Floonet] add feature for height locked kernels ()
* add feature for height locked kernels

* add function to compute kernel features appropriate for lock height, and use it

* only sign kernel-features relevant fields; refactor Features

* simplify invalid kernel logic

* remove unused height arg to reward::output and run some rustfmt

* replace nested if/else by match
2018-12-18 18:26:34 +00:00
Yeastplume
aa9da6838b
rename tx log entry field tx_hex -> stored_tx () 2018-12-18 16:44:03 +00:00
Yeastplume
230fe191e0
[Floonet] Use switch commits for all blinding factors ()
* move wallet mods back into dirs

* move wallet mod files

* use switched keys for blinding factor in all cases

* rustfmt

* test fix

* test fix

* test fix

* rustfmt

* re-implement flag to turn off switch commit derivation

* rustfmt
2018-12-18 15:44:55 +00:00
jaspervdm
75d2c1cc56 Switch commitments () 2018-12-18 11:51:44 +00:00
Blade Doyle
590ea33484 Enhance share rejection messages to include nonce and hash () 2018-12-18 11:12:05 +00:00
Yeastplume
fcec70d1e3
Fix for ()
* return all matching tx entries from retrieve_txs

* rustfmt
2018-12-17 10:40:48 +00:00
Gary Yu
ea1c3a9d4d
fix get_locator which loop the whole headers () 2018-12-17 07:29:49 +08:00
Ignotus Peverell
b2178f5665
Merge branch 'master' into gen_gen 2018-12-16 19:48:05 +00:00
Antioch Peverell
c188b60a38
readonly verify_coinbase_maturity ()
* move verify_coinbase_maturity into utxo_view
no longer need a write lock on txhashset

* rustfmt
2018-12-16 09:26:39 +00:00
Antioch Peverell
a50dcbfaa5
less txhashset locking ()
* less txhashset locking

* rework server stats a bit
2018-12-16 09:26:17 +00:00
Antioch Peverell
9a4895c86a
take lock once in get_header_for_output () 2018-12-15 20:44:33 +00:00
Quentin Le Sceller
d6131f2716
Merge pull request from kargakis/wallet-docs
Wallet docs markdown fixes
2018-12-15 15:13:38 -05:00
Michalis Kargakis
85074f8356
Wallet docs markdown fixes 2018-12-15 20:43:53 +01:00