Commit graph

42 commits

Author SHA1 Message Date
Gary Yu
ed73db671f fix for unstable travis-ci test on servers module (#1434)
* fix for unstable travis-ci test on servers module

* skip the PeerWithSelf connection request on sending side

* logs and comments change; and remove an unnecessary unwrap() in test
2018-09-04 10:52:11 +02:00
Quentin Le Sceller
544a296f77
Fix typos and unused imports (#1466)
* Fix typos and unused imports
2018-09-03 13:09:28 +02:00
hashmap
fa00a0ebe6
Implement exponential backoff for peer monitoring at startup (#1459)
* Implement exponential backoff for peer monitoring at startup

Fixes #1413
2018-09-01 23:25:47 +02:00
Gary Yu
9a127d6291 complete the 'simulate_seeding' test case for automatic test (#1441)
complete the 'simulate_seeding' test case for automatic test
2018-08-30 14:58:49 +02:00
hashmap
5e57e9c8e9 Fix flakiness of simple_server_wallet test
It produces 1000+ otputs on a fast machine (?) and generates invalid URL as result (too many paramaters). We don't care about sending all outputs in this test, we just need something.
2018-08-28 11:52:44 +02:00
hashmap
ff2612ca46 Fix test container and remove backtraces (#1430)
* Local test container used different folder than regular server, so test could not find txhashset files
* Error stacktrace was printed in cases when error was expected, which created some noise and confusion
2018-08-27 21:48:15 -04:00
yeastplume
04e6517806 tweak server test params 2018-08-24 15:51:32 +01:00
yeastplume
c449d35dd2 tweak server test params 2018-08-24 15:51:13 +01:00
Yeastplume
8b6ce33cfc
Automated test for #1325 (#1415)
* add test to replicate #1325

* rustfmt
2018-08-24 14:45:14 +01:00
Quentin Le Sceller
8cd1b23f7a Add a peers_preferred option in Grin (#1401)
* Preferred peers option
* Move P2P configuration into proper config part
* Fix tests
2018-08-23 15:16:04 -04:00
hashmap
7dd2888b71 Get peers as quick as possible (#1398)
* Get peers as quick as possible. Currently we get 2 peers and then wait 20 seconds before trying to get more
* Second pass
* Fix peer_count
2018-08-22 21:31:06 -04:00
Ignotus Peverell
9554f93e1d
Run header sync only when stalled or complete (#1393)
Header sync used to run when complete (right count of blocks
received) or every 10 sec regardless. Sometimes 10 secs is not
enough, especially when a big batch of blocks bodies is arriving
at the same time.

This tweaks the time-based heuristic just a bit to only ask for
headers when stalled, meaning that the header head has not
*progressed* for 10 seconds.

* Fix bad header sync timeout logic

* Improve stability of fast sync test
Adds regular pings so that the 2 test servers know each others'
heights (necessary to find most work peer). Stop mining on the
first server once the 2nd kicks in. Avoids chasing a fast moving
target on Cuckoo10.
2018-08-22 19:51:25 -04: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
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
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
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
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
Yeastplume
49cbab90f6
WalletClient trait refactor (#1238)
* refactor WalletClient

* revert chain changes

* missing files
2018-07-10 09:18:24 +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
Antioch Peverell
980378eb65
fix misbehaving simulnet fastsync test (#1227)
* fix misbehaving simulnet fastsync test
cleanup redundant cutoff vs bitmap params is rewind and check_compact

* make sure we do not verify full kernel history on a writeable txhashset extension
rework simulnet simulate_fast_sync test to be more robust

* fixup store tests

* sleep for a bit longer to give nodes time to update
their sync_state correctly

* tweak timing of simulate_block_propagation
2018-07-08 17:37:09 +01:00
Yeastplume
721a22b1c4
Simulnet test fix (#1222)
* remove lower time bound

* simulnet test issue

* re-introduce lower bound

* re-introduce lower bound
2018-07-06 11:42:54 +01:00
Yeastplume
9e0b3b6862
Store additional wallet detail and WalletInfo cleanup (#1167)
* adding wallet detail file, clean up wallet info output

* rustfmt

* ensure change outputs aren't written early

* rustfmt

* travis problems AGAIN

* file wallet explicit types
2018-06-14 17:02:05 +01:00
Quentin Le Sceller
a30ee88236
Cleanup imports (#1161)
Reorganize imports
2018-06-14 08:16:14 -04:00
Yeastplume
88616fd341
[WIP] Updates to support web-wallet (#1160)
* updates to support web wallet workflow

* rustfmt

* functions to support wallet, error handling

* rustfmt

* rebase rustfmt

* test fix
2018-06-13 21:58:45 +01:00
Ignotus Peverell
af178f82f8
Refactor the Keychain to be based on a trait (#1146)
* First pass at restructuring the keychain crate and introducing a Keychain trait
* Parameterized everything that had to. Stuff compiles.
* More stuff compiles, fix most tests
* Big merge, pushing down opening the keychain forced adding factory methods on trait
* Test fixes for pool and servers crate
2018-06-08 06:21:54 +01:00
Yeastplume
ebee05591b
Factor out wallet communications (#1142)
* move http calls out from libwallet internal

* rustfmt

* start to think about wallet communication traits

* rustfmt

* start of factoring out wallet client trait

* rustfmt

* move node_url trait fn into walletclient

* rustfmt

* comms factored out (with exception of wallet restore)

* rustfmt

* fix test

* rustfmt

* further test fix
2018-06-07 15:04:21 +01:00
Yeastplume
8f66016557
[WIP] Wallet API Structure (#1133)
Wallet API Structure
2018-06-06 15:36:29 +01:00
Quentin Le Sceller
1255ea2224
Upgrade and uniformize dependencies (#1138)
* Remove unused DandelionConfig

* Cargo upgrade and cleanup
2018-06-05 13:26:32 -04:00
Blade Doyle
c34da9598d Support shares (#1132)
* Support logging miner shares and minimum mining difficulty configuration

* rust formatting

* fix test
2018-06-04 11:22:42 +01:00
Yeastplume
7812a02233
Libwallet refactoring - Library functions + ErrorTypes (#1113)
* move checker and rename to updater

* rustfmt

* complete checker/updater move

* rustfmt

* move libwallet error into separate file

* rustfmt

* starting to sort our error types

* updating errors in libtx and libwallet

* rustfmt

* factor out error type

* rustfmt

* compiling, errors split into libwallet and wallet errors

* rustfmt

* changing user error reporting to new format

* rustfmt

* clean up error types

* clean up error types

* move restore into libwallet

* rustfmt
2018-06-01 15:06:59 +01:00
Yeastplume
82ed280625
[WIP] Factoring out wallet traits and continued wallet library work (#1096)
* rename wallet libs

* rename transaction.rs to slate.rs

* rename transaction.rs to slate.rs

* move some types into libwallet/types

* rustfmt

* rename libtransaction libtx

* rename libtransaction libtx

* change types.rs to file_wallet

* rustfmt

* rename WalletData to FileWallet

* refactoring WalletBackend types out

* rustfmt

* All compiling, at least

* rustfmt

* fix FileWallet paths to persist

* rustfmt

* re-ignore wallet integration test
2018-05-30 17:48:32 +01:00
Yeastplume
1f94bfc038
libwallet refactor context, aggsig, error handling (#1087)
* remove context object from aggsig and transaction libs

* fix to aggsig, and remove unnecessary warnings

* put tx_fee function into libwallet::transaction

* Error cleanup, and creating libwallet error type

* remove some unwraps

* checker bug

* ensure transaction tests checks sender's wallet
2018-05-24 16:27:26 +01:00
yeastplume
7281dc9473 ignore wallet integration test 2018-05-21 17:01:05 +01:00
Yeastplume
85285473bd
[WIP] Wallet refactor - part 3 (#1072)
* Beginning to rework aggsig library workflow

* more refactoring of transaction api

* whoever does round 1 first creates offset

* slate finalisation now context-free, so anyone can do it

* remove concept of transaction phase

* remove slate phase enum

* update actual send/receive code with new transaction lib workflow
2018-05-21 16:28:11 +01:00
Yeastplume
4121ea1240
Wallet+Keychain refactoring (#1035)
* beginning to refactor keychain into wallet lib

* rustfmt

* more refactor of aggsig lib, simplify aggsig context manager, hold instance statically for now

* clean some warnings

* clean some warnings

* fix wallet send test a bit

* fix core tests, move wallet dependent tests into integration tests

* repair chain tests

* refactor/fix pool tests

* fix wallet tests, moved from keychain

* add wallet tests
2018-05-09 10:15:58 +01:00
Casey Rodarmor
b42b2a4f77 Fix comment in test_p2p() (#1041) 2018-05-06 21:02:45 -04:00
Yeastplume
4c6a193e01
[WIP] Miner removal (#979)
* Beginning to remove in-process miner

* rustfmt

* rustfmt

* rustfmt

* rustfmt

* remove pow crate and put remnants into core

* rustfmt

* fix test compilation in core and chain

* rustfmt

* Updating server tests to use test miner

* rustfmt

* rustfmt

* remove pow from test matrix

* adding basic stratum stats to TUI

* run stratum server at all times, and halt messages while syncing

* fix core tests

* add ability to run internal test miner for cuckoo 16 testing

* modify build instructions
2018-04-24 09:18:24 +01:00
Blade Doyle
86d7628562 add request method name to the result to allow matching onthe client side (#987)
* add request method name to the result to allow matching onthe client side

* update tests for change in rpc response api
2018-04-23 09:41:35 +01:00
Blade Doyle
e13c22356a enhance test by validating against stats (#959) 2018-04-16 09:58:19 +01:00
yeastplume
a3c606d303 text config fix 2018-04-13 15:25:05 +01:00
Blade Doyle
bcc8f68f52 minimal stratum server (#937)
* Fix issue where we have no metadata for a block (#938)

when restarting node before initial sync completed

* Avoid double-locking on add eviction. Fixes #936

* Fix 33c5a983

* Add support for DNS Seed (#940)

* Add support for DNS Seed
* Add port
* Add seed.grin-tech.org
* Remove duplicate IPs

* minimal stratum server

* Modifications for review comments.  Move stratum test into its own file, move get_block() into its own rust module, use pool and chain only rather than the entire Miner object

* rustfmt

* cleanup

* cleanup

* Introduce extending_readonly to simplify a forcing and cancelling rollbacks (#945)

readonly views of the txhashset

* Add DNS Seed and make DNSSeed default (#942)

* Add dns seed seeding type
* Add grin-seed.owncrypto.de and make DNSSeed default
* Add email address for each DNS Seed

* [WIP] Core PMMR and API updates to support wallet restore (#950)

* update pmmr to get batch of elements by insertion position

* update pmmr to get batch of elements by insertion position

* add api + chain calls to get traversed outputs back out

* add api + chain calls to get traversed outputs back out

* first pass getting wallet restore to work again with updated utxo-walking api

* Update simulation.md

* Fix Bus Error (core dumped) when validating fast sync txhashset (#956)

This PR fixes #953 by introducing a lock for txhashet_write. It's not enough
to synchronize access to in memory data, files also needs to be protected, so
a general txhashset lock was introduced.

* refactor grin crate into separate modules (#955)

* Add total kernel offset to block api (#954)

* minimal stratum server

* Modifications for review comments.  Move stratum test into its own file, move get_block() into its own rust module, use pool and chain only rather than the entire Miner object

* rustfmt

* cleanup

* cleanup

* Merge with grin_grin -> servers code reorg

* Merge with grin_grin -> servers code reorg

* add stratum server stats
2018-04-13 14:42:25 +01:00
Yeastplume
1c5aee68bf
refactor grin crate into separate modules (#955) 2018-04-12 10:11:24 +01:00