Commit graph

1109 commits

Author SHA1 Message Date
Yeastplume
8440aad7ea
Retrieve header by output commit (#1388)
* Add get_header_for_output function to chain

* add api call to retrieve associated header for a given output

* rustfmt
2018-08-20 19:02:44 +01:00
Antioch Peverell
82a467ac3c
Fix txpool race condition (#1385)
* fix txpool race condition

* rustfmt

* fixup pool tests

* rustfmt

* rebase against master, pool tests passing
2018-08-20 14:48:05 +01:00
Ignotus Peverell
ef4f426474
Sort pool tx by fee over weight for mining (#1346)
* Sort pool tx by fee over weight for mining. Fixes #1105
* Bucketing dependent transactions before weighing. Minor tx weight fixes.
* Limit length of tx chain, cleanup and test fixes
* Cleanup all mining references to a hardcoded tx count
* Small test improvement, cleanup
2018-08-19 18:50:43 -04:00
Gary Yu
743c845259 fix: deriv_idx is not updated after wallet restore (#1306) (#1374)
* fix: deriv_idx is not updated after wallet restore (#1306)

* rustfmt check
2018-08-19 19:27:04 +01:00
Antioch Peverell
5abefbff33
improve logging when receiving blocks and txs (msg_len) (#1383)
* better logging for msg_len and # kernels

* rustfmt
2018-08-19 18:15:42 +01:00
Gary Yu
7d677737d7 add impl fmt::Debug for BlindingFactor, for pretty print (#1382) 2018-08-19 12:57:04 +01:00
Antioch Peverell
25e03aadef
Tx (change) output splitter (#1369)
* wip - split change into many outputs for testing

* rustfmt

* add change_outputs param to wallet send
default to 1

* commit

* rustfmt

* cleanup

* fixup servers tests
2018-08-18 22:38:48 +01:00
Antioch Peverell
c05c5e21ea
Fix config defaults (#1376)
* fix global defaults to reflect grin.toml

* rustfmt
2018-08-18 17:32:04 +01:00
Antioch Peverell
686f7517ed
fixup Cargo.lock (#1377) 2018-08-18 16:41:00 +01:00
yeastplume
d5f7f4cf2f default run_wallet_owner_api to false 2018-08-18 13:48:43 +01:00
Gary Yu
4da92c5d75 minor fix: prefix code conflict between 'COMMITMENT_PREFIX' and 'CONFIRMED_HEIGHT_PREFIX' (#1375) 2018-08-18 13:23:31 +01:00
Ignotus Peverell
630d0a0438
Buffered txhashset temp file write 2018-08-18 02:52:44 +01:00
Quentin Le Sceller
59f4806a2c Update wallet restore error message (#1368) 2018-08-17 14:04:23 -04:00
Yeastplume
103c9cda77
Serve up web wallet application (#1367)
* first addition of static wallet file server

* rustfmt

* add custom build functions to download and untar particular release of the web-wallet

* rustfmt

* remove comments
2018-08-17 18:51:50 +01:00
Mike Dallas
adeaea4622 Truncate trailing zeroes in coin amounts (#1366)
* truncate coin amounts
* truncate datetimes
* fixed formatting
2018-08-17 13:05:35 -04:00
hashmap
f7161a9afb Improve API handlers (#1364)
* Return different status codes depending on result, not just BAD_REQUEST, fixes #1247
* Reduce number of unwraps
* Refactoring
2018-08-17 13:04:02 -04:00
Gary Yu
54d3fc0af2 improve: use batch verification for txhashset rangeproof validation (#1321) (#1363)
* improve: use bullet rangeproof batch verification for txhashset validation (#1321)

* update rust-secp256k1-zkp to tag 'grin_integration_22'
2018-08-17 16:18:48 +01:00
Antioch Peverell
a10557c756
grin wallet outputs now displays output commitments (#1365)
* commit - wip

* rustfmt

* save output commitment when saving output in wallet

* rustfmt

* fixup wallet tests with commitments in the wallet db

* rustfmt
2018-08-17 12:15:06 +01:00
Ignotus Peverell
d47a3bc225
Simplify and improve headers_received (#1362) 2018-08-16 22:30:05 -04:00
Ignotus Peverell
b4febf2e40
Test teardown cleanup fix
Can't reproduce the current failing of servers tests, but stopping
the servers cleanly can't hurt. I think.
2018-08-17 01:31:51 +01:00
Ignotus Peverell
dcfbda9c89
Fix test logger, debug level, no file 2018-08-16 19:32:03 +01:00
hashmap
779921f71a Fix compiler warnings (#1361)
* env::home_dir is deprecated, compiler suggests to use crate `dirs`
* add superficial comments to file util module
2018-08-15 17:11:05 -07:00
Ignotus Peverell
6775112f61
Introduce cut_through method to avoid code duplication (#1355)
* Introduce cut_through method to avoid code duplication
* Improve error handling, fix sorting.
2018-08-15 16:20:33 -07:00
hashmap
99a66c1960
Consolidate validation in Block and Transaction (#1354)
* Consolidate validation in Block and Transaction

Introduce TransactionBody which is included into block and tx.
Fixes #1333
2018-08-15 23:14:48 +02:00
hashmap
37fa413329 Fix small issues found by fuzzing (#1360)
Overage and fee come from the network and may cause overflow if a message was corrupted or crafted to attack a server.
2018-08-15 11:55:25 -07:00
Yeastplume
e70ff53c3c
Use tagged version of rust-libsecp256k1 (#1359) 2018-08-15 17:02:06 +01:00
hashmap
a2fac26282 Add network hashrate info to Mining pane in TUI (#1353)
Found it's useful, we even have a section in user docs for that https://github.com/mimblewimble/docs/wiki/Testnet3-FAQ
2018-08-14 10:01:20 -07:00
Quentin Le Sceller
6b74cf5098
Unpin croaring to version 0.3.2 (#1352) 2018-08-14 08:28:58 -04:00
Michalis Kargakis
dda88f193b Fix typo + git ignore wallet data (#1350)
* Ignore wallet data

* Fix typo
2018-08-13 23:28:01 +01:00
Ignotus Peverell
6f590b3f88
Halve max block weight (#1347) 2018-08-13 14:06:53 -07:00
Ignotus Peverell
e9c987c075
Consolidate and cleanup tx aggregation (#1332)
* Include commitments non-duplicate checks in aggregate
* Remove said check from the pool
* Block building now uses tx aggregation to reduce duplication
2018-08-12 19:08:08 -07:00
Ignotus Peverell
4be97abbbb
Cleanup max sizes (#1345)
* Transaction max weight expressed in terms of block weight
* Cleaned up max block sizes, so everything is in therms of weight
* Cleanup block max constants
* Rename verify_size -> verify_weight
2018-08-12 13:02:30 -07:00
John Tromp
0d94d35a9d Simplify and optimize MMR routines (#1301)
* add new core mmr routine upon which others should be built more efficiently
* tons of pmmr optimizations and simplifications
* fix typo and extend docs
* change initial spaces to tab to fix indentation
2018-08-11 10:44:56 -07:00
hashmap
b10609bbb1
Merge pull request #1336 from antiochp/validate_block_size
Validate block size
2018-08-10 16:51:33 +02:00
antiochp
fb30b02f99
cleanup verify_weight code 2018-08-10 15:12:53 +01:00
antiochp
5ee11046a5
rework block validation to check input|output|kernel sizes consistently
with tx validation
2018-08-10 15:12:48 +01:00
hashmap
395c48c844
Merge pull request #1339 from antiochp/rustfmt_chain_crate
run rustfmt against chain crate
2018-08-10 16:08:18 +02:00
hashmap
f6383aa860
Merge pull request #1340 from antiochp/rustfmt_core_crate
rustfmt on core crate (not run for a while)
2018-08-10 16:06:34 +02:00
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