Commit graph

827 commits

Author SHA1 Message Date
Quentin Le Sceller
cc9ffcc1ab Remove unused imports (#965) 2018-04-16 21:18:28 +00:00
hashmap
b28de95da4 Error handling using failure in API (#949)
This PR adresses #166
Error handling in wallet was ported to failure in https://github.com/mimblewimble/grin/pull/713
Using the same error model makes wallet code simpler and may simplify migration to Hyper.
2018-04-16 10:00:32 +01:00
chri2
ffa5bfe16f Update build.md (#960) 2018-04-16 09:58:50 +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
Yeastplume
ac8ba4bd4a
Stratum config tweak (#958)
* don't require stratum server config

* don't require stratum server config
2018-04-13 14:58:25 +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
jaspervdm
8f3fbe632f Add total kernel offset to block api (#954) 2018-04-12 18:09:03 +00:00
Yeastplume
1c5aee68bf
refactor grin crate into separate modules (#955) 2018-04-12 10:11:24 +01:00
hashmap
8e26d4dbac 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.
2018-04-12 10:10:11 +01:00
Quentin Le Sceller
cbfd3803bf
Update simulation.md 2018-04-11 11:26:25 -04:00
Yeastplume
dcdf654bc9
[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
2018-04-11 10:02:07 +01:00
Quentin Le Sceller
cf2ffbc11a 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
2018-04-10 19:29:55 +00:00
Antioch Peverell
4d6e0378fe Introduce extending_readonly to simplify a forcing and cancelling rollbacks (#945)
readonly views of the txhashset
2018-04-09 16:37:46 +00:00
Quentin Le Sceller
cb221ee102 Add support for DNS Seed (#940)
* Add support for DNS Seed
* Add port
* Add seed.grin-tech.org
* Remove duplicate IPs
2018-04-07 03:48:42 +00:00
Ignotus Peverell
65d5bd40e3
Fix 33c5a983 2018-04-06 19:03:57 +01:00
Ignotus Peverell
33c5a9835a
Avoid double-locking on add eviction. Fixes #936 2018-04-06 18:46:07 +01:00
Antioch Peverell
bc6342ea65 Fix issue where we have no metadata for a block (#938)
when restarting node before initial sync completed
2018-04-06 17:14:50 +00:00
Quentin Le Sceller
b9de134209 Full sync ask blocks only from other archival nodes (#930)
* Request body_sync only from archival node
* Move verification to p2p crate
* Additionnal check on capabilities
* Add check block 1
2018-04-06 03:06:34 +00:00
Simon B
98efaf88df mixed small stuff (#934)
* documentation and spelling
* unused values in tests; just .unwrap()
* unneeded macro_use (router)
* unneeded macro_use and use-imports
* unused value -> .unwrap
* unused variables
* clarify that " is required (see 107ea3c4dd)
* first steps to dig into #933 test_p2p issues
* less simulnet build warnings
2018-04-05 23:31:34 +00:00
Antioch Peverell
6ceed79c03 Use hashable_ord on short_ids (#932) 2018-04-05 15:48:30 +00:00
Ignotus Peverell
c460f9876a
Improvements to orphan handling to help sync (#931)
Our chain orphans data structure now does:

* Eviction based on a max total number of orphaned blocks
* Evicts further away first, then too old
* Avoids all cloning (blocks can be big)

This allows sync to be a little more stupid, only reducing the
number of blocks it requests when orphans get nearly full.

Fixes #897
2018-04-05 03:24:43 +00:00
Ignotus Peverell
f247bda834
async mode by default 2018-04-04 22:01:49 +01:00
Quentin Le Sceller
68e2fa3915 Randomize Dandelion timer (#928) 2018-04-04 17:14:58 +00:00
Riccardo Casatta
40212942da use std lib function in pmmr for all_ones() and most_significant_pos() (#924)
* use std lib function in pmmr for all_ones() and most_significant_pos()

* fix all_ones() edge case with 0 and add comparison tests with old functions
2018-04-04 13:25:03 +01:00
hashmap
ac979d021d Build index header by height after fast sync (#925)
Make sure that all headers are indexed
2018-04-04 04:45:45 +00:00
Ignotus Peverell
85ee5041aa
Sync improvements (#923)
* Added additional message type size limits
* Externalize sync loop state, check if we received all
* Adjusted some message sizes, log error when too short
* 4x limits to give ourselves more space
* No need for sync to wait if we have enough peers.
* Tolerate a few less headers before considering we got them all.
2018-04-03 20:21:13 +00:00
Ignotus Peverell
0596b753a0
Added @tromp's idea of a server-facilitated interaction 2018-04-03 21:15:12 +01:00
Ignotus Peverell
c7cc91a8ea
First pass at wallet design doc 2018-04-03 20:14:01 +01:00
hashmap
923adf0fe5 Fix header_by_height (#922)
Currently for fast sync index header_by_height is created only for headers above the horizon
2018-04-02 23:10:30 +00:00
Ignotus Peverell
eefb4319f8
Fix buffer index in compact
Indexes used to be positions in the full file, not in the
intermediary buffer.
2018-04-02 21:49:35 +01:00
yeastplume
959b1d3e8d difficulty check error fix 2018-04-02 10:44:38 +01:00
yeastplume
5dc32a24ef async difficulty check 2018-04-02 10:08:29 +01:00
John Tromp
c3939107a5 Avoid repeated truncation in difficulty adjust + minor refactoring (#915)
* avoid repeated truncation in difficulty adjust + minor refactoring
* reinstate needed low-diffculty exception on dampening
* leave consensus breaking change for later one line change; obsolete lower testnet1 max target
2018-03-30 18:21:06 +00:00
Ignotus Peverell
3d2796bdd6
Minor log cleanup 2018-03-30 18:22:01 +01:00
Ignotus Peverell
cb0e0c4863
Merge branch 'master' of github.com:mimblewimble/grin 2018-03-30 18:09:22 +01:00
Yeastplume
50856b4cce
average over last 59 blocks (#917) 2018-03-30 11:50:29 +01:00
Ignotus Peverell
5ba0dbf38d
Fix and cleanup of fast sync triggering logic (#916)
* Fix and cleanup of fast sync triggering logic
* New txhashset on fast sync has to be applied, not rolled back
* Do not block if peer send buffer is full, fixes #912
2018-03-30 06:02:40 +00:00
Ignotus Peverell
107ea3c4dd
Disable every-block full state validation
We can re-enable it on some nodes to keep an eye on the network,
but for debug builds this is too expensive. It can take over 60
sec for low-end environments, causing them to never catch up.

I think this is still better than the alternative of telling
everyone to run release builds.
2018-03-29 18:29:25 +01:00
Simon B
3e3fe6cae6 Testnet2 small fixes (#899)
* add hint for gcc-5 for building CUDA plugin
* add N_BLOCks comment for >=6GB GPU cards
* minor logging cleanup
* mark to be kept + reformat as "@ height [hash]"
* show CuckooNN + better wording
2018-03-29 15:56:46 +00:00
Yeastplume
ea9a978c87
Tui update 1 (#911)
* minor low-hanging TUI updates

* rustfmt

* make diff/height output clearer
2018-03-29 12:29:17 +01:00
Yeastplume
0fe27cc4e8
update cuckoo miner with latest from upsteam (#910) 2018-03-29 11:03:53 +01:00
Ignotus Peverell
2067c24de1
Wallet external config cleanup 2018-03-29 00:49:37 +01:00
Ignotus Peverell
c3cec63a95
Use a sync channel for peer sending. Fixes #904 2018-03-29 00:00:34 +01:00
Quentin Le Sceller
b4308e9075 Cleans the wallet awaiting confirmation when destination is incorrect. Fix #900 (#902) 2018-03-28 16:36:10 +00:00
Ignotus Peverell
bfb3505183
Fix strict time progression in miner 2018-03-28 07:21:07 +01:00
hashmap
083d4564c3 Log ping/pong only in case of a discrepancy (#893)
Not a fix for #888 but related
2018-03-27 21:33:13 +00:00
Yeastplume
19bedff664
Difficulty scenario fix (#892)
* fix difficulty scenario to match testnet2

* fix difficulty scenario to match testnet2
2018-03-27 22:11:52 +01:00
Antioch Peverell
696097370e
do not save header during header first sync (#891)
just use the header as a hint to go request the block
2018-03-27 16:48:09 -04:00
Ignotus Peverell
09a4c454fa
Header check before asking previous on orphan not needed. Fast sync now properly keeps the syncing flag on. 2018-03-27 19:56:35 +01:00