Commit graph

1207 commits

Author SHA1 Message Date
Ignotus Peverell
784c5e3442
Cleanup Grin main binary crate (#1315)
Split up each subcommand into its own file under the `cmd`
subcrate.
2018-08-03 15:39:54 -07:00
hashmap
6a1d0e3354 Fix wallet owner_api on new Hyper (#1312)
Fixes [#1308]. The main change is to switch from Core to Runtime inside the client.
I also used this as an opportunity to provide async methods for get and post, so we can
use it in places where futures are acceptable, which is not the case for the wallet.
2018-08-03 14:48:54 -07:00
Quentin Le Sceller
3df050cc93 Check content before zip/unzip the txhashset (#1174)
* Check txhashset content before zip/unzip
* Add header in txhashset verification
* Add copy function and test
* Add file util
* Now check and remove unexpected files instead of just crashing
2018-08-02 19:16:16 -07:00
Quentin Le Sceller
3ee01055ed Fixes #1299 - Fails to send transaction when not enough funds for fee (#1311) 2018-08-02 09:05:38 -07:00
Ivan Sorokin
a638bd7499 Do not request a full block for invalid compact block during syncing (#1002) 2018-08-01 16:09:03 -04:00
hashmap
06883e94e9 Remove all iron traces (#1309)
Fixes [#1307]. It seems my ripgrep ignores Cargo.lock files, had to grep manually.
2018-08-01 13:58:22 -04:00
obxium
77ce26257f Update wallet link (#1310) 2018-08-01 13:57:25 -04:00
yeastplume
7f4ea04757 wallet documentation updates 2018-08-01 11:05:10 +01:00
e-max
25e3d9e7d3 Remove Iron dependency and update hyper to version 0.12 (#1241)
* Remove Iron dependecy and update hyper to version 0.12 #876

* REMOVE ME

* Revert "REMOVE ME"

This reverts commit e9a976eee98a2d5a4dfae5d9e1e4f5ed640c05d3.

* Rebase and start updating libwallet

Libwallet doesn't compile yet.

* Wallet compiles

* Grin compiles

* No compilation errors in tests

* All tests pass

* Reeturn future from handler

* Refactoring

* Fix lifetime issue one more time

I have to force push to rollback all the work done in last 2 days

* Fix wallet send issue

* Clean up
2018-08-01 10:44:07 +01:00
Gary Yu
b040aaa434 Fix: old time crate use 0..11 as the month, make mistake when switching to chrono Utc.ymd (#1304) (#1305) 2018-07-31 09:35:57 -07:00
hashmap
84e46c2872 Fix logging configuration (#1303)
One of the last commits introduced a regression, logging function was called before log subsystem was
initialized, as result all logging configuration was not applied.
2018-07-31 11:14:13 +01:00
Yeastplume
658a686cc1
[WIP] Wallet documentation (#1302)
* doc update

* change and reorganise wallet documentation

* Redo wallet arch document, update design document with current info, move older design document into 'goals.md'

* Redo wallet arch document, update design document with current info, move older design document into 'goals.md'
2018-07-30 17:10:43 +01:00
Gary Yu
76f4915bf9 improve: time crate flagged as deprecated, switch to actively maintained chrono crate (#1297)
* improve: time crate flagged as deprecated, switch to actively maintained chrono crate

* improve: complete the switching from deprecated time crate to chrono crate, for all the tests part

* improve: complete switching to chrono crate, for the left tests in 'chain' and 'wallet'
2018-07-30 09:33:28 +01:00
Ivan Sorokin
5c029e3f87 Make grin.toml config optional (#1278)
* Make grin.toml config optional. Mirror exisiting config parameters in grin.toml to source code, so binary can run without a config file. Add test for it.
* fixup! Make grin.toml config optional
2018-07-29 17:48:24 -07:00
Gary Yu
61506a8064 clean some build warnings (#1288)
* clean some build warnings

* undo the warning suppress for aggsig
2018-07-27 15:16:14 +01:00
Yeastplume
a053790ee6
filter outputs by tx_id (#1298) 2018-07-27 09:39:01 +01:00
Yeastplume
70b97b0a06
add tx retrieval function (#1295)
Web-Wallet support updates
2018-07-24 20:49:29 +01:00
Gary Yu
724b19e648 process_block check_known() check orphans also, to avoid double-processing (#1287) 2018-07-23 21:29:31 -07:00
Gary Yu
3b6b85ec57 Fix fast sync mode failure when 'sync_state' was switched to 'HeaderSync' (#1286) 2018-07-23 10:37:35 -07:00
Ignotus Peverell
f5b03a6d5a
Fix sync hash cache (#1285)
* Refactor hash cache handling to add properly. Only add to cache if the block is definitevely accepted or rejected.
* Dedup of header processing now looks like premature optimization. Very fast anyway. Removing the header hash cache.
2018-07-22 12:43:55 -07:00
Gary Yu
75b72e48ff Fix bug on block sync (#1271) (#1281)
Do not add orphans to the "already seen" cache.
2018-07-22 12:25:56 -07:00
Quentin Le Sceller
d67556a6dd Add Stratum documentation (#1283) 2018-07-22 12:12:07 -07:00
beaver-tooth
46c666ae75 Update local network setup doc (#1276)
* Update local network setup doc
* Updated local net doc with a few clarifications
2018-07-20 23:05:54 -07:00
Quentin Le Sceller
bac6e813bb Change error 32701 to 32000 (#1282) 2018-07-20 23:03:28 -07:00
yuntai
a1bd593800 [Simple] Fix a broken link in doc/table_of_contents (#1279)
* [Simple] Fix a broken link in doc/table_of_contents
2018-07-20 12:09:47 -04:00
Yeastplume
80f82eecc1
added transaction cancellation feature (#1280) 2018-07-20 15:13:37 +01:00
Yeastplume
4a5a41fb30
LMDB Wallet Transaction Log + LMDB Migration for all (#1268)
* beginnings of transaction log for db

* add migrate utility for file-wallet to db wallet

* rustfmt + missing file

* update transaction log entry status on confirmed txs, add basic tests for transaction log
2018-07-19 10:35:36 +01:00
Antioch Peverell
a6dc48deae
add validation to tx to ensure we have no coinbase outputs or kernels in there (#1266)
* add validation to tx to ensure we have no coinbase outputs or kernels in there

* add some comments
2018-07-16 22:46:36 +01:00
Ignotus Peverell
3d89e86906
Various improvements and cleanup in chain crate (#1265)
* Remove now unnecessary txhashset write lock
* Ring buffer of hashes the chain has already processed
* Specifically report too old blocks as peer should be banned
* Move sync check for block relay, clean TODO
* No use processing transactions when syncing
* Ignore blocks older than horizon in pruning nodes
2018-07-16 21:58:56 +01:00
Conor Scott
bff0c6b6c6 Update necessary rust version in build doc (#1258)
* Update necessary rust version in build doc
* Add 'rustup update' as option in build docs
2018-07-16 02:01:21 +01:00
Ignotus Peverell
a6af94a76f
Validate compact block header before hydrating 2018-07-13 19:38:12 +01:00
Ignotus Peverell
1e7e312cf3
TODO cleanup, locator made faster by header cache in chain store 2018-07-13 18:45:24 +01:00
Yeastplume
41e20056d4
db wallet now working identically to file wallet (#1259) 2018-07-13 15:27:16 +01:00
Ignotus Peverell
42bc03f5f3
Add cuckoo solution to header API 2018-07-13 02:20:28 +01:00
Ignotus Peverell
a45d17257a
Cleanup ping-pong serialization 2018-07-13 00:55:21 +01:00
Ignotus Peverell
2b90ba08c2
Handling errors when parsing JSON-RPC params
Fixes #1255
2018-07-13 00:28:30 +01:00
emmick4
92bfb7e819 Update build.md (#1252)
Don't specify building from testnet3 since it doesn't include necessary commits
2018-07-12 20:52:43 +01:00
Ignotus Peverell
12a2fc4f5a
Wallet command exit status on error (#1253) 2018-07-12 20:05:43 +01:00
Ignotus Peverell
bdfd5405c0
Leverage sync state to accept txhashset (#1251)
Fixes #1246
2018-07-12 17:06:52 +01:00
Yeastplume
bacadfb5ab
Wallet API Test Client (#1242)
* beginnings to testclient implementation for more complete wallet API testing

* rework TestWalletClient to be message-based proxy

* test fix

* wallet tests now exercising the API directly as much as possible, capable of instantiating multiple wallets

* test in place to run both file and db wallets

* ensure all wallet api functions lock wallet as needed. Split up transaction creation from posting to chain
2018-07-12 16:49:37 +01:00
yuntai
25ca2de487 Add block header handlers to grin api (#1248)
Support http://127.0.0.1:13413/v1/headers/{}
2018-07-11 22:43:08 +01:00
Quentin Le Sceller
83be242fdf
Add blockfound response in stratum (#1245)
* Add blockfound response in stratum
2018-07-11 09:17:24 -07:00
Ignotus Peverell
708afdbbb6
Shorter message and no stack on block refusal 2018-07-11 01:06:39 +01:00
yuntai
ad69dae9e5 Avoid potential 'attempt to add with overflow' panic (#1213) 2018-07-10 22:23:15 +01:00
Yeastplume
49cbab90f6
WalletClient trait refactor (#1238)
* refactor WalletClient

* revert chain changes

* missing files
2018-07-10 09:18:24 +01:00
Blade Doyle
c7d78446f3 add job_id to stratum job and solution rpc messages (#1240)
* add job_id to stratum job and solution rpc messages

* remove unnecessary clone
2018-07-10 09:18:09 +01:00
obxium
64db4d92f0 Update build documentation (#1236)
- Correct order of operations in build steps
2018-07-09 22:07:09 -07:00
yeastplume
920ad08f70 merging milestone/testnet3 into master to become new master 2018-07-09 19:58:51 +01:00
Antioch Peverell
f33c39cb66
call validate_kernel_history directly from txhashset_write (#1234)
no need for thr skip_kernel_hist bool now
2018-07-09 19:04:17 +01:00
Yeastplume
d5a6992be9
Wallet implementation dynamic dispatch (#1235)
* add ability to instantiate wallets with different backend implementations

* test fix
2018-07-09 18:01:19 +01:00