149 Commits

Author SHA1 Message Date
Carl
cd2d50e06c Changed transition to restart Rpu rather than modify bank to prevent lock contention 2018-09-19 10:48:05 -06:00
Carl
b10de40506 Made LEADER_ROTATION_INTERVAL settable so that integration tests don't time out 2018-09-19 10:48:05 -06:00
Carl
2030dfa435 Implement PR comments, tidy up 2018-09-19 10:48:05 -06:00
Carl
bfe64f5f6e Added integration test for transitioning leader to validator to see that tpu pipeline can exit and restart a tvu. Fixed Tpu and broadcast stage so that exiting later stages in the pipeline also causes earlier stages to exit. 2018-09-19 10:48:05 -06:00
Carl
6d27751365 give fullnode ownership of state needed to dynamically start up a tpu or tvu for role transition 2018-09-19 10:48:05 -06:00
Carl
1fb1c0a681 added jointypes to the stages in the tpu involved in leader rotation 2018-09-19 10:48:05 -06:00
Carl
062f654fe0 formatted code 2018-09-19 10:48:05 -06:00
Carl
98b47d2540 Added check in broadcast stage to exit after transmitting last blob before leader rotation. Also added tests 2018-09-19 10:48:05 -06:00
Carl
f28ba3937b Added check in write stage to exit when scheduled entry_height for leader rotation is detected 2018-09-19 10:48:05 -06:00
Carl
91cf14e641 Rewrote service trait join() method to allow thread join handles to return values other than () 2018-09-19 10:48:05 -06:00
Pankaj Garg
5310b6e5a2
Move entry->blob creation out of write stage (#1257)
- The write stage will output vector of entries
- Broadcast stage will create blobs out of the entries
- Helps reduce MIPS requirements for write stage
2018-09-18 13:49:10 -07:00
Anatoly Yakovenko
fd36954477 clippy 2018-09-15 05:12:53 -06:00
Michael Vines
4196cf43e8 cargo fmt 2018-09-14 16:37:49 -07:00
sakridge
4dc30ea104
Add recycler stats (#1187) 2018-09-13 14:49:48 -07:00
carllin
8706774ea7
Rewrote service trait join() method to allow thread join handles to return values other than () (#1213) 2018-09-13 14:00:17 -07:00
Rob Walker
b52230097e groom Fullnode's new_with_bank() to match new() more 2018-09-12 09:24:42 -07:00
Rob Walker
a8fdb8a5a7 use a single BlobRecycler per fullnode 2018-09-11 16:56:54 -07:00
Rob Walker
b313b7f6f9 Revert "move rpc_server to drop() semantics instead of having its own thread"
This reverts commit 40aa0654fa012c835c2de2e33c29b288b4f89aea.
2018-09-10 22:48:33 -07:00
Rob Walker
40aa0654fa move rpc_server to drop() semantics instead of having its own thread 2018-09-10 20:25:53 -07:00
Greg Fitzgerald
fc64e1853c Initialize Window, not SharedWindow
Wrap with Arc<RwLock>> when/if needed, no earlier.
2018-09-10 11:40:26 -06:00
sakridge
d82ec2634c
Fix is_leader boolean (#1115)
A node is the leader if the address is none
2018-09-04 13:38:24 -07:00
Greg Fitzgerald
c9a1ac9b8c Don't propogate errors we'll never handle 2018-09-04 06:01:32 -10:00
Rob Walker
176e806d94 rework of netwrk rendezvous
* rename NodeInfo field of Node from "data" to "info"
      (touches a lot of files)

  * update client to use gossip to find leader, a la drone

  * rework multinode scripts
      * move more stuff into rust
      * added usage to all
      * no more rsync unless you're a validator (TODO: whack that, too)
  * fullnode doesn't bail if drone isn't up yet, just keeps trying
  * drone doesn't bail if network isn't up yet, just keeps trying
2018-08-31 23:21:07 +09:00
Rob Walker
1af4cee63b fix #1079
* move gossip/NCP off assuming anything about its address
  * use a single socket to send and receive gossip
  * remove --addr/-a from CLIs
  * rearrange networking utility code
  * use Arc<UdpSocket> to share the Sync-safe UdpSocket among threads
  * rename TestNode to Node

TODO:

  * re-enable 127.0.0.1 as a valid address in crdt
  * change repair request/response to a similar, single socket
  * pick cloned sockets or Arc<UdpSocket> for all these (rpu uses tryclone())
  * update contact_info with network truthiness instead of what the node
      says?
2018-08-31 23:21:07 +09:00
Greg Fitzgerald
4ab58f069a Add back JsonRpcService changes 2018-08-23 13:42:54 -07:00
Greg Fitzgerald
85f96d926a Pacify clippy 2018-08-23 13:42:54 -07:00
Greg Fitzgerald
816de4f8ec Hoist shared code between leaders and validators 2018-08-23 13:42:54 -07:00
Greg Fitzgerald
42229a1105 Hoist thread_hdls 2018-08-23 13:42:54 -07:00
Greg Fitzgerald
d8820053af Inline create_leader_threads and create_validator_threads 2018-08-23 13:42:54 -07:00
Greg Fitzgerald
731f8512c6 Hoist Arc<Bank> 2018-08-23 13:42:54 -07:00
Greg Fitzgerald
a133784706 Rename mode-specific constructors and return only thread handles 2018-08-23 13:42:54 -07:00
Greg Fitzgerald
be58fdf1bb Less constructors 2018-08-23 13:42:54 -07:00
Greg Fitzgerald
57daeb35d2 Drop all references to new_leader and new_validator 2018-08-23 13:42:54 -07:00
Greg Fitzgerald
9c5e69bf3d Don't offer two ways to specify a leader 2018-08-23 13:42:54 -07:00
Greg Fitzgerald
cfac127e4c Extract lower-level constructor
Passing in the bank is useful for unit-tests since Fullnode doesn't
store it in a member variable.
2018-08-23 13:42:54 -07:00
Tyera Eulberg
2de8fe9c5f Pass bank to rpc as reference 2018-08-23 09:06:17 -06:00
Tyera Eulberg
f7f7ecd4c6 Add json-rpc requestAirdrop endpoint 2018-08-23 09:06:17 -06:00
Tyera Eulberg
a9c3a28a3b Add json-rpc sendTransaction endpoint 2018-08-23 09:06:17 -06:00
Tyera Eulberg
86c1d97c13 Fix validator rpc addr to match leader 2018-08-20 22:35:06 -07:00
Michael Vines
9eeaf2d502 Bind RPC port on all interfaces 2018-08-20 12:45:50 -07:00
Tyera Eulberg
1bf15ae907 Temporarily disable cargo audit CI failure 2018-08-18 12:29:49 -06:00
Tyera Eulberg
f73f3941cd Revert ill-advised jsonrpc marker, and handle jsonrpc server close 2018-08-18 12:29:49 -06:00
Tyera Eulberg
1eb8724a89 Disable Rpc module for other tests to prevent port conflicts 2018-08-18 12:29:49 -06:00
Tyera Eulberg
c6662a4512 Implement Rpc in Fullnode 2018-08-18 12:29:49 -06:00
Greg Fitzgerald
c75d4abb0b Tuck away PoH duration 2018-08-13 20:17:16 -06:00
Greg Fitzgerald
b801ca477d Declare fullnode a word 2018-08-13 20:17:16 -06:00
Greg Fitzgerald
c830c604f4 Make BroadcastStage an actual stage
TODO: Why isn't BroadcastStage/RetransmitStage managed by the NCP?
2018-08-13 20:17:16 -06:00
Greg Fitzgerald
0e66606c7f Rename broadcaster to broadcast_stage
And move retransmitter code into retransmit_stage.

TODO: Add a BroadcastStage service
2018-08-13 20:17:16 -06:00
Greg Fitzgerald
dc2a840985 Move FullNode::new_window into window module 2018-08-13 20:17:16 -06:00
Greg Fitzgerald
2727067b94 Move winow into its own module 2018-08-13 20:17:16 -06:00