Commit graph

238 commits

Author SHA1 Message Date
Yeastplume
15c7a270eb
Windows Compatibility Fixes #1 (#2535)
* initial changes for windows build and unit/integration tests

* rustfmt

* wallet+store tests

* rustfmt

* fix linux daemonize

* better encapsulate file rename

* rustfmt

* remove daemonize commands

* rustfmt

* remove server start/stop commands

* add ability to drop pmmr backend files explicitly for txhashset unzip

* rustfmt

* fix pmmr tests

* rustfmt
2019-02-09 21:14:27 +00:00
Ignotus Peverell
d8605a4d51
Generate API secret in wallet --here mode (#2547) 2019-02-09 11:03:15 -08:00
Max Lavrenov
c79bbd4efa fix wallet --data-dir flag 2019-02-02 21:51:10 +01:00
Antioch Peverell
19ce9cc28e
bump for v1.0.1 (#2511) 2019-02-01 14:43:18 +00:00
Antioch Peverell
a82e2a0126
Rework "bucket transactions" logic (buckets are now weight limited) (#2487)
* rework bucket txs

* introduce max_block_weight to global (based on chain_type)
not yet in use anywhere...

* now using global::max_block_weight() everywhere

* testing max_block_weight needs to be big enough to cover existing chain tests...

* add some test coverage for prepare mineable transactions at the block weight limit
introduce AsLimitedTx{max_weight} so we can build artifically small blocks (per mining config)

* cleanup

* default_mineable_max_weight is just the default max_block_weight
we do not need to account for coinbase reward here (tx vs block)

* 75 change outputs in a test is not valid now that we have a low block weight limit...
2019-02-01 10:44:04 +00:00
Yeastplume
0c851c5140
Save slate participant messages in database (#2441)
* Save and display optional slate messages

* rustfmt

* fixes and test updates

* rustfmt

* output json

* rustfmt

* add better serialisation of slate message, rename to secp_ser, add tests for serialization functions

* rustfmt

* max length for message enforced by API

* rustfmt
2019-01-31 11:55:34 +00:00
Simon B
dd1a24dcbc Compiler warnings 20190123 (#2462)
* cleanup compiler warnings: unused imports

* rustfmt

* more compiler warnings
2019-01-25 10:09:32 +00:00
Can Selcik
b22e5752be Use Option::unwrap_or instead of is_some followed by unwrap in start_server_tui (#2432) 2019-01-20 09:45:16 +00:00
Antioch Peverell
ef5d83817e
Maintain min outbound peers (min_preferred_peers / 2) (#2417)
* outbound connection count

* rustfmt

* display outbound peer count

* rustfmt

* wip - allow connections to exceed max when trying to create new outcound connections
any in excess of total max will be cleaned up subsequently

* fix

* we care about connected outbound peer count when deciding to connect to new peers
2019-01-19 16:13:09 +00:00
eupn
85fcfd8b64 [TUI] Properly handle Esc in Peers and Mining, add Esc to the legend (#2371) 2019-01-16 10:49:04 -08:00
Ignotus Peverell
e7485ab5f1
Version bump to 1.0.0 2019-01-15 16:24:29 +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
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
Yoni
383d35950e Move 3 dots to the TUI 2019-01-12 17:22:35 +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
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
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
Yeastplume
5915580ab3
Automate wallet seed recovery process (#2319) 2019-01-09 16:13:05 +00: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
939f42ea56
a bit refactoring on wallet controller for issue_send_tx (#2280)
* a bit refactoring on wallet controller for issue_send_tx
2019-01-03 19:01:31 +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
Yeastplume
f5e4782a30
remove web wallet installation for the time being (#2274) 2019-01-02 13:06:05 +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
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
0364168572
fix: exit code 1 on inst_wallet failure (#2225) 2018-12-25 10:37:34 +08: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
Yeastplume
8e678058f1
[WIP] Store completed transactions in files instead of DB (#2148)
Store completed transactions in files instead of DB
2018-12-14 16:24:53 +00:00
Gary Yu
32a7c309e7
TUI basis status text align (#2150)
* tui basic status text align

* rustfmt
2018-12-14 22:38:05 +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
Yeastplume
901c665ba7
Wallet tests, bug fixes (#2138)
* More tests for smallest selection, resulting bug fixes, remove unneeded TXLogEntryTypes

* rustfmt
2018-12-12 13:38:29 +00:00
Yeastplume
fb11dd3f4e
Don't allow same transaction to be received multiple times (#2124)
* don't allow same transaction to be received multiple times

* issues in other tests uncovered and fixed

* allow tx_hex update function to operate without an account being specified, to allow finalize_tx function to work without an account being specified

* rustfmt

* fix to retrieve_txs

* rustfmt
2018-12-11 17:18:31 +00:00
Quentin Le Sceller
ec9cdf0ecd Remove temporary BIP32 note (#2115)
* Remove temporary BIP32 note

* Rustfmt
2018-12-11 10:41:54 +00:00
Yeastplume
b7fe4d6621
Wallet command line tests (#2114)
* tests in place for wallet command line

* tests in place for wallet command line
2018-12-10 14:54:56 +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
Yeastplume
68896b2a76
Wallet test framework (#2098)
* remove circular dependency

* rustfmt

* move wallet test framework
2018-12-07 17:18:33 +00:00
Yeastplume
d1b484259b
Wallet command line automated testing (#2097)
* wallet test infrastructure

* rustfmt

* successful wallet create

* rustfmt

* start of command line tests

* rustfmt
2018-12-07 15:06:28 +00:00
Yeastplume
7ff323c882
Fix keybase wallet listener call (#2091)
* fix keybase adapter call

* rustfmt
2018-12-06 17:51:53 +00:00
Yeastplume
40ccb32be2
Externalise Grin command line definition to .yaml file (#2089)
* move command line definition to .yaml file

* rustfmt
2018-12-06 15:25:05 +00:00
Yeastplume
b8c8840cec
Refactor wallet commands (#2067)
* start wallet command refactoring

* another re-structuring attempt

* rustfmt

* begin splitting up wallet commands

* rustfmt

* clean up wallet arg checking

* rustfmt

* macro for arg parsing

* rustfmt

* factor out init commands

* rustfmt

* move recover to new format

* rustfmt

* add listen command to new format

* rustfmt

* Finish moving commands to new format

* rustfmt

* rustfmt

* propogate errors more cleanly

* rustfmt

* error handling cleanup
2018-12-06 12:04:02 +00:00
Mike Dallas
f9261310ab Keybase wallet plugin (#2052)
* add keybase wallet plugin

* rustfmt

* cleanup

* rustfmt

* handle null case

* Use two seperate topics for the two parts of the round trip

* rustfmt

* send slate to wallet directly (no need to run http listener anymore)

* rustfmt

* skip some unnecessary api calls

* update docs
2018-12-05 18:37:11 +00:00
Yeastplume
16aa64bfab
Optional Slate Message (#2047)
* add optional signed message to slate

* rustfmt
2018-11-29 12:49:00 +00:00
Ignotus Peverell
28e0d97e64
Cuckatoo size shift upgrade schedule (#2024)
* Cuckatoo size shift upgrade schedule
* Move the schedule into graph_weight instead of messing with min edge bits
* Cleanup and fixes now that we have an agreed upon schedule
2018-11-28 14:05:55 -08:00
Yeastplume
fdb0197ef9
Cleanup of wallet owner API, rustdoc documentation (#2036)
* doc start

* rustfmt

* tightening up wallet owner API

* rustfmt

* remove burn tx functions

* more tx api documentation

* rustfmt
2018-11-28 15:31:23 +00:00
Yeastplume
b95caecc27
Fixes to grin wallet repost, cancel tx (#2029)
* fixes to wallet cancel, repost, ensure stored transaction is updated with final signatures

* rustfmt

* add tests for reposting

* fixes to tests

* repost
2018-11-27 13:36:49 +00:00
Yeastplume
34520a46d9
fix self send command (#2022) 2018-11-26 12:35:14 +00:00
Yeastplume
b2c177d16a
Saner error output on multiple attempts to init wallet (#2021)
* less scary error message on duplicate wallet commit

* rustfmt
2018-11-26 12:02:18 +00:00
Jake Craige
9db36f7ba3 Improve serve command error message (#2017)
Update the command matcher for the server command to log a more helpful
message when it's called without a subcommand.

Before:
```sh
$ target/debug/grin server
:: Some(ArgMatches { args: {}, subcommand: None, usage: Some("USAGE:\n    grin server [OPTIONS] [SUBCOMMAND]") })
```

After:
```sh
$ target/debug/grin server
Subcommand required, use 'grin help server' for details
```
2018-11-25 15:47:47 -08:00