Commit graph

295 commits

Author SHA1 Message Date
Ignotus Peverell
0510ba9345
Fix default DNS seed port 2019-01-15 15:46:11 +00:00
Ignotus Peverell
c5cc4f29ac
Yeastseed (#2382)
To keep it all yeasty

* The yeastiest seed

* Dammit git

* Dammit git
2019-01-14 13:31:46 -08:00
Gary Yu
c7bb5eab27 fix: avoid duplicate connection (#2361)
* fix: avoid duplicate connection
* ignore the duplicate connecting to same peer within 10 seconds
* refactor: use hashmap instead of vector for connecting history
* remove the double checking for already connected peer on connect
* add previous connecting time to the log
* fix a mistake on shrink
* move the now() into the inter loop for accurate time
* change the minimum allowed inverval time from 10s to 30s
2019-01-14 11:44:35 -08:00
Ignotus Peverell
f9a20aef0d
Track blocks we requested, always broadcast otherwise (#2349) 2019-01-12 09:28:03 -08:00
Quentin Le Sceller
424bb28c7d Reduce miner thread sleep to 1 microsecond (#2342) 2019-01-11 15:50:58 -08:00
Gary Yu
7698b28e16
fix: wait_for_min_peers shouldn't wait forever when all peers are in same work (#2340) 2019-01-12 07:38:27 +08:00
Ignotus Peverell
60d3ee3c44
Bump version to 0.5.2 for release 2019-01-11 01:26:30 +00:00
Simon B
950fa0e496 Cleanup compiler warnings (#2323)
* cleanup compiler warnings
* allow(dead_code) in tests/{framework,simulnet}
2019-01-10 12:18:25 -08:00
Gary Yu
ea4407a919
wait_for_min_peers should continue waiting if none connected (#2326)
* wait_for_min_peers should continue waiting if none connected

* allow no peers to go in non-production mode, such as travis-ci test
2019-01-10 21:08:51 +08:00
Yeastplume
cd9a539288
Add 'recover' option to grin wallet init (#2330)
* Only update outputs with unconfirmed transactions outstanding

* add further check for Unspent output that have been spent to check_repair

* rename  to

* make updating all outputs optional API parameter. do full update before a wallet check, remove unspent->spent check from check process

* rustfmt

* typo

* add recover from phrase option to init

* rustfmt

* don't panic if recover is cancelled, grin-wallet.toml is created but wallet_data dir doesn't yet exits

* rustfmt
2019-01-10 12:06:12 +00:00
Yeastplume
4191b15410
Wallet - only update outputs with unconfirmed transactions outstanding (#2322)
* Only update outputs with unconfirmed transactions outstanding

* add further check for Unspent output that have been spent to check_repair

* rename  to

* make updating all outputs optional API parameter. do full update before a wallet check, remove unspent->spent check from check process

* rustfmt

* typo
2019-01-10 11:17:35 +00:00
Hendrik Richter
c388af6603 add one more DNS seed (#2283) 2019-01-08 08:12:56 +08:00
Gary Yu
c5efb715a5 add https as optional for server api (#2310)
* add tls as optional config for server api
* add error log if start_rest_apis fail
2019-01-07 11:42:11 -08:00
Ignotus Peverell
2c5ba853f7
Version bump to 0.5.1 2019-01-07 19:41:07 +00:00
Ducem Barr
a3431fb147 feat: Configuration option to include foreign API endpoints in the owner API (#2305)
* Allow foreign API over owner API port

* Tests for owner_api_include_foreign config option
2019-01-07 10:00:52 +00:00
Gary Yu
657392b592
minor improvement on stratum server log for miner status (#2301)
* add a log to show the stratum worker status

* add miner starting time (height)

* rustfmt
2019-01-07 07:19:25 +08:00
Quentin Le Sceller
21deed3ba3 Add Quentin Le Sceller DNS Seed (#2302) 2019-01-06 12:05:57 -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
jaspervdm
e0923753fa Add @jaspervdm DNS seed (#2270) 2019-01-01 15:58:50 -08: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
dbf8e97b3f
fix 2 minor build warning (#2260) 2018-12-30 20:03:36 +08:00
hashmap
c332c2c7e9 Improve block difficulty logging (#2254) 2018-12-29 09:23:06 -08:00
Gary Yu
c639e85be5 Add one more dns seed (#2250) 2018-12-28 16:41:14 -08: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
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
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
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
Ignotus Peverell
7284cfec72
Changed magic number and seeds for Floonet (#2188)
* 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
Blade Doyle
2ca69498de Fix duplicate nonce in message, run rustfmt (#2187) 2018-12-19 15:32:01 -08:00
Ignotus Peverell
a42250445d
Floonet chain type and genesis, testnets cleanup (#2182) 2018-12-18 14:03:55 -08:00
John Tromp
f43df5f601 [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
2018-12-18 18:26:34 +00:00
Yeastplume
230fe191e0
[Floonet] Use switch commits for all blinding factors (#2178)
* 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 (#2157) 2018-12-18 11:51:44 +00:00
Blade Doyle
590ea33484 Enhance share rejection messages to include nonce and hash (#2173) 2018-12-18 11:12:05 +00:00
Gary Yu
ea1c3a9d4d
fix get_locator which loop the whole headers (#2159) 2018-12-17 07:29:49 +08:00
Antioch Peverell
a50dcbfaa5
less txhashset locking (#2163)
* less txhashset locking

* rework server stats a bit
2018-12-16 09:26:17 +00:00
Gary Yu
197d4f9575
TUI mining server status: add blocks found statistics (#2151)
* TUI mining server status: add solutions found statistics

* rustfmt

* modify 'solutions found' as 'blocks found'
2018-12-15 10:10:33 +08:00
Antioch Peverell
675edb4a19 TUI Mining Screen (block hash and block height) (#2142)
* add block hash to tui mining diff screen
include current header in there also

* rework the mining screen on the tui
show block hash as well as block height
fix the "off by one" error
2018-12-12 11:41:42 -08:00
Antioch Peverell
16641fe149
Cleanup compact block logging (#2126)
* cleanup logging, error logging around compact blocks

* rustfmt
2018-12-11 14:11:58 +00:00
Antioch Peverell
2d4538c428
Clean shutdown via stop_state (#2117)
* clean shutdown wip

* rustfmt

* introduce StopState that we can lock on

* rustfmt

* take lock on stop_state during critical processing (process_block_single etc.)

* rustfmt

* take lock on stop_state during chain::init()

* cleanup

* cleanup

* rustfmt

* docs/comments

* fixup servers tests

* cleanup p2p tests
2018-12-11 11:07:41 +00:00
Ignotus Peverell
e24e087fd1
Clean servers crate dev dependency on config (#2099) 2018-12-10 11:21:35 -08:00
David Burkett
62d644e1f4 Only MAX_BLOCK_HEADERS - 1 (511) headers sent during sync, instead of MAX_BLOCK_HEADERS (512) (#2116) 2018-12-10 10:35:07 -08:00
Ignotus Peverell
d179559005
One more use fell through the cracks in merge 2018-12-10 18:32:56 +00:00
Ignotus Peverell
a7712bf911
Merged upstream 2018-12-10 03:40:09 +00:00
hashmap
aedac483f5
Convert to Rust 2018 edition (#2084)
* Convert to Rust 2018 edition

* Update gitignore
2018-12-08 00:59:40 +01:00
Ignotus Peverell
71664457de
Clean servers crate dev dependency on config 2018-12-07 22:43:37 +00:00
Ignotus Peverell
87bfd9aaa4
Mark all crates as publishable 2018-12-07 00:08:15 +00:00