559 Commits

Author SHA1 Message Date
Antioch Peverell a22d98e9d5 bump working version on master to 4.2.0-alpha.1 (#3443)
we now have a current/4.1.x branch for 4.1.0 release
2020-09-15 17:26:44 +01:00
Antioch Peverell 655e080963 maintain preferred peer connections (#3435) 2020-09-08 08:22:19 +01:00
Antioch Peverell 7dc94576bd Introduce CommitOnly variant of Inputs (#3419)
* Introduce CommitOnly variant of Inputs.
Introduce CommitWrapper so we can sort commit only inputs correctly.

* rememebr to resort if converting

* write inputs based on variant and protocol version

* read and write protocol version specific inputs

* store full blocks in local db in v3
convert to v2 when relaying to v2 peers

* add debug version_str for inputs

* no assumptions about spent index sort order

* add additional version debug logs

* fix ser/deser tests for proto v3

* cleanup coinbase maturity

* rework pool to better handle v2 conversion robustly

* cleanup txpool add_to_pool

* fix nrd kernel test

* move init conversion earlier

* cleanup

* cleanup based on PR feedback
2020-09-07 16:58:41 +01:00
Antioch Peverell caa6b8c747 further tweaks to block_accepted logs for clarity (#3379)
* further tweaks to block_accepted logs for clarity

* fix tests

* depth based off prev_head
2020-08-20 17:28:35 +01:00
Antioch Peverell efece9e0c7 use sync pmmr for building locator (#3397) 2020-08-17 13:21:54 -04:00
Antioch Peverell 4732a0b62b convert tx for v2 compatibility on way into stempool/txpool (#3412)
cleanup passing extra_tx around

use output identifiers when converting tx to v2
2020-08-02 13:26:28 +01:00
Antioch Peverell 80841f16d2 pass slices around and not refs to vecs (#3404)
* pass slices around and not refs to vecs

* use slice.swap()

* use inputs() not body.inputs
2020-07-27 11:07:18 +01:00
Antioch Peverell 824c51a346 bump version to 4.1.0 on master (4.0.1 on 4.0.x branch) (#3390) 2020-07-13 12:16:43 +01:00
Antioch Peverell 32253194b5 log reorg (and fork) depth correctly (#3376)
* log reorg (and fork) depth correctly
depth should be based on "fork point" not prev head

* correct depth for fork/reorg (0 for alternate head etc.)
2020-07-08 09:02:28 +01:00
Antioch Peverell 30db9c410e bump master to 4.0.1-alpha.1 to differentiate from 4.0.0 official tagged build (#3374) 2020-07-02 15:51:11 +01:00
Yeastplume 7abe9fcb39 Versioning for 4.0.0 release (#3373) 2020-07-02 10:29:10 +01:00
Yeastplume 098d25e569 Version bump for 4.0.0-rc.1 (#3366) 2020-06-26 13:10:42 +01:00
Antioch Peverell 55a929e214 cleanup old unused code (#3355) 2020-06-15 15:05:47 +01:00
Antioch Peverell dd88d28a7a bump version to 4.0.0-beta.2 (#3351) 2020-06-12 14:08:12 +01:00
Antioch Peverell ce141bee29 chain stats should use head.hash() (#3348) 2020-06-10 22:41:50 +01:00
Quentin Le Sceller 093c500fed Cargo Update (#3338) 2020-06-08 17:15:32 -04:00
Boqin Qin 992d450e0a servers, util: fix deadlock caused by conflicting lock order (#3340) 2020-06-08 16:59:17 -04:00
Yeastplume c7c9a32b9b 4.0.0-beta.1 Version Bump (#3339) 2020-06-04 14:52:26 +01:00
Boqin Qin 450d235358 servers: fix possible deadlock (#3337) 2020-06-03 13:34:44 +02:00
Quentin Le Sceller d2d3e4c547 Remove compiler warning (#3331) 2020-05-21 13:08:01 -04:00
Quentin Le Sceller 5d0791bbd1 Add servers (#3315) 2020-05-21 13:07:28 -04:00
Quentin Le Sceller 28644a63cf Fix miminum share difficulty in Stratum Server (#3323) 2020-05-19 11:07:33 -04:00
Quentin Le Sceller e826cd82f9 Update (#3324) 2020-05-12 11:48:18 -04:00
hashmap 9e51e86538 Use generic types instead of trait objects in tx pool (#3308)
Tx pool takes some parameters as trait objects. It's not an idiomatic Rust code, in this particular case we should use generic types. Trait object makes sense when we accept in runtime different concrete types which implement the trait as a value of the same field. It's not the case here. Trait objects come with a price - instead of method dispatch in compile time we have to accept runtime dispatch. My guess we did it to not clutter the code with type parameters, which is understandable but still suboptimal.
2020-04-30 17:41:49 +02:00
Quentin Le Sceller be4779c923 Less cloning and pattern simplifications (#3305)
* Cleanup 
* Pattern simplification
2020-04-24 11:19:34 +02:00
hashmap 6556dd585d Pass byte slice to to_hex (#3307)
Currently we pass a Vec. This requires an extra allocation and copy of all elements if a caller doesn't have a Vec already, which is at least 95% of cases.
Another, a smaller issue, we have a function util::to_hex and some structs implement to_hex() on top of it, so we have a mix of it in the code. This PR introduces a trait and a blanket impl for AsRef<[u8]> which brings a uniform API (obj.to_hex()). One unfortunate case is arrays of size bigger than 32 - Rust doesn't implement AsRef for them so it requires an ugly hack (&array[..]).to_hex().
2020-04-24 11:18:26 +02:00
hashmap d8c6eef485 Refactor SyncState (#3297)
* Refactor SyncState

Method sync_error() retrun type was simplified.
update_txhashset_download() was  made type safe, which eliminates a runtime enum variant's  check, added an atomic status update
2020-04-20 12:30:04 +02:00
hashmap 0da88f7046 Don't swallow errors in body_sync (#3300)
We handle them inside but it makes the code more cluttered
2020-04-18 13:51:18 +01:00
MCM-Mike d7e6ac6cfe Update seed.rs (#3282)
added mainnet-seed.grinnode.live
2020-04-13 15:38:39 -04:00
Antioch Peverell bab9f41343 go back to storing header_head in the db (#3268)
* go back to storing header_head in the db

* simplify and cleanup
2020-04-10 16:12:53 +01:00
Yeastplume b73fc0bb9b Version bump for next development release 2020-03-02 12:27:16 +00:00
Yeastplume 533da2d192 version bump for 3.1.0 release (#3258) 2020-03-02 10:38:56 +00:00
Antioch Peverell ef755a5c49 bump to 3.1.0-beta.3 (#3252) 2020-02-28 12:42:08 +00:00
Antioch Peverell 5071084445 bump version to 3.1.0-beta.2 (#3244) 2020-02-27 09:35:44 +00:00
jaspervdm 6bca34c6a8 Update hyper/tokio/futures dependencies (#3214)
* Update hyper, tokio, futures versions

* Update stratum server

* Update API

* Update webhooks
2020-02-18 23:45:27 +01:00
Joseph Goulden 0d2e58e90e feat: allow DNS names in peers/seeds list and resolve them (#3125)
* feat: allow DNS names in peers/seeds list and resolve them

* tests: add mod for peer tests

* refactor: rename some variables

* chore: use Serde desrialize to resolve DNS names into PeerAddrs

* fix: compile

* fix: add back code to remove duplicate ip addresses from resolved DNS seeds
2020-02-14 14:58:57 +00:00
WhoNeedszZz b01ab44475 Resolve JSON RPC 2.0 non-compliance (#3213)
Currently, the JSON RPC requests and responses are not compliant with the spec as the server only accepts strings.
This change is *non-breaking* as it simply adds the ability to understand integers as expected.
Any old code continuing to only send string requests will continue to work as before.

Unit tests are included to ensure (de)serialization works on both strings and integers.
2020-01-29 09:44:33 -05:00
Quentin Le Sceller 83a2649946 Revert "Resolve JSON RPC 2.0 non-compliance (#3209)" (#3212)
This reverts commit 15278021dc.
2020-01-28 17:45:38 -05:00
WhoNeedszZz 15278021dc Resolve JSON RPC 2.0 non-compliance (#3209)
Currently, the JSON RPC requests and responses are not compliant with the spec as the server only accepts strings.
This change is *non-breaking* as it simply adds the ability to understand integers as expected.
Any old code continuing to only send string requests will continue to work as before.
2020-01-28 17:12:06 -05:00
Quentin Le Sceller 6e5afe496b Update License to 2020 (#3196) 2020-01-20 11:40:58 +00:00
hashmap c2026bd686 Remove unused crates (#3185)
* Remove unused crates

also bump minor versions in Cargo.lock
2020-01-15 11:34:14 +01:00
Yeastplume 2bf4080866 versioning for master 2019-12-20 11:13:39 +00:00
Yeastplume 266af4e91f version bump for master 2019-12-20 11:07:58 +00:00
Yeastplume a50200799b version bump (#3174) 2019-12-19 16:24:02 +00:00
Yeastplume 2f8a1f2712 Versioning for 3.0.0-beta.2 (#3170)
* versioning for beta build

* Cargo.lock
2019-12-12 20:37:50 +00:00
Joseph Goulden 5c7bc3d8cd fix(TUI): Selected column and selected row of table are now preserved when set_items() is called (#3161) 2019-12-10 19:21:03 +00:00
Antioch Peverell b5f73b6aab try_header_head in the syncer loop with a short timeout (#3165)
to prevent it getting locked up after txhashset download and validation
2019-12-10 16:16:59 +00:00
Yeastplume 6a54334576 Version bump for beta.1 (#3159) 2019-12-06 12:01:53 +00:00
Quentin Le Sceller cdb2d6c72c Node API v2 (#3094)
* Node API v2

* Update gitignore

* Add get_pmmr_indices method

* Add Foreign and Owner API each one with specific secret

* Fix failing tests

* Revert to 'Option<u64>'
2019-12-06 10:57:53 +00:00
Antioch Peverell 78220febed use try_read_for() with timeout for tui status updates (header and pool stats) (#3129)
* use try_read_for with timeout for tui status updates (header and pool stats)

* rework based on feedback
2019-11-22 12:46:07 +00:00