Commit Graph

686 Commits

Author SHA1 Message Date
keorn
8d256b223d Fix rebroadcast panic (#4084)
* fix

* fix compile

* remove peers trace

* simplify

* Fixing 'simplify'
2017-01-09 12:41:19 +01:00
Tomasz Drwięga
4c94878cf7 Sending transactions in chunks. (#4089) 2017-01-09 11:20:02 +01:00
Tomasz Drwięga
71e6e24a1f Improving logs for transactions sync and disable re-broadcasting while syncing (#4065)
* Improving logs for transaction propagation

* Propagate only on timer
2017-01-08 17:12:17 +01:00
Tomasz Drwięga
1b93d79a90 Re-broadcast transactions to few random peers on each new block. (#4054)
* Introduce predictable randomness in tests

* Re-broadcasting to few peers
2017-01-06 10:38:49 +01:00
Robert Habermeier
e6324a83f1 Merge branch 'master' into lightsync 2016-12-28 15:53:11 +01:00
Robert Habermeier
fe1f542c4f Owning views of blockchain data (#3982)
* owning views of blockchain data

* port blockchain and client traits to owning views

* fix ethcore tests

* use strong headers and bodies in ethcore_light

* port ethsync to use owning views

* port rpc to owning views

* port parity informant and blockchain export
2016-12-28 12:44:51 +00:00
Robert Habermeier
592a3ac623 Merge pull request #3974 from ethcore/mock-net
make test network generic over peer type
2016-12-28 13:32:06 +01:00
Robert Habermeier
80eae8cc49 remove some old (unused/duplicate) files (#3975) 2016-12-27 12:41:22 +00:00
Robert Habermeier
8125b5690c Port try macro to new ? operator. (#3962)
* initial untry sweep

* restore try in ipc codegen, fix inference

* change a few missed try instances
2016-12-27 12:53:56 +01:00
Robert Habermeier
84219a0094 make test network generic over peer type 2016-12-27 11:23:57 +01:00
Arkadiy Paronyan
5a3c3bcb45 Sync reorg up to history size (#3874)
* Allow sync reorg up to pruning history size

* Peer difficulty tracking

* Abort downloading block if received with NewBlock

* Set pruning history to 1200

* Renamed history size field
2016-12-23 18:43:40 +01:00
Robert Habermeier
d0194f3ad3 Merge branch 'master' into lightsync 2016-12-23 13:39:06 +01:00
Nikolay Volf
af501e6467 Custom attribute for binary serialization (#3922)
* derive(Binary) -> binary

* ethcore types refact

* fixup ethcore

* make binary optional

* fix common types

* fix updater

* remove condition
2016-12-21 15:09:35 +01:00
Robert Habermeier
a48435ca60 Merge branch 'master' into lightsync 2016-12-19 13:15:37 +01:00
Robert Habermeier
d765611050 allow queue to drain fully when idle 2016-12-19 12:41:00 +01:00
Robert Habermeier
ccdf5d5873 increase tick timer and limit peers to one req 2016-12-19 12:28:42 +01:00
Robert Habermeier
893892ca12 remove request limiting from sync service 2016-12-17 00:31:21 +01:00
Robert Habermeier
be914ddfc7 fix check for moving backwards 2016-12-16 23:53:36 +01:00
Robert Habermeier
e57ab96731 fix reverse start block check 2016-12-16 23:21:59 +01:00
Robert Habermeier
08587a1f56 fix subchain request ordering 2016-12-16 23:21:51 +01:00
Robert Habermeier
653363c572 limit to one pending request per peer 2016-12-16 23:21:17 +01:00
Robert Habermeier
a7505be627 fix deadlocks 2016-12-16 22:09:29 +01:00
Robert Habermeier
8b88ef1844 add light sync service to ethsync 2016-12-16 17:38:16 +01:00
Robert Habermeier
f85313fbff Merge branch 'master' into lightsync 2016-12-16 15:29:11 +01:00
Robert Habermeier
ce84215d93 naive and bad request dispatcher 2016-12-16 15:26:39 +01:00
arkpar
65f07e5aa7 Renamed some functions 2016-12-16 14:54:26 +01:00
Robert Habermeier
0d7b638a2d ancestor search response handler 2016-12-16 14:53:36 +01:00
arkpar
6c9de9e6f8 Merge branch 'master' of github.com:ethcore/parity into tx-block 2016-12-16 13:36:07 +01:00
Gav Wood
6e5a583cb4 Merge pull request #3505 from ethcore/check-updates
Auto-updating
2016-12-16 13:01:49 +01:00
Gav Wood
b437265082
Fix build. 2016-12-16 11:27:00 +01:00
Gav Wood
396ab5b361
Refactor and make is_syncing. 2016-12-16 10:31:10 +01:00
Robert Habermeier
a1f32de2d9 Merge branch 'master' into lightsync 2016-12-15 23:55:04 +01:00
keorn
447196398a fix start_step 2016-12-15 23:36:06 +01:00
Robert Habermeier
8622ab66dc skeleton for maintain_sync: all but dispatch 2016-12-15 22:42:24 +01:00
Robert Habermeier
9c7340307e handle events, minimal state machine 2016-12-15 21:51:08 +01:00
arkpar
f8961484c1 Merge branch 'master' of github.com:ethcore/parity into tx-block 2016-12-15 19:10:33 +01:00
Robert Habermeier
5346539ef8 minimal header import and client service 2016-12-15 18:47:26 +01:00
arkpar
2952ea1b85 Delayed transactions 2016-12-15 18:19:19 +01:00
Robert Habermeier
f776f48023 drain prepared headers from sync round 2016-12-15 17:33:25 +01:00
Robert Habermeier
71e96aca10 handle abandoned requests 2016-12-15 16:19:28 +01:00
Robert Habermeier
ec88a992e3 provide response context to response handler 2016-12-15 15:50:36 +01:00
Jaco Greeff
054a6a9daf Merge branch 'master' into check-updates
# Conflicts:
#	.gitlab-ci.yml
#	js/webpack/dev.server.js
2016-12-15 13:52:28 +01:00
Robert Habermeier
5d8bfd8758 handle responses for round scaffold and frames 2016-12-15 13:05:38 +01:00
Robert Habermeier
0768a61944 light: add LightChainClient trait 2016-12-14 23:26:15 +01:00
Robert Habermeier
1bcfc9348d light: specialize Downloader to SyncRound 2016-12-14 23:25:51 +01:00
Robert Habermeier
91b8fa7039 light: downloader state machine stub 2016-12-14 22:57:30 +01:00
Robert Habermeier
0d466fa8d0 light: tests for response module 2016-12-14 20:27:03 +01:00
Robert Habermeier
887bcfb88a light: response decoding and verification module 2016-12-14 19:36:48 +01:00
Robert Habermeier
359d433292 light: pass incoming responses to peer state machine 2016-12-13 22:26:06 +01:00
Robert Habermeier
6fb71527e4 light: search for common ancestor with peers 2016-12-13 21:09:57 +01:00
Robert Habermeier
8c64400654 light: change sync module name 2016-12-13 21:09:43 +01:00
arkpar
49ae375605 Don't coneect peers on each sync 2016-12-13 13:23:10 +01:00
Robert Habermeier
c2264bed27 light: skeleton for sync service 2016-12-13 00:08:39 +01:00
keorn
fa504e510f Merge branch 'master' into auth-bft 2016-12-12 21:28:46 +01:00
keorn
19adb84527 TestNet flushing and cleanup 2016-12-12 19:44:24 +01:00
keorn
722cd4d086 AuthorityRound fork test 2016-12-12 17:24:48 +01:00
Gav Wood
ab4d666681
Merge remote-tracking branch 'origin/master' into check-updates 2016-12-12 16:35:11 +01:00
keorn
8ed89bb74f propagate proposal to all peers 2016-12-12 13:00:51 +01:00
Gav Wood
c0a2d5c8f5 Merge pull request #3796 from ethcore/tx-broadcast
Avoid broadcasting transactions to peers that send them
2016-12-12 04:13:56 +01:00
Gav Wood
94f5501c61
authors & homepage => Parity 2016-12-11 19:43:58 +01:00
Gav Wood
58b72c521d
Rename ethcore -> parity in licenses. 2016-12-11 19:31:31 +01:00
Gav Wood
17cc2be4b5
Rename ethcore -> parity in license. 2016-12-11 19:30:54 +01:00
Gav Wood
10b0898bdf
Crate tidyups.
- Move Updater into its own crate.
- Change ethcore -> parity in authors, homepages and licenses.
2016-12-11 19:14:42 +01:00
keorn
a4bf914683 Merge branch 'auth-bft' of https://github.com/ethcore/parity into auth-bft 2016-12-11 18:23:54 +01:00
Tomasz Drwięga
b56f12adc6 Merge branch 'master' into tx-broadcast
Conflicts:
	ethcore/light/src/net/context.rs
	ethcore/light/src/net/tests/mod.rs
2016-12-11 17:31:56 +01:00
Gav Wood
e09b1faf20
Fix semver version issues. 2016-12-11 17:13:26 +01:00
arkpar
c777362d02 Sync channel for consensus test 2016-12-11 12:32:01 +01:00
Tomasz Drwięga
19ca9ad460 Prevent broadcasting transactions to peer that send them. 2016-12-10 21:22:19 +01:00
keorn
f3af0f46be Merge branch 'master' into auth-bft 2016-12-10 18:14:35 +01:00
keorn
1611d190ba initial tendetmint consensus test 2016-12-10 17:40:53 +01:00
Tomasz Drwięga
aaf6da4c00 Returning persistent node id 2016-12-10 16:55:29 +01:00
Robert Habermeier
a6fcd8a0d9 Merge pull request #3794 from ethcore/net-fix
Network connectivity fixes
2016-12-10 16:55:17 +01:00
Tomasz Drwięga
704054ef40 Merge branch 'master' into tx-broadcast
Conflicts:
	ethcore/src/client/traits.rs
2016-12-10 15:23:53 +01:00
Tomasz Drwięga
e1ade5b375 Maintaining a list of transactions propagated from other peers 2016-12-10 15:18:44 +01:00
arkpar
02c788a403 Network connectivity fixes 2016-12-10 14:20:34 +01:00
Gav Wood
82efa2675e
Merge remote-tracking branch 'origin/master' into consistent-id 2016-12-10 13:36:30 +01:00
keorn
e5f8044cad Merge branch 'master' into auth-bft 2016-12-10 11:01:23 +01:00
Gav Wood
5f1fcf95e0
Make *ID names consistent with std Rust (Id) 2016-12-09 23:01:43 +01:00
Robert Habermeier
503b126c93 Merge branch 'master' into lightserv 2016-12-09 21:37:55 +01:00
arkpar
97f358ced9 AuthorityRound network simulation test 2016-12-09 20:38:06 +01:00
arkpar
ca7406773f AuthorityRound network simulation test 2016-12-09 19:27:16 +01:00
keorn
762e5f1e3e proposed block sync tests 2016-12-09 12:05:56 +01:00
Robert Habermeier
e7ce8c9558 light: broadcast status updates to peers 2016-12-08 23:57:09 +01:00
Robert Habermeier
6f5f1f5e26 light: integrate with sync + serve_light CLI 2016-12-08 23:21:47 +01:00
Robert Habermeier
efd66f566d ethsync: optional ipc codegen 2016-12-08 19:52:48 +01:00
keorn
3ebfa1481d better proposal block handling 2016-12-08 12:03:34 +01:00
Robert Habermeier
cdc758368a les: flesh out event handler 2016-12-07 13:52:45 +01:00
keorn
6fc943ca6d Merge branch 'master' into auth-bft 2016-12-05 16:37:35 +00:00
Gav Wood
43ec3d8f79
network_id -> u64 2016-12-05 06:54:31 -08:00
keorn
c946ffebf3 Merge branch 'master' into auth-bft 2016-12-05 11:30:11 +00:00
arkpar
4eca687bbb Fixed network context 2016-12-01 15:49:26 +01:00
arkpar
b7dc60ace5 Don't share the snapshot while downloading old blocks 2016-11-30 23:33:17 +01:00
arkpar
84cf27c3ef Advertise protocol version 2 2016-11-30 16:48:30 +01:00
keorn
61f1699c0e fix merge 2016-11-30 13:39:28 +00:00
keorn
155da50fcd Merge branch 'master' into auth-bft 2016-11-30 13:06:21 +00:00
Gav Wood
d525a6d7f0 Merge pull request #3654 from ethcore/clippy-bump
Bumping clippy
2016-11-29 18:00:13 +01:00
arkpar
95f81b2a2f Moved consensus networking into Parity handler 2016-11-29 16:54:30 +01:00
Gav Wood
7c2cccc60c Merge pull request #3655 from ethcore/sync
Disable peer if no common block found
2016-11-29 12:10:19 +01:00
Tomasz Drwięga
44314c5d02 Merge branch 'master' into clippy-bump
Conflicts:
	rpc/src/v1/types/filter.rs
2016-11-29 11:56:55 +01:00
Tomasz Drwięga
64b1b898f1 Fixing compilation on stable 2016-11-28 17:43:38 +01:00
arkpar
bae8acee74 Allow pv62 peers 2016-11-28 17:24:02 +01:00
arkpar
cf5b409fed Disaable peer if no common block found 2016-11-28 16:30:36 +01:00
Tomasz Drwięga
2b3d100de2 Fixing some clippy warnings 2016-11-28 15:54:22 +01:00
Tomasz Drwięga
e1e7886918 Bumping clippy 2016-11-28 12:23:06 +01:00
keorn
a143da2cb8 fix complete build 2016-11-25 11:36:25 +00:00
keorn
1692c07ba6 Merge branch 'master' into auth-bft 2016-11-25 10:51:06 +00:00
arkpar
7da8f019d5 --no-ancient-blocks 2016-11-22 18:15:55 +01:00
keorn
6e0bd4072b Merge branch 'master' into auth-bft 2016-11-21 12:17:00 +00:00
Gav Wood
0848a9ec3c
Merge branch 'master' into transactions-propagate 2016-11-20 13:24:08 +01:00
Arkadiy Paronyan
9c62dd3916 Limit sync reorg to 20 blocks (#3519)
* Limit sync reorg

* Fixed tests
2016-11-18 19:17:35 +01:00
Arkadiy Paronyan
51012d1fae Revert "Limit sync reorganization to 20 blocks" (#3517) 2016-11-18 17:50:27 +01:00
Arkadiy Paronyan
15702a875c Limit sync reorg (#3509) 2016-11-18 17:45:00 +01:00
keorn
9d61071dd7 Merge branch 'miner-no-ap' into auth-bft 2016-11-17 22:04:07 +00:00
Tomasz Drwięga
5c62e38a7c Cleanup 2016-11-17 13:52:09 +01:00
arkpar
d890dd6f42 Updated sync algo desription 2016-11-17 13:02:44 +01:00
arkpar
5bddcd8003 Sync bandwidth optimization 2016-11-16 19:34:58 +01:00
keorn
3b0d5503b1 fix compilation 2016-11-16 13:13:21 +00:00
Tomasz Drwięga
78b5c743f6 Stats RPC 2016-11-16 13:54:58 +01:00
Tomasz Drwięga
4febd0eb93 Maintaining the statistics for propagation of pending transactions 2016-11-16 10:45:55 +01:00
keorn
d19e8c5505 Merge remote-tracking branch 'parity/master' into bft 2016-11-15 10:26:37 +00:00
Tomasz Drwięga
8dc7fcbe07 Don't clear propagated transactions 2016-11-15 11:20:54 +01:00
Robert Habermeier
37f49aac1b abort snapshot restoration faster (#3356)
* abort snapshot restoration faster

* flag-checking tests
2016-11-13 13:52:53 +01:00
Robert Habermeier
3854b8a689 LES Part 1 (#3322)
* stub implementations of light client trait

* Light provider trait

* light client sync stubs

* LES boilerplate

* stub implementation of provider for client

* skeleton and request traits

* request definitions

* new_list -> begin_list

* handle unknown packet

* revise light implementation strategy

* make verification module public

* Move all light client work to own crate

* experiment with answering requests

* buffer flow scaffolding

* remove LESv2 requests

* buffer flow basics, implement cost table

* begin status module

* implement handshake parsing and creation

* implement announcement serialization

* errors, punishment, and handshake

* handle announcements

* making announcements, clean up warnings

* allow dead code temporarily
2016-11-10 18:30:17 +01:00
Arkadiy Paronyan
eba0dd5023 Additional snapshot sync checks (#3318)
* Additional snapshot sync checks

* Proper checks

* Proper highset block check
2016-11-09 19:40:36 +01:00
keorn
ea960f1c27 Merge remote-tracking branch 'parity/master' into bft 2016-11-07 11:34:45 +00:00
Arkadiy Paronyan
d37f4cc82f v1.5 (#3195) 2016-11-04 17:27:11 +01:00
Gav Wood
d3de475205 EIPs 155, 160, 161 (#2976)
* The front-end for each hard-fork, also EIP-160.

* Address EIP161 a/c

* Include EIP-161b

* EIP-161 part d.

* Fix test build.

* Fix one test, add another.

* Fix use of bloom & renaming.

* Initial groundwork for EIP-155

* Fix minor bug.

* Fix all tests finally.

* Rest of EIP-155.

* Add tests for EIP-155 algorithm.

Update transaction tests validation.

* Minor reformat.

* Address grumbles.

* Remove unused code.

* Fix SUICIDE gas mechanism and add consensus tests.

* Remove commented code.

* Set Frontier hardfork block number

* Fix warning.

* Transaction tests,
2016-11-03 22:22:25 +01:00
keorn
36d17d5c28 Add RPC enode lookup (#3096)
* add enode rpc

* spaces -> tabs
2016-11-02 19:43:21 +01:00
Arkadiy Paronyan
b7bebdbc75 Restart sync if no more peers with snapshots (#3007) 2016-10-31 14:59:41 +01:00
Arkadiy Paronyan
6931878ff1 Networking and syncing tweaks (#2990)
* Reduce periodic snapshot delay

* Prevent connecting to peers over the min_peers limit

* Smaller block requests for slower connections
2016-10-30 15:39:36 +01:00
Arkadiy Paronyan
4ded10fcbe Fixed transaction propagation (#2984) 2016-10-30 12:19:20 +01:00
Tomasz Drwięga
f17cad9dff Fixing clippy warnings 2 (#2961) 2016-10-29 13:08:49 +02:00
Arkadiy Paronyan
9e82eeccfe Snapshot sync improvements (#2960)
* Status packet timeout

* Snapshot collection state

* Pause snapshot download

* Updated tests
2016-10-29 13:07:06 +02:00
Robert Habermeier
2806f1d4c9 Even more snapshot validity checks (#2935)
* clarify "cancelled periodic snapshot" message

* more rigorous checks for snapshot validity

* verify ancient blocks on import

* limit number of fed blocks

* make it possible to feed snapshot service canonical hashes

* fix failing test build

* swap ethash DAG only when more recent
2016-10-28 16:10:30 +02:00
Arkadiy Paronyan
3edd9e4bee Fixed GetNodeData output (#2892) 2016-10-27 15:25:54 +02:00
Arkadiy Paronyan
bdc372462a Change sync protocol ID (#2912) 2016-10-27 13:49:44 +02:00
Tomasz Drwięga
88997801d0 Clippy bump (#2877)
* Bumping clippy

* Fixing warnings

* Fix the "fix"
2016-10-27 08:28:12 +02:00
Arkadiy Paronyan
135d5d0e4c Snapshot fixes and optimizations (#2863) 2016-10-25 18:40:01 +02:00
keorn
8d0cff3599 Nicer port in use errors (#2859)
* dapps port

* rpc port

* signer port

* different instance as possible cause

* network port
2016-10-25 15:55:53 +02:00
Arkadiy Paronyan
1a5bae8ef1 Extended network options (#2845)
* More network configuration options

* Filter UDP requests

* Fixed tests

* Fixed test warning
2016-10-24 18:25:27 +02:00
Arkadiy Paronyan
9ec091e0cf Move snapshot sync to a subprotocol (#2820) 2016-10-24 16:24:35 +02:00
keorn
866ab9c7a3 Check queue to determine major importing (#2763)
* simplify major sync detection

* fix typos

* fix merge

* more realistic EthTester

* add new synced state

* remove Blocks synced state

* move is_major_importing to rpc crate and check queue

* add tests
2016-10-20 23:36:18 +02:00
Arkadiy Paronyan
7db42df1db Fixed stalled sync (#2747) 2016-10-20 12:56:37 +02:00
Arkadiy Paronyan
20e1d575da Frontport commits from beta to master (#2743)
* Remove count limit for local transactions (#2634)

* Fixed stalled sync
2016-10-20 00:33:00 +02:00
Robert Habermeier
146cefdb32 bump parking_lot to 0.3.x series (#2702) 2016-10-19 18:35:56 +02:00
keorn
aa52b04e31 Unify major syncing detection (#2699)
* simplify major sync detection

* fix typos

* fix merge

* more realistic EthTester

* add new synced state
2016-10-19 18:35:39 +02:00
Arkadiy Paronyan
487dfb0208 Snapshot sync part 2 (#2098)
* Split block downloader into a module

* Snapshot sync progress

* Warp sync CLI option

* Increased snapshot chunk and ping timeouts

* Fixed an issue with delayed writes

* Updated bootnodes

* Don't run pending IO tasks on shutdown

* Optional first_block; removed insert_snapshot_block

* Fixing expect calls

* Fixed stalled sync

* style and docs

* Update block_sync.rs

[ci:skip]
2016-10-18 18:16:00 +02:00
Svyatoslav Nikolsky
c9ce25c8f3 Added peers details to ethcore_netPeers RPC (#2580)
* added peers details to ethcore_netPeers RPC

* fixed build (traits autoimplemented)

* - documentation fixes
- spaces -> tabs
- Rust-way Option's handling

* prepare for new protocols in ethcore_netPeers

* commas & documentation
2016-10-12 20:18:59 +02:00
keorn
e343153f06 mixed merge and changes... 2016-10-11 18:37:31 +01:00
Arkadiy Paronyan
193cdb1326 Don't activate peers on connect; Test (#2537) 2016-10-10 23:05:41 +02:00