Commit graph

1906 commits

Author SHA1 Message Date
Antioch Peverell
23cb9e2514
Map peers by ip only (ignoring port unless on loopback ip) (#2540)
* wip

* big refactor, regretting doing this now

* PeerAddr everywhere

* cleanup

* fixup server tests

* peers api working for GET, POST is still WIP

* we can now ban/unban peers by ip only (port optional)
2019-02-18 12:15:32 +00:00
Jeremy Rubin
dc6542d82b chore/docs: eliminate warnings (#2583)
* chore: replace trim_right with $ sed -i'' 's/trim_right/trim_end/' **/*.rs

* docs: individually document macros to avoid warning, add TODO to make to_edge hygenic

* docs: document impl_array_newtype macros, refactor: move all impl_array_newtype macro traits into impl_array_netype_index
2019-02-15 15:32:37 -08:00
hashmap
ac6ed71abd
Refactor API handlers (#2572)
Also add some API tests
2019-02-15 22:17:00 +01:00
Jeremy Rubin
aad0e9402a fix: update Cargo.lock (#2580) 2019-02-15 11:12:27 -08:00
hashmap
049a0cd128 Fix compiler warnings (#2579) 2019-02-15 10:46:24 -08:00
Gary Yu
271042c3b0 suppress the debug log for unexpected file report (#2574)
* supress the debug log for unexpected file report in check_and_remove_files

* revise according to review comments

* rustfmt
2019-02-15 14:33:10 +00:00
Jeremy Rubin
99494c6fa6 get rid of default implementation of Hashed trait for writable things (#2573) 2019-02-15 13:41:19 +00:00
Jeremy Rubin
d4540f32a3 refactor: use sort_unstable instead of sort, more efficient with_* methods for TransactionBody (#2564) 2019-02-14 11:01:54 +00:00
Jeremy Rubin
41ed10940d fix: Fix race condition with dandelion_relay peer map and make more semantic (#2548)
* fix: Fix race condition with dandelion_relay peer map and make more semantic

* Fix bug where we don't actually re-read the dandelion_relay variable after refreshing it
2019-02-13 10:40:31 -08:00
hashmap
5d904250d5 Use failure for Pool and Committed errors (#2570)
It doesn't play nice with failure-based error management, we have to
throw away an exisiting error and create a new one (failure-based)
2019-02-13 09:33:25 -08:00
Jeremy Rubin
563c674700 refactor: reserve capacity in aggregate (#2568) 2019-02-13 11:41:29 +01:00
John Tromp
91cca2bf61 test: add CuckAToo31 solution test (#2552)
add CuckAToo31 solution test
2019-02-12 19:10:17 -05:00
Peter Kalambet
d6936f0ae7 Add more details to wallet TLS setup instruction (#2565) 2019-02-13 00:22:41 +01:00
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