Commit graph

1943 commits

Author SHA1 Message Date
hashmap
65c0b1ecad
Fix handling of IO WouldBlock error in Stratum server (#2528)
If WouldBlock error happens Stratum server drops part of a message to
read or write. This PR inroduces a worker's buffer to store partially
read message which will be completed next time. For write the existing
util function is used.
Fixes #2524
2019-02-13 00:16:09 +01:00
Ivan Sorokin
aa4f44b79a fix: wallet coin selection respects max_block_weight (#2546)
* fix #2510: wallet coin selection respects max_block_weight

Deprecate "soft" max_outputs limit and introduce "hard" max_outputs
limit based on max_block_weight.

* Fix tests
2019-02-12 15:06:25 -08:00
Ivan Sorokin
1d0c04cf0b Add ability to compare selection strategies (#2516)
Before tx creation user can estimate fee and locked amount
with different selection strategies by providing `-e` flag for
`wallet send` command.
2019-02-12 13:45:43 +00:00
Gary Yu
5987bcde19 add repost method into wallet owner api (#2553)
* add repost method into wallet owner api

* rustfmt
2019-02-12 13:39:43 +00:00
Mark Renten
3b74a9ba3f Add content disposition for OK responses (#2545) 2019-02-11 10:54:21 -08:00
Yeastplume
200f87b8bc
Windows TUI Fix (#2555)
* switch pancurses backend to win32

* revert changes to restore test
2019-02-10 12:55:35 +00:00
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
Ivan Sorokin
49ca8eba49 fix: false positive wallet tests (#2539) 2019-02-08 11:31:36 +00:00
hashmap
a63cfa7138 Allow to have more than min_peers/2 outbound peers (#2537)
* Allow to have more than min_peers/2 outbound peers

Default value is 8, so we allow only 4 outbound peers, unfortunately if a node is behind NAT it can't get inbound peers and it stucks with 4 peers as maximum.
This PR allows a number of outbound peers to be between min_peers and max_peers/2. Node behind NAT will eventually have just min_peers number of peers.

* Extract into healthy_peers_mix function
2019-02-07 12:26:23 -08:00
hashmap
1f7ea4930e
Merge pull request #2536 from JeremyRubin/reduce-memory-cache
refactor: use less memory in verifier_cache by storing zero-sized type instead of bool
2019-02-07 10:01:21 +01:00
Jeremy Rubin
c1045842f5 refactor: use less memory in verifier_cache by storing zero-sized type instead of bool 2019-02-06 14:37:19 -08:00
Rodrigo Ferreira
a735fd1bc6 [docs] Brazilian Portuguese translation of intro.md (#2522)
* Translate intro.md to portuguese

* Spell-checking and minor improvements to the portuguese translation
2019-02-06 09:41:14 -08:00
Yeastplume
e69ce5ad82
Move slate code from core/libtx to wallet/libwallet (#2533)
* move slate from core to wallet crate

* rustfmt
2019-02-05 23:02:00 +00:00
hashmap
4eba13a207
Merge pull request #2517 from cyclefortytwo/fix_data_dir_flag
fix wallet --data-dir flag
2019-02-05 07:58:12 +01:00
David Burkett
c1d67cbec0 perf: Removing unnecessary array copy. (#2531) 2019-02-05 07:54:20 +01:00
Max Lavrenov
c79bbd4efa fix wallet --data-dir flag 2019-02-02 21:51:10 +01:00
Ignotus Peverell
c41ea4bcf2
Feature/slate version (#2491)
* Add a slate version field
* Move current slate version to constant
* Change slate version to uint
* Add default 0 incase it's missing (pre-versioning)
2019-02-01 11:17:54 -08:00
hashmap
267c706e2b Set max number of connections for peer db (#2506)
Use max_peers value for that if set. By default LMDB limit is 126, which is not enough for less than 200 peers on my node.
2019-02-01 10:51:23 -08:00
marcuswin
987fa033ed Fix link on BPASE (#2512) 2019-02-01 16:47:01 +00:00
Antioch Peverell
19ce9cc28e
bump for v1.0.1 (#2511) 2019-02-01 14:43:18 +00:00
Yeastplume
130675e017
Refactor tx lib to be more Sender-Recipient agnostic (#2502)
* move slate initialisation outside of selection function

* refactor internal tx lib to support recipient (or anyone else) first models

* rustfmt

* rework init api function

* rustfmt

* refactor wallet lock closures to a defined fnmut type

* rustfmt

* comments for clarification
2019-02-01 11:35:37 +00:00
Anthony Morris
7646e71810 Fix minor typo (#2507) 2019-02-01 11:01:26 +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
Yoni
1f7d3c6dc7 - Change slate version to uint
- Add default 0 incase it's missing (pre-versioning)
2019-01-31 16:25:57 +02:00
Yoni
e505726d73 Merge remote-tracking branch 'upstream/master' into feature/slate-version 2019-01-31 15:52:39 +02:00
hashmap
062d41766e
Refresh coinbase key if the existing one was removed (#2493)
* Refresh coinbase key if the existing was removed

It happens if `wallet check` runs in parallel.
Alternative solution is not to remove it during the check.
Fixes #2412
2019-01-31 13:00:44 +01: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
Antioch Peverell
422db82667
no is_mainnet() to keep tests close to mainnet (#2496) 2019-01-31 09:23:19 +00:00
lehnberg
5dbb478d3e
Merge pull request #2497 from rsoltanzadeh/patch-1
Create intro_SE.md
2019-01-30 17:41:28 -08:00
Ramin Soltanzadeh
0fc7dff0d6
Create intro_SE.md 2019-01-31 00:37:41 +01:00
Yoni
569d7a3220 Move current slate version to constant 2019-01-30 10:26:23 +02:00
Yoni
99dda19f5e rustfmt 2019-01-30 10:19:52 +02:00
Yoni
a33502c108 Add a slate version field 2019-01-30 10:19:41 +02:00
Antioch Peverell
fa7e46d4b2 Add comment for Mainnet chain type. (#2483) 2019-01-29 20:23:23 -08:00
Antioch Peverell
507da6a9fd default to sane value for missing owner_api_listen_port (#2484)
* default to sane value for missing owner_api_listen_port

* add comment for owner_api_listen_port
and cleanup previous comment

* get rid of TODO
2019-01-29 20:21:09 -08:00
Antioch Peverell
d1de3b0d6e default our chain type to mainnet (already doing this via config file) (#2485) 2019-01-29 20:09:30 -08:00
Simon B
edb4751ae9 README update to make github page also reflect that Mainnet is launched (#2439)
* README update to make github page also reflect that Mainnet is launched

* MainNet -> mainnet
2019-01-28 10:58:51 +00:00
Raghav Sood
f2b6100220 wallet/owner_api: allow owner API port to be configurable (#2475) 2019-01-28 10:45:59 +00:00
Antioch Peverell
6d041a949b
wallet config should default to mainnet (#2478) 2019-01-28 09:52:48 +00:00
Simon B
92cbfa20a6 Handle rpc requests unwrap crash in stratumserver.rs (#2446)
* protect rpc_response from None.unwrap

* protect login handler from crashing before current_block_versions has had time to get populated

* protect worker_stats_id finding from None
2019-01-26 22:21:11 +01:00
Antioch Peverell
c8fd0575ed Pool tx weight verification (#2466) 2019-01-25 12:48:15 -08:00
Yeastplume
a97ab376cb
Improve wallet + node API Comms error logging (#2472)
* make wallet+node communication errors more verbose

* rustfmt
2019-01-25 12:12:50 +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
Simon B
0e0ec247e4 fix owner_api docs: wrong port number (#2442)
* fix owner_api docs: wrong port number

* update ports since PR #2405. We now allow both floo and mainnet owner_apis to run in parallell on a single server, with ports 13420 or 3420

* correction since there is no --mainnet flag

* fixes the comment by @karkagis
2019-01-25 10:08:08 +00:00
hashmap
2e22e2c6ec
Merge pull request #2465 from sesam/catchingClippy
Catching clippy
2019-01-24 22:00:34 +01:00
hashmap
4a54039c52
Merge pull request #2469 from cyclefortytwo/head-error
Disable thread local storage for LMDB connection
2019-01-24 21:57:02 +01:00
hashmap
ca19f9c610
Merge pull request #2467 from gagarin55/typo-fix
Fixed some typos in russian intro and code structure docs
2019-01-24 15:05:41 +01:00
Yoni Svechinsky
a523f82820 Add hex serialization functions (#2436)
* Change slate seralization to hex

* rustfmt

* Comment out serde directives
Move serialization functions into a seperate module

* Remove commented code
2019-01-24 13:18:13 +00:00
gagarin55
d9c38ae654 Fixed some typos in russian intro and code structure docs 2019-01-24 16:03:36 +03:00