Commit graph

1849 commits

Author SHA1 Message Date
Gary Yu
5e86cc8bb2
commit the modified Cargo.lock for grin_secp256k1zkp () 2018-12-30 13:49:14 +08:00
tabalt
0f8e6bd890 fix grin wallet flag -r () 2018-12-29 09:27:27 -08:00
hashmap
c332c2c7e9 Improve block difficulty logging () 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 () 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 ()
*  Fix secondary scaling bugs;  rename is_testnet -> is_floonet ()
* add global::is_mainnet()
* use it to change pre-genesis pow type
* rename is_testnet -> is_floonet
* Support multiple chain configurations ()
* 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 
* Differing magic numbers for each chain type ()
* stick to e=H(R|P|m) when use schnorr signature ()
* 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 ()

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

* Fix couple floonet loose ends ()

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

* Refuse unkown kernel features ()

* Minor: magic number change for re-floonet

* Set pre genesis is_secondary to true ()

* 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 ()
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