Commit graph

2142 commits

Author SHA1 Message Date
Gary Yu
608973c498 Fix the build warning of deprecated trim_right_matches (#2662) 2019-03-10 20:13:42 -07:00
Gary Yu
699d85a799
add a new configure item for log_max_files (#2601)
* add a new configure item for log_max_files

* rustfmt

* use a constant instead of multiple 32

* rustfmt
2019-03-08 19:02:07 +08:00
Andrew Dirksen
f30e59adc5 make error types serializable (#2659) 2019-03-07 19:08:29 +00:00
Yeastplume
fd077a489d
[1.1.0] LMDB Naming consistency fix (#2656)
* allow separate db name in store creation

* rustfmt

* fixes to db paths to ensure consistency with 1.0.x
2019-03-06 17:34:39 +00:00
Brandon Arvanaghi
7fd2970971 Add Medium post to intro (#2654)
Spoke to @yeastplume who agreed it makes sense to add the "Grin Transactions Explained, Step-by-Step" Medium post to intro.md

Open for suggestions on a better location.
2019-03-06 09:21:34 +00:00
Andrew Dirksen
72f8ce5ced remove root = true from editorconfig (#2655) 2019-03-06 09:19:58 +00:00
Agreene
4c9984cf11 Display the current download rate rather than the average when syncing the chain (#2633)
* When syncing the chain, calculate the displayed download speed using the current rate from the most recent iteration, rather than the average download speed from the entire syncing process.

* Replace the explicitly ignored variables in the pattern with an implicit ignore
2019-03-03 13:44:31 -08:00
Yeastplume
6fa137a4ff
Fix TxHashSet file filter for Windows. (#2641) (#2643)
* Fix TxHashSet file filter for Windows.

* rustfmt

* Updating regexp

* Adding in test case
2019-02-28 21:39:38 +00:00
David Burkett
d0ade29fc2 Fix TxHashSet file filter for Windows. (#2641)
* Fix TxHashSet file filter for Windows.

* rustfmt

* Updating regexp

* Adding in test case
2019-02-28 19:52:59 +00:00
Aidan_YOUNGJUN
d73124c469 [docs] Documents in grin repo had translated in Korean. (#2604)
*  Start to M/W intro translate in Korean
*  translate in Korean
*  add korean translation  on intro
* table_of_content.md translate in Korean.
*  table_of_content_KR.md finish translate in Korean, start to translate State_KR.md
*  add state_KR.md & commit some translation in State_KR.md
*  WIP stat_KR.md translation
*  add build_KR.md && stratum_KR.md
*  finish translate stratum_KR.md & table_of_content_KR.md
*  rename intro.KR.md to intro_KR.md
*  add intro_KR.md file path each language's  intro.md
*  add Korean translation file path to stratum.md & table_of_contents.md
*  fix difference with grin/master
2019-02-28 10:11:04 -08:00
Johannes Zweng
204288295d [docs] Add switch commitment documentation (#2526)
* remove references to no-longer existing switch commitment hash

(as switch commitments were removed in ca8447f3bd
and moved into the blinding factor of the Pedersen Commitment)

* some rewording (points vs curves) and fix of small formatting issues

* Add switch commitment documentation
2019-02-27 14:20:20 -08:00
Antioch Peverell
27c43c42a2
Simplify (and fix) output_pos cleanup during chain compaction (#2609)
* expose leaf pos iterator
use it for various things in txhashset when iterating over outputs

* fix

* cleanup

* rebuild output_pos index (and clear it out first) when compacting the chain

* fixup tests

* refactor to match on (output, proof) tuple

* add comments to compact() to explain what is going on.

* get rid of some boxing around the leaf_set iterator

* cleanup
2019-02-27 21:02:54 +00:00
Yeastplume
a080284563
disable gen_gen crate (#2636) 2019-02-27 12:09:08 +00:00
Yeastplume
557e77b218
comment out fuzz tests for now, remove wallet crate reference (#2635) 2019-02-27 11:12:09 +00:00
Yeastplume
beaae28d70
Dynamic LMDB mapsize allocation [1.1.0] (#2605)
* dynamically resize lmdb

* rustfmt

* explicitly close db before resizing

* rustfmt

* test fix

* rustfmt

* pool tests

* chain fix

* merge

* move RwLock into Store, ensure resize gives a min threshold

* rustfmt

* move locks based on testing

* rustfmt
2019-02-27 09:47:46 +00:00
Mike Dallas
d560a36dd6 Event callbacks for Network and Chain Events (#2598)
* Add hooks for network and chain events. Move logging to an EventLogger
* implement webhooks
* fix failing test
* remove unnecessary 'pub'
* add some metadata to the json payload
* avoid unecessary init
* resolve conflicts
2019-02-26 12:24:50 -08:00
Yeastplume
c388e086b6
windows cargo settings (#2632) 2019-02-26 16:48:45 +00:00
hashmap
fe9fa51f32
Reduce usage of unwrap in p2p crate (#2627)
Also change store crate a bit
2019-02-25 19:48:54 +01:00
Yeastplume
f4cdd1f759
insert windows build support (#2626) 2019-02-25 16:12:03 +00:00
hashmap
224a315dd1
Allow to peers behind NAT to get up to preferred_max connections (#2543)
Allow to peers behind NAT to get up to preffered_max connections

If peer has only outbound connections it's mot likely behind NAT and we should not stop it from getting more outbound connections
2019-02-25 16:29:37 +01:00
Antioch Peverell
eed81388d5
cleanup legacy "3 dot" check (#2625) 2019-02-25 13:20:15 +00:00
yeastplume
4f7e5bb0d9
rustfmt 2019-02-25 12:15:22 +00:00
yeastplume
91c91469a3
merge from master 2019-02-25 12:15:12 +00:00
hashmap
391e311f4c Don't extract unexpected files from txhashset archive (#2624)
We verify and remove such files later one, it's safer to ignore them
during unpacking
2019-02-24 22:57:56 -08:00
Ignotus Peverell
8e2b0c7bc8
Bump version to 1.0.2 (#2623) 2019-02-24 21:57:56 -08:00
hashmap
e71eca1977 Remove some unwrap/expect in chain crate (#2621)
* Return Result instead of calling expect in root(). It would kill peer's thread. Perhaps we should ban this peer as malicious.
* Remove some unwraps
2019-02-24 21:57:21 -08:00
Yeastplume
ea4b4fc389
Remove wallet code [1.1.0] (#2593)
* Bump version to 1.1.0

* remove wallet crate

* wallet extracted + mine_block structs

* remove wallet doc

* remove unnecessary cargo deps

* rustfmt

* remove wallet from travis matrix

* move integration tests into separate crate

* rustfmt

* move integration crate to wallet
2019-02-21 11:57:45 +00:00
Antioch Peverell
2df633b622
log timing for rebuild_index (#2607) 2019-02-20 08:16:13 +00:00
Yeastplume
b1c09946cb
Update contributing guidelines (#2563)
* update contributing guidelines

* add pull request template
2019-02-19 14:29:58 +00:00
Antioch Peverell
48b7421d1e
use fs2 advisory file lock on startup (#2600) 2019-02-19 13:23:12 +00:00
Antioch Peverell
5dc01b3de6
debug how long it takes to verify the kernel sums for fast sync (#2602) 2019-02-19 13:22:26 +00:00
Jeremy Rubin
eafe730a65 refactor: allocation free cut through algorithms (#2567) 2019-02-19 10:02:59 +00:00
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
e-max
cbac14c135 fix deadlock between get_status and main loop (#2556)
* fix deadlock between get_status and main loop

* isolate all shared state in one struct in order to avoid deadlocks
2019-02-15 22:22:53 +01: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
2f5fbb3ce8 clean-up the txhashset zip file and temp folder (#2575)
* clean-up the txhashset zip file and temp folder
* adapt test_txhashset with the new zip_read function
* fix: the wrong folder when cleaning up old zips
2019-02-15 10:36:26 -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
Yoni Svechinsky
ee4eed71ea Feature/slate serialization (#2534)
* - Add backwards compatability
- Add hex serialization

* rustfmt

* rustfmt

* 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

* Windows TUI Fix (#2555)

* switch pancurses backend to win32

* revert changes to restore test

* compatibility fix + debug messages

* rustfmt

* Add content disposition for OK responses  (#2545)

* Testing http send and fixing accordingly

* add repost method into wallet owner api (#2553)

* add repost method into wallet owner api

* rustfmt

* 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-13 13:29:44 +00: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