Commit graph

1918 commits

Author SHA1 Message Date
Ignotus Peverell
216924c677
Fix for genesis outputs confirms count (#2271) 2019-01-02 12:11:02 -08:00
Yeastplume
d9ff8e278e Wallet recovery phrase security fixes (#2276)
* prompt for recovery phrase using linefeed crate functionality
* break out recovery parse function, remove phrase from logging
2019-01-02 12:10:07 -08:00
Gary Yu
f88ffe5fd6
more accurate stratumserver error status for block not found (#2273)
* more accurate stratumserver error status for block not found

* rustfmt
2019-01-02 22:49:06 +08:00
Yeastplume
906adb9e6d
Don't clean unconfirmed outputs > 500 blocks old (#2275)
* only clean unconfirmed coinbase

* only past 50 blocks
2019-01-02 14:27:17 +00:00
Yeastplume
f5e4782a30
remove web wallet installation for the time being (#2274) 2019-01-02 13:06:05 +00:00
Gary Yu
7e8296dce0
fix: peer connect panic on log (#2272) 2019-01-02 09:54:17 +08:00
Ahmed Kamal
daa712ae99 support floonet, separate entrypoint from cmd, add docker volume (#2265)
* support floonet, separate entrypoint from cmd, add docker volume

* Separate Dockerfile for floonet

* Spelling and docs
2019-01-01 16:00:21 -08:00
jaspervdm
e0923753fa Add @jaspervdm DNS seed (#2270) 2019-01-01 15:58:50 -08:00
Elichai Turkel
f2a29ce37a Optimizing the code and making it more idiomatic (#2269) 2019-01-01 15:29:16 -08:00
Gary Yu
23df6fa976
fix: check_banned must care about ip address only, and ignore the peer port info (#2267) 2019-01-01 11:43:05 +08:00
Ignotus Peverell
e784cf4d01
feature: Enable setting a node address for a dandelion peer (#2263)
* Configuration to set a fixed dandelion peer
* typo + styling
* more idiomatic way of picking the peer
2018-12-31 13:24:00 -08:00
Yoni
972cea5fe9 more idiomatic way of picking the peer 2018-12-31 22:48:24 +02:00
Yoni
a5e5ae83b6 typo + styling 2018-12-31 20:00:33 +02:00
Yoni
b2cc5ba7e1 Enable setting a fixed dandelion peer 2018-12-31 18:49:05 +02:00
Gary Yu
738d49d560
fix: one peer occupy multiple tcp connections (#2262)
* shutdown the tcpstream when peer connect or accept fail

* remove the unnecessary 3 times retry on peer connecting

* connect/accept are actually handshakings instead of tcpstream connect/accept
2018-12-31 19:24:30 +08:00
Gary Yu
ea7eea3f84
Skip connecting PeerWithSelf by checking ip address (#2253)
* skip the connecting to self
2018-12-31 07:15:58 +08:00
Yeastplume
9c98b798ee
Delete Unconfirmed outputs as part of wallet check_repair (#2261)
* Delete unconfirmed outputs as part of check_repair process

* rustfmt
2018-12-30 22:19:11 +00:00
Yeastplume
3eb599a45c
Grin wallet check/repair (#2256)
* first pass at basic check_fix process

* rustfmt

* unlocks and tx log entry reversals in place

* log restore output at warn

* rename check_repair

* rename check_repair

* add command line functionality and sanity test

* rustfmt

* update wallet usage doc with check_repair

* doc update

* consistency in NotEnoughFunds output

* consistency in NotEnoughFunds output
2018-12-30 16:32:00 +00:00
Gary Yu
dbf8e97b3f
fix 2 minor build warning (#2260) 2018-12-30 20:03:36 +08:00
Gary Yu
5e86cc8bb2
commit the modified Cargo.lock for grin_secp256k1zkp (#2259) 2018-12-30 13:49:14 +08:00
tabalt
0f8e6bd890 fix grin wallet flag -r (#2252) 2018-12-29 09:27:27 -08:00
hashmap
c332c2c7e9 Improve block difficulty logging (#2254) 2018-12-29 09:23:06 -08:00
Ignotus Peverell
9bf2c7fb5e
Test cleanup 2018-12-29 02:00:44 +00:00
Gary Yu
c639e85be5 Add one more dns seed (#2250) 2018-12-28 16:41:14 -08:00
Ignotus Peverell
203eba16de
Minor update to libsecp version 2018-12-28 23:17:02 +00:00
Ignotus Peverell
2c2252fc9d
Minor update to libsecp version 2018-12-28 23:06:10 +00:00
Ignotus Peverell
9234e3c251
Re-launch floonet (#2249)
*  Fix secondary scaling bugs;  rename is_testnet -> is_floonet (#2215)
* add global::is_mainnet()
* use it to change pre-genesis pow type
* rename is_testnet -> is_floonet
* Support multiple chain configurations (#2217)
* Support multiple chain configurations
Supports generating the proper configuration for each chain type
(mainnet, floonet, usernet). Will run them by default under
their respective root directory (~/.grin/main, ~/.grin/floo, etc).
Assigned default ports for mainnet, overriding them to keep Floonet
ports unchanged.
For now, starting on mainnet will abort.
* Fixed usernet command line help message. Fixes #2217
* Differing magic numbers for each chain type (#2208)
* stick to e=H(R|P|m) when use schnorr signature (#2200)
* stick to e=H(R|P|m) when use schnorr signature
* (1)add verify_slate_messages for wallet receive (2)log the message content
* remove debug log on verify_slate_messages
* verify the sender's message signature when receive_tx in wallet listen
* Revert "remove debug log on verify_slate_messages"

This reverts commit 65ea32a407.

* Revert "rustfmt"

This reverts commit c380ab9185.

* Revert "(1)add verify_slate_messages for wallet receive (2)log the message content"

This reverts commit 9584ca7a89.

* [re-floonet] Keychain Floonet BIP32 version/network option (#2235)

* add 'is_floonet' property to keychain
* fix hex encoding and tests

* Fix couple floonet loose ends (#2230)

* Fix couple floonet loose ends. Fixes #2216
* Doc fix for sig message

* Refuse unkown kernel features (#2244)

* Minor: magic number change for re-floonet

* Set pre genesis is_secondary to true (#2247)

* Minor: tx validation error display underlying

* New floonet genesis

* genesis rustfmt

* Use chain-specific config for wallet toml gen

* Fix default wallet_listener_url

* New more reasonable genesis block, bumped version

* genesis rustfmt

* Couple minor fixes to genesis generation script
2018-12-28 14:46:21 -08:00
hashmap
80f7ae678a Implement zeroing memory for wallet password (#2229)
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 (#2239) 2018-12-28 14:12:02 -08:00
Gary Yu
c0507b2ab1 Ban a fraud peer which claims a fake height and total difficulty (#2237)
* 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 (#2243) 2018-12-28 13:54:37 -08:00
j0hnta
4f0582a984 Fix typo (#2238) 2018-12-27 16:01:31 +08:00
tabalt
0683792591 fix grin miner package name (#2234) 2018-12-27 07:38:59 +08:00
Antioch Peverell
ea51663f9c Remember to reset sync head on first transition to header sync (#2222)
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 (#2226) 2018-12-25 12:09:43 +08:00
Gary Yu
0364168572
fix: exit code 1 on inst_wallet failure (#2225) 2018-12-25 10:37:34 +08:00
Gary Yu
12811a2445
Keybase notice on receiving grin transaction (#2211)
* 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 (#2219) 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 (#2203)
* 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 (#2191)"
This reverts commit 151aa1c842.
2018-12-22 19:42:07 +00:00
Ignotus Peverell
75a39c504f
Fix gen_gen bitcoin root setting (#2206)
* 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 (#2191) 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 (#2205) 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 (#2199) 2018-12-21 11:22:14 -08:00
Gary Yu
bc7780354c
reject share for small cuckoo size (#2197) 2018-12-21 18:14:19 +08:00
Ignotus Peverell
ecf736d78a
Merge pull request #2196 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 (#2157)
* [Floonet] Use switch commits for all blinding factors (#2178)
* 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 (#2181)
* [Floonet] add feature for height locked kernels (#2168)
* 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 (#2182)
* [Floonet] Encrypt private slate data upon storage in DB (#2189)
* 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 (#2188)
* 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 (#2192)
* start search with min height 0 (#2195)
2018-12-20 18:12:08 -08:00
Antioch Peverell
bf42767210
start search with min height 0 (#2195) 2018-12-20 22:37:13 +00:00