Commit graph

1947 commits

Author SHA1 Message Date
Ignotus Peverell
8a76b374ff
Mainnet enablement (#2379)
1. Remove the exit guarding running a node in mainnet mode.
2. Set initial difficulty in genesis.
2019-01-14 14:30:36 -08: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
Ignotus Peverell
6bb611a2f0
Fix spurious change added by git merge 2019-01-14 20:19:17 +00:00
Ignotus Peverell
224a26faed
Mainnet enablement
1. Remove the exit guarding running a node in mainnet mode.
2. Set initial difficulty in genesis.
2019-01-14 20:07:10 +00:00
Ignotus Peverell
49612543d4
Merge remote-tracking branch 'upstream/master' 2019-01-14 19:54:44 +00:00
Gavin McDermott
34bd35e8fc fix: foreign_api handles pre-flight OPTIONS call on POST requests (#2365) 2019-01-14 11:53:09 -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
d7be94fafb
More range proof tests (#2373)
Trying to cheat with range proofs to make sure it still fails at
the block level. Defense in depth, belt and suspenders and all that
good stuff.

* rustfmt

* Revert bad carry-over
2019-01-14 10:15:42 -08:00
Ignotus Peverell
ba994248ac
Prevent reward overflow (#2372)
* Prevent reward overflow

Without this, a miner could cause a crash by including a kernel
with an insane fee directly in the block.

* Plus and minus, not so similar

* Can't be trusted with more code today
2019-01-14 09:37:34 -08:00
Yeastplume
5d257283bd
Only create 1 received tx log entry on restore (#2378)
* restore only creates 1 received tx

* restore child index sanity output
2019-01-14 16:49:34 +00:00
Yeastplume
9a497f1439
Wallet Performance enhancements - cache commit + transaction fetching logic (#2375)
* add optional cached commit to output data, to speed up queries

* rustfmt

* clean up transaction retrieval logic

* rustfmt

* small logic error

* rename cache method

* rustfmt
2019-01-14 15:43:10 +00:00
Antioch Peverell
5c6abd5e22
1440 confs (#2376) 2019-01-14 13:29:12 +00:00
Ignotus Peverell
bfd0613275
Plus and minus, not so similar 2019-01-14 06:30:52 +00:00
Yeastplume
5fcf93deae
Cancel tx should set output status to Unspent (#2368)
* cancelling transaction should reset output status to Unspent

* rustfmt
2019-01-13 22:24:01 +00:00
Ignotus Peverell
e3a1c2c6b1
Fix/serializing hash (#2355)
* Remvoe 3 dots from hash formatting
* Move 3 dots to the TUI
* Add backwards check
* Add triple dot to check_and_remove_files + typo
2019-01-12 13:07:03 -08:00
Yoni
b39ce8d328 typo 2019-01-12 21:24:31 +02:00
Yoni
51ad711063 Add triple dot to check_and_remove_files + typo 2019-01-12 21:11:03 +02:00
John Tromp
762da8c491 Fix bug that crashes network with probability 2^-64 (#2358) 2019-01-12 10:41:22 -08:00
Yeastplume
e93b380a06
Recover outputs from multiple wallets using same seed (#2348)
* adding optional mmr index to key ids

* rustfmt

* update index

* add mmr index to output display

* change restore to match on commit instead of ID, add extensive restore/check tests for multiple wallets using same seed

* rustfmt

* ensure check restores unknown accounts as well

* rustfmt

* remove storage of commit from wallet
2019-01-12 18:39:29 +00:00
Yoni
c70f5caf03 Add backwards check 2019-01-12 20:17:46 +02:00
Ignotus Peverell
f9a20aef0d
Track blocks we requested, always broadcast otherwise (#2349) 2019-01-12 09:28:03 -08:00
Yoni
383d35950e Move 3 dots to the TUI 2019-01-12 17:22:35 +02:00
Yoni
2873d14a98 Remvoe 3 dots from hash formatting 2019-01-12 17:19:30 +02:00
Harm Aarts
cf8f9d609a Load config file from CLI flag (#2333)
Fixes #2317 in the least intrusive way. I believe that given a slightly more
rigorous refactor could improve the readability quite a bit. Will suggest a
follow up PR.
2019-01-11 15:54:24 -08:00
ProxyM8
6ea95cd764 Add Japanese white paper link and fix errors (#2341) 2019-01-11 15:52:56 -08:00
Oliver Simon
c452dd06f3 Add: German translation of intro.md (#2338)
* Add: German translation of intro.md
* Update intro_DE.md
2019-01-11 15:52:25 -08:00
Ignotus Peverell
5efcdbc077
Refuse duplicate peer IPs (#2347)
* Refuse duplicate peer IPs
* Explicitly mentioning NAT in code comment
* Well of course that would mess with tests. Only trigger using IP test when on the wild internet (~DNS seeding).
2019-01-11 15:51:38 -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
1a6b46b09d
Ban peers that can't complete a handshake (#2320)
* Break out of main peer loop on error
* Force client conn shutdown on error
* Fix borrow error
* Ban peers that fail handshake
* Fix add_peer for ban, remove useless disconnect
2019-01-11 10:00:32 -08:00
Ignotus Peverell
60d3ee3c44
Bump version to 0.5.2 for release 2019-01-11 01:26:30 +00:00
hashmap
5cf4d7acfe Use ZeroingString for password and passpharse in wallet (#2285) 2019-01-10 15:58:37 -08: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
Ignotus Peverell
27b4e2145a
Replace default fmt::Display on core::Hash (#2325)
* Print block hash in TUI partially
* Implement fmt::Display for core::Hash
* Show first 12 digits of Hash
* Show full hex string of hash in fmt::Debug for core::Hash
* Strip hash in fmt::Debug and use fmt::Debug for fmt::Display
2019-01-10 12:13:23 -08:00
Isaac Cook
4eeedb0877 Fix doc dump_stored_tx -> retrieve_stored_tx (#2329)
It appears the method call in https://github.com/mimblewimble/grin/blob/master/wallet/src/controller.rs got renamed for consistency and this got missed.
2019-01-10 09:09:56 -05: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
Eugene P
94974ec19a Strip hash in fmt::Debug and use fmt::Debug for fmt::Display 2019-01-10 13:01:45 +03:00
Eugene P
bc7b701de3 Show full hex string of hash in fmt::Debug for core::Hash 2019-01-10 12:55:10 +03:00
Eugene P
faff529260 Show first 12 digits of Hash 2019-01-10 12:39:47 +03:00
Eugene P
b4e4992a5c rustfmt 2019-01-10 12:30:21 +03:00
Eugene P
29fc3e61de Implement fmt::Display for core::Hash 2019-01-10 12:30:10 +03:00
Eugene P
282a5ce980 rustfmt 2019-01-10 06:28:28 +03:00
Eugene P
f5ae49f071 Print block hash in TUI partially 2019-01-10 06:28:15 +03:00
Ignotus Peverell
f86c90ade5
rustfmt 2019-01-10 01:23:02 +00:00
Ignotus Peverell
6a244e904a
Fix add_peer for ban, remove useless disconnect 2019-01-10 01:22:48 +00:00
Ignotus Peverell
cf088f6f51
Ban peers that fail handshake 2019-01-09 20:31:09 +00:00
Ignotus Peverell
26d250bbea
Fix borrow error 2019-01-09 20:24:57 +00:00
Ignotus Peverell
7a44ee9aa0
Force client conn shutdown on error 2019-01-09 19:24:59 +00:00