Commit Graph

1328 Commits

Author SHA1 Message Date
jaspervdm 5afca1697b Change network code for extended keys (#1743) 2018-10-15 11:40:53 +01:00
yeastplume 9423865f92 update cargo versioning 2018-10-15 10:34:33 +00:00
Yeastplume 13facfac4b pre-testnet4 genesis values (#1744) 2018-10-15 11:14:49 +01:00
Gary Yu 3b0006934e suppress the test error of test_start_api (#1740)
* Use secp crate directly without extra use statement (#1738)

(cherry picked from commit 80d28f94ea)

* suppress the test error of test_start_api. Note: this is not a fix.

(cherry picked from commit 6f29685daf)
2018-10-14 21:15:38 +08:00
Gary Yu 2e6a242827 small improvement on the servers test (#1737)
* cherry-pick from master for #1736
2018-10-14 20:13:49 +08:00
Ignotus Peverell 43f4f92730 [T4] Secondary proof of work difficulty adjustments (#1709)
* First pass at secondary proof of work difficulty adjustments
* Core and chain test fixes
* Next difficulty calc now needs a height. Scaling calculation fixes. Setting scaling on mined block.
* Change factor to u32 instead of u64.
* Cleanup structs used by next_difficulty
* Fix header size calc with u32 scaling
2018-10-13 13:57:01 -07:00
Gary Yu e9f62b74d5 [T4] change compaction check trigger to 1 day and cut_through_horizon to 1 week (#1721)
* change chain compaction trigger from 2000 to 10080
* change CUT_THROUGH_HORIZON from 2 days to 1 week
* roll the dice to trigger the compaction
2018-10-13 09:34:16 -07:00
Gary Yu 9a716aea72 feature: txhashset downloading progress display on tui (#1729) (#1730)
(cherry picked from commit 5c0eb11a7d)
2018-10-13 10:12:13 +08:00
Antioch Peverell 4dff68ab61 Remove kernel sum header (#1723)
We maintain this locally in block_sums in the db (sums can be rebuilt from local data)
2018-10-12 18:15:29 -07:00
Ignotus Peverell 805cc24e73 Removed kernel sum from header. Fixes #1568 2018-10-13 00:57:08 +00:00
Antioch Peverell df0dc91891 Chain init reset sync head (#1724)
* fix: binary auto release feature broken (#1714)

* fix a mistake on script

* reset_sync_head on setup_head, no need for reset_head
2018-10-11 12:28:07 +01:00
Gary Yu d3589d1bf5 small speed optimization for header sync (#1719) 2018-10-11 16:47:27 +08:00
Gary Yu 4f462cdfdc fix: avoid a confusing log when fastsync start (#1720) 2018-10-11 12:38:13 +08:00
Yeastplume d756da062a [T4] warning cleanup (#1713)
* clean up warnings
* rustfmt
2018-10-10 08:56:15 -07:00
jaspervdm e69b2ace70 [T4] Update transaction schematic (#1712)
* Update transaction schematic

* Fix typo
2018-10-10 11:28:36 +01:00
Yeastplume 6c8c483172 [T4 ONLY] BIP32 Wallet Compliance - Aggsig Updates - Bulletproof Updates (#1501)
* change keychain to use bip32 paths

* convert keychain to use bip32

* change identifier to be serialisation of 4-level bip32 path

* wallet changes compiling, pass parent key into all wallet functions

* rustfmt

* fix tests in chain

* rustfmt

* core tests passing

* rustfmt

* pool tests

* rustfmt

* fixing wallet tests

* rustfmt

* remove file wallet

* wallet tests compiling

* rustfmt

* remove db_migrate

* successful tx exchange test using BIP32 paths

* rustfmt

* fix wallet derivation paths to m/0/0/0

* wallet test fixed again, working with default path

* rustfmt

* fix server tests

* rustfmt

* make parent_id a trait on walletbackend

* rustfmt

* add ability for wallet to switch between multiple named accounts, and tests (not complete)

* rustfmt

* account switching tests in place and passing

* rustfmt

* compile and test with latest libsecp changes

* added public key sum to calculated e for aggsig

* rustfmt

* Update secp to 26

* bulletproof bip32 path integration

* rustfmt

* wallet restore updated with bip32 paths, also restores accounts

* rustfmt

* rustfmt

* remove old extkey

* remove old extkey

* rustfmt

* add wallet account commands

* rustfmt

* update wallet documentation

* rustfmt

* merge from master

* update libsecp tag

* merge from upstream and fix server test

* rustfmt

* rustfmt

* merge from master

* update latest libsecp merge

* fix commitment to zero value generation
2018-10-10 10:11:01 +01:00
Yeastplume 92f826a917 [T4 ONLY] T4 PoW changes (#1663)
* T4 PoW changes

* rustfmt

* adjust sizeshift depending on pow type during ser/deser

* update block size tests for cuckatoo sizeshift
2018-10-10 10:09:44 +01:00
Gary Yu fa656ca44a chain difficulty_iter don't need a WriteTransaction batch (#1710) 2018-10-10 16:49:07 +08:00
Gary Yu 009baa1b91 fix: panic at get_locator (#1711) 2018-10-10 16:48:41 +08:00
Gary Yu 0a96949fd6 docs: contributing.md twitter link for the council (#1708) 2018-10-10 09:52:06 +08:00
wimel 991cffd0c7 Translate intro.md to spanish (#1707)
* Create intro_ES.md, translate intro.md to spanish

* Create fast-sync_ES.md, translate fast-sync.md to spanish
2018-10-10 08:10:23 +08:00
Antioch Peverell d10f373911 Batch cache (#1706)
* leverage the cache for reads via the batch
add additional block_sums cache

* rustfmt
2018-10-09 22:48:21 +01:00
Antioch Peverell 4a1e3c27bb sleep for 10s in syncer when not syncing (#1705) 2018-10-09 21:50:55 +01:00
Ignotus Peverell 01735544ac Readme twitter link for the council 2018-10-09 18:39:34 +00:00
wimel eee16c3e48 Create build_ES.md (#1703) 2018-10-09 16:55:05 +01:00
Antioch Peverell a676eb1b39 Replace RefCell with RwLock in OneTime (and cleanup Weak usage) (#1694)
* rustfmt

* use RwLock in OneTime (and not RefCell)

* rustfmt

* put weak refs back and cleanup

* rustfmt

* revert weak in adapters
2018-10-09 16:53:57 +01:00
nimbosa 02c30cb302 docs: fix broken link: slightly slighted api.md (#1704)
* Update table_of_contents.md
2018-10-09 09:50:31 -04:00
hashmap 8ee8043fd9 Use constant-time token verification in API (#1690)
Fixes #1641. The size of the token can be leaked, even if we pad or cut user's input we can't make it indistinguishable form the normal case.
2018-10-09 09:32:53 -04:00
Gary Yu 7e7697bf4b fix: always put txhashset.write before store.batch to avoid dead lock (#1699)
* fix: to avoid dead lock, always put txhashset.write before store.batch

* fix: move txhashset.write behind store.batch
2018-10-09 20:38:36 +08:00
Gary Yu 23180d6f86 a checking of is_on_current_chain on body sync don't need a batch (#1696) 2018-10-09 20:37:06 +08:00
Antioch Peverell 8cfe9e64ac Remove RwLock around individual peer instances (#1673)
* get rid of RwLock around peer instances

* rustfmt

* rename stuff to live_info

* rustfmt

* serialize into PeerInfoDisplay
limit live_info write lock to peer_info.update()
rename to PeerLiveInfo

* simplify broadcast logic a bit more
connected peers are connected by definition

* return true/false on broadcast so we can send to more peers

* rustfmt

* fix p2p and server tests for PeerInfoDisplay

* commit
2018-10-09 08:27:34 +01:00
Gary Yu 536b905690 Take again the Travis-CI double speed optimization and plus fix (#1687)
* restore the script from pr#1647
* fix: build failure need return the error code
* fix: semicolon can't dismiss
2018-10-08 15:59:54 -07:00
Antioch Peverell 770aca9a2d check_known_mmr is the source of our deadlock - blitzing it for now (#1691) 2018-10-08 16:44:05 +01:00
Antioch Peverell de5b6868fb Add last_seen to peer info (#1688)
* add last_seen to peer and update on ping/pong
expose last_seen in tui

* rustfmt

* chrono serde features
2018-10-08 13:39:52 +01:00
Gary Yu fd2eda2308 small improvement on the capabilities config comments (#1689) 2018-10-08 20:35:48 +08:00
hashmap 810a71451b Merge pull request #1665 from yourowncrypto/rustls
Support pem TLS certificates
2018-10-08 12:46:44 +02:00
Antioch Peverell 3eb64af1ef Spit chain and peer lmdb envs (#1680)
separate files on disk
separate transactions (batches)
2018-10-07 10:25:12 -07:00
Gary Yu 1a6101f870 refactor: remove thread p2p-moniter, move the Ping to the connect_and_monitor (#1670) 2018-10-07 10:24:06 -07:00
Antioch Peverell acf61db463 skip rangeproof and kernel signature verification unless we are doing a "full" chain validation (#1678) 2018-10-07 13:39:40 +01:00
Gary Yu 463567b19e optimization of peer state write lock (#1669)
* optimization of peer state write lock
2018-10-07 13:01:32 +08:00
Gary Yu 296e912a1f fix: a missed crate in pow lean test (#1677)
fix: a missed crate in pow lean test
2018-10-07 11:27:35 +08:00
Gary Yu 1b4885eedd revert travis-ci speed optimization for regression issue (#1676)
* revert travis-ci speed optimization for regression issue

* remove osx
2018-10-07 10:25:22 +08:00
Gary Yu a37f7bbcab improvement on peer lock for ping/pong (#1668)
* peer lock optimization for ping/pong
* is_banned peer lock use read lock instead of write
2018-10-07 08:00:53 +08:00
Antioch Peverell 60ef7268ba cleanup mine_block difficulty_iterator usage (#1674)
* take care with diff_iter (contains an active lmdb batch)

* rustfmt
2018-10-06 21:06:02 +01:00
Antioch Peverell c86578c2a9 Peers broadcast fixes (#1667)
* peers broadcast fixes
* stop at num_peers...
2018-10-05 16:53:55 -07:00
Ignotus Peverell 7f2e2158c8 Reduce the scope of the chain new block lock (#1666)
When processing a new block, attemps to make the scope of the
corresponding `txhashet` lock as small as possible. The idea is
to avoid bad interactions with orphan locks or block post
processing (i.e. adapter events, etc)
2018-10-05 12:17:58 -07:00
Ignotus Peverell 8bb7b5fbb9 Breaking down sync into multiple structs and files (#1660)
* Fix for body sync to only run when state sync is off or done
2018-10-05 10:40:13 -07:00
Ignotus Peverell ffe6682ce9 Merged upstream 2018-10-05 16:15:48 +00:00
hashmap 28b0acc0e6 Support pem TLS certificates
Mostly to support let's encrypt. It requires to switch from native-tls and friends to rustls and friends, which perhap is a good thing per se, rustls looks more modern and for sure more Rusty.
Alternative would be manually convert pkcs12 certificates to pem, which requires openssl tools to be installed and make transparent integration whith let's encrypt much harder (this is out of the scope for now, perhaps in near future)
2018-10-05 17:09:19 +02:00
hashmap 888ce24d17 Merge pull request #1664 from garyyu/fix1015
fix: seed thread panicked on a try_read unwrap
2018-10-05 15:39:16 +02:00