Commit graph

1221 commits

Author SHA1 Message Date
antiochp
0ff1d86b22
rustfmt on core crate (not run for a while) 2018-08-10 15:00:18 +01:00
antiochp
bcebe7b5b3
run rustfmt against chain crate
suspect it has not been running successfully for a while...
2018-08-10 14:56:35 +01:00
Antioch Peverell
ed88ad8bbc
cannot use unstable rustfmt features outside nightly toolchain (#1338)
* cannot use unstable rustfmt features outside nightly toolchain

* cleanup redundant rustfmt.toml files
2018-08-10 14:54:09 +01:00
Antioch Peverell
983a25248b
call tx.validate() as part of tx.read() (#1334)
and move some validation out of read() and into validate()
2018-08-10 13:57:47 +01:00
Antioch Peverell
9c05471979 Validate resulting tx after aggregation (and deaggregation) (#1331) 2018-08-09 16:37:31 -07:00
hashmap
ae3b1da18b Fix issues found by fuzz test (#1330)
Fuzz test found the folowing issues with reading block header:
* Unbounded cuckou_sizeshift field in Proof
* Different timestamp range after migration to chrono crate
2018-08-09 16:35:46 -07:00
hashmap
f11a3b1994
Merge pull request #1329 from yourowncrypto/fix-fuzz
Update fuzz in core crate
2018-08-09 14:09:40 +02:00
hashmap
32662a0a16 Update fuzz in core crate
Fix compilation error in fuzz code after the wallet refactoring
2018-08-09 11:37:11 +02:00
Gary Yu
63a4d95df1 fix: in case txhashset validation fail, 'TxHashsetDownload' should retry (#1293) (#1322)
* fix: in case txhashset validation fail, 'TxHashsetDownload' should retry (#1293)

And add 2 more fixes:
1. handle sending request failure of 'send_txhashset_request';
2. use a 10-mins timeout to handle noresponse failure, in case a peer ignore our txhashset request, or in case a peer fail to send a file for some reason.
2018-08-08 17:14:54 +02:00
Antioch Peverell
328d832bd6
cleanup verify_coinbase on block (#1326) 2018-08-08 09:47:30 +01:00
Ignotus Peverell
f0bdb2c8fa
File-based transaction building (#1317)
* First implementation of file-based transaction send, receive and finalize in libwallet
* Switch from TOML to JSON (needless complication). Plug in send, receive and finalize wallet commands.
* Pretty JSON for response is too large (all whitespace)
2018-08-07 11:17:33 -07:00
Antioch Peverell
e383cb594f
commit (#1324) 2018-08-07 16:56:38 +01:00
hashmap
414a30224e Fix get outputs call in wallet (#1319)
* Fix get outputs call in wallet. It generates an invalid url if there are 1000+ outputs.
* Also switched to async http client for performance reasons
* Couple unrelated cleanups
* fixup! Fix get outputs call in wallet
2018-08-06 12:48:05 -07:00
jaspervdm
498ea9718e Improved basic transaction diagram (#1313)
* Fixed basic transaction diagram
* Offset is not part of kernel (it is stored in the tx)
* Explicitly write down calculation of xS
2018-08-06 11:34:11 -07:00
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