Anatoly Yakovenko
922dffb122
fix erasure
2018-07-09 20:40:14 -06:00
Anatoly Yakovenko
63985d4595
renamed to contact_info
2018-07-09 20:40:14 -06:00
Anatoly Yakovenko
97dd1834d7
fix tests, more logs
2018-07-09 20:40:14 -06:00
Anatoly Yakovenko
2ea030be48
stick all the addrs into one struct
2018-07-09 20:40:14 -06:00
Tyera Eulberg
606cfbfe1e
Migrate fullnode and fullnode-config to clap for CLI arguments
2018-07-09 20:38:32 -06:00
Rob Walker
ed0a590549
support an initial window filled with last up-to-WINDOW_SIZE blobs
2018-07-09 14:50:14 -07:00
Greg Fitzgerald
71f05cb23e
Vet timestamp source from contract, not leader
...
Per @aeyakovenko, contracts shouldn't trust the network for
timestamps. Instead, pass the verified public key to the
contract and let it decide if that's a public key it wants
to trust the timestamp from.
Fixes #405
2018-07-09 08:40:07 -06:00
Greg Fitzgerald
5f99657523
Remove last_time from bank
...
We had a test for this, but without `Bank::time_sources` (removed in the last
commit), there's no last_time that can be trusted.
2018-07-09 08:40:07 -06:00
Greg Fitzgerald
587ae1bf3c
Remove time_sources from bank
...
I wrote this, but per
https://github.com/solana-labs/solana#code-coverage , if it doesn't
break a test, it's fair game to delete.
2018-07-09 08:40:07 -06:00
Michael Vines
22c0e3cd54
Metrics v0.1
2018-07-07 19:40:09 -07:00
Greg Fitzgerald
3ed9567f96
Remove exit variable from RequestStage
2018-07-05 17:32:41 -06:00
Greg Fitzgerald
c4fa841aa9
Remove exit variable from respond [stage]
...
And drop the sender that feeds input to the responder.
2018-07-05 17:32:41 -06:00
Greg Fitzgerald
f284af1c3d
Remove exit variable from WindowStage and retransmit [stage]
2018-07-05 17:32:41 -06:00
Greg Fitzgerald
46602ba9c3
Remove exit variable from ReplicateStage
2018-07-05 17:32:41 -06:00
Greg Fitzgerald
81477246be
Remove exit variable from VerifyStage
2018-07-05 17:32:41 -06:00
Greg Fitzgerald
9bd63867aa
No longer need to ignore downstream send errors
...
By removing the exit variables, the downstream stages wait for
upstream stages to drop their senders before exiting.
2018-07-05 17:32:41 -06:00
Greg Fitzgerald
d1c317fd5f
Remove exit variable from broadcast [stage]
2018-07-05 17:32:41 -06:00
Greg Fitzgerald
cbd664ba4b
Remove exit variable from BankingStage
2018-07-05 17:32:41 -06:00
Greg Fitzgerald
4bb7cefa15
Remove exit variable from WriteStage
2018-07-05 17:32:41 -06:00
Greg Fitzgerald
82c86daa78
Exit write_stage on channel errors
2018-07-05 17:32:41 -06:00
Greg Fitzgerald
b95db62be3
Handle errors consistently
...
Error handling is still clumsy. We should switch to something like
`error-chain` or `Result<T, Box<Error>>`, but until then, we can
at least be consistent across modules.
2018-07-05 17:32:41 -06:00
Greg Fitzgerald
0f7fdd71cc
Remove executable bit from nat.rs
2018-07-05 17:32:41 -06:00
Greg Fitzgerald
af1a7da0d5
Fix code comments
2018-07-05 17:32:41 -06:00
Tyera Eulberg
d698b3da3a
Revert tps_demo marker
2018-07-05 15:15:23 -06:00
Tyera Eulberg
6d275d571c
Clean up commented code
2018-07-05 15:15:23 -06:00
Tyera Eulberg
63acb82c87
Update drone airdrop test for tps_demo functionality
2018-07-05 15:15:23 -06:00
Tyera Eulberg
4d05b74314
Port solana-client-demo to clap crate for CLI arguments
2018-07-05 15:15:23 -06:00
Tyera Eulberg
96c321da76
Update drone to allow TPS-sized airdrops
2018-07-05 15:15:23 -06:00
Tyera Eulberg
4701540cc9
Migrate solana-client-demo to use drone
2018-07-05 15:15:23 -06:00
Pankaj Garg
f54615b4e3
UDP port for client demo in range
...
* This change will allow clients to run behind a firewall
with only certain port range opened for access
2018-07-05 10:17:35 -06:00
Greg Fitzgerald
77bf17064a
Add Service trait
...
Added a consistent interface to all the microservices.
2018-07-04 16:40:34 -06:00
Tyera Eulberg
44150b2e85
Remove unused crate from wallet CLI
2018-07-04 16:39:26 -06:00
Tyera Eulberg
8ec2fe15f3
Port solana-drone to clap crate for CLI arguments
2018-07-04 16:39:26 -06:00
Greg Fitzgerald
4b07772e22
Add helper functions for reading entries
...
```rust
let entries = entry_writer::read_entries_from_str(entries_str).unwrap();
let entries_len = entries.len();
assert_eq!(entries_len, 7);
let bank = Bank::default();
bank.process_ledger(entries).unwrap();
assert_eq!(bank.transaction_count(), entries_len - 2);
```
2018-07-03 19:32:01 -06:00
Anatoly Yakovenko
e771d36278
Better logs
2018-07-03 18:10:16 -06:00
Rob Walker
800c2dd370
make the leader append to the ledger file
2018-07-03 17:17:52 -06:00
Greg Fitzgerald
f38842822f
Cleanup code duplication
2018-07-03 16:33:36 -06:00
Greg Fitzgerald
88a6fb86bf
Clean up read_entries() and its usage
2018-07-03 16:33:36 -06:00
Greg Fitzgerald
f6fe998ed4
Revert 1dd8c5ed362693fa46e4a281e1caaae427a88edc
...
Per @sakridge, this might cause a performance degradation. Need
to benchmark it.
2018-07-03 14:00:53 -06:00
Anatoly Yakovenko
16337d7c1e
unstable test
2018-07-03 14:00:39 -06:00
Anatoly Yakovenko
fa70b3bf70
split out files, fixed a bug @garious!
2018-07-03 14:00:39 -06:00
Anatoly Yakovenko
3a90f138b2
dynamit network test
...
* cleaned up fullnode api
* added debug_id to ReplicatedData and crdt for debugging
2018-07-03 14:00:39 -06:00
Michael Vines
033f6dcbcb
Demote 'sorted leader' log
2018-07-03 08:24:28 -07:00
Greg Fitzgerald
5d8b2f899a
Fix wallet doc
2018-07-02 19:21:03 -07:00
Greg Fitzgerald
0dabdfd48e
Use zero to represent a nonexistent account
...
This also fixes a bug in the thin client where a nonexistent account
would have triggered a panic because we were using `balances[k]` instead
of `balances.get(key)`.
Fixes #534
2018-07-02 18:48:40 -06:00
Greg Fitzgerald
d2bb4dc14a
Purge empty accounts
2018-07-02 18:48:40 -06:00
Michael Vines
2cbfe41422
Abort nicer on drone connection failure
2018-07-02 15:57:30 -07:00
Michael Vines
c72dced8fa
Report error when an invalid confirmation signature or public key is provided
2018-07-02 15:57:30 -07:00
Anatoly Yakovenko
6feed5fd56
rebased
2018-07-02 16:34:49 -06:00
Anatoly Yakovenko
b8fe5ae076
rename server to fullnode
2018-07-02 16:34:49 -06:00
Anatoly Yakovenko
7e657d65f3
merged f2ab08c65e
2018-07-02 16:34:49 -06:00
Anatoly Yakovenko
a166bb816e
wtfr
2018-07-02 16:34:49 -06:00
Anatoly Yakovenko
2952027d04
wtfr
2018-07-02 16:34:49 -06:00
Anatoly Yakovenko
430d9d9314
fixup!
2018-07-02 16:34:49 -06:00
Anatoly Yakovenko
fa247196c0
fullnode lib
2018-07-02 16:34:49 -06:00
Greg Fitzgerald
5d17c2b58f
Return output receivers from each stage
...
Reaching into the stages' structs for their receivers is, in hindsight,
more awkward than returning multiple values from constructors. By
returning the receiver, the caller can name the receiver whatever it
wants (as you would with any return value), and doesn't need to
reach into the struct for the field (which is super awkward in
combination with move semantics).
2018-07-02 16:18:32 -06:00
Michael Vines
3e0e09555a
Undo UPnP UDP port binding
2018-07-02 14:38:01 -07:00
Michael Vines
67e0100866
Bind to 0.0.0.0
2018-07-02 14:38:01 -07:00
Michael Vines
f2ab08c65e
Reuse request UDP port for responses
2018-07-02 14:38:01 -07:00
Greg Fitzgerald
04a93050e7
No need to share a write lock across single-threaded methods
2018-07-02 15:25:16 -06:00
Michael Vines
03401041db
Correct signature argument name
2018-07-02 11:24:13 -07:00
Michael Vines
ae29e2085f
Init env_logger
2018-07-02 10:59:09 -07:00
Michael Vines
ea5663c0da
Demote log
2018-07-02 10:28:43 -07:00
Greg Fitzgerald
4e3526394e
Use IntoInterator to simplify write_entries() usage
2018-07-02 09:51:39 -06:00
Greg Fitzgerald
6806a14a3f
Use Cursor instead of tempfile.
...
Faster and one less dependency.
2018-07-02 09:51:39 -06:00
Greg Fitzgerald
ec7e50b37d
Consolidate ledger serialization code
...
The new read_entries() works, but is overly-contrained. Not
using that function yet, but adding it here in the hopes some
Rust guru will tell us how to get that lifetime constraint out
of there.
Fixes #517
2018-07-02 09:51:39 -06:00
Greg Fitzgerald
e7b7dfebf5
Add tests for process_ledger()
2018-07-02 09:51:39 -06:00
Greg Fitzgerald
669164bada
Boot EntryWriter's Mutex
...
Finally!
2018-07-01 17:29:24 -06:00
Greg Fitzgerald
4f3a291391
Move the writer into EntryWriter
2018-07-01 17:29:24 -06:00
Greg Fitzgerald
56e37ad2f4
Limit sticky mutex to WriteStage
2018-07-01 17:29:24 -06:00
Greg Fitzgerald
17de79a83a
Remove dead code
2018-07-01 17:29:24 -06:00
Greg Fitzgerald
09e9139855
Move channel code to write stage
2018-07-01 17:29:24 -06:00
Greg Fitzgerald
76fc5822c9
Send Vec<Entry> between stages instead of Entry
...
Might see a performance boost here.
2018-07-01 17:29:24 -06:00
Greg Fitzgerald
c767a854ed
Remove useless Arc
2018-07-01 11:35:32 -07:00
Greg Fitzgerald
b60802ddff
Refactor such that genesis can use entry_writer
2018-07-01 11:35:32 -07:00
Greg Fitzgerald
1c35d59f26
Receive entries first, then write
2018-07-01 11:35:32 -07:00
Greg Fitzgerald
adcaf715c6
Cleanup write_entries
2018-07-01 11:35:32 -07:00
Greg Fitzgerald
1f9494221b
Make space for a write_entry() that only writes entries
2018-07-01 11:35:32 -07:00
Greg Fitzgerald
466d6f76b9
Don't hide error in write_entry()
2018-07-01 11:35:32 -07:00
Greg Fitzgerald
b05e6ce3db
Cleanup solana-genesis
2018-07-01 11:35:32 -07:00
Michael Vines
450f271cf7
Move public IP address detection out of bash
2018-06-29 21:12:05 -07:00
Tyera Eulberg
ba6a6f5227
Use clap crate for wallet CLI subcommands and arguments
2018-06-29 21:30:20 -06:00
Michael Vines
903ec27754
Add BROKEN_NAT env variable to select Udp sender port workaround
2018-06-29 20:02:28 -07:00
Michael Vines
0b56d603c2
Client NAT traversal 0.1
...
UPnP is now used to request a port on the NAT be forwarded to the local machine.
This obviously only works for NATs that support UPnP, and thus is not a panacea
for all NAT-related connectivity issues.
Notable hacks in this patch include a transmit/receive UDP socket pair to work
around current protocol limitations whereby the full node assumes its peer can
receive on the same UDP port it transmitted from.
2018-06-29 17:36:26 -07:00
Greg Fitzgerald
816246ebee
Add doc
2018-06-29 17:28:12 -06:00
Greg Fitzgerald
a9881aee05
Add base58-encoded addresses
2018-06-29 17:28:12 -06:00
Greg Fitzgerald
7b5b989cfe
Print usage is a command is not provided
2018-06-29 17:28:12 -06:00
Greg Fitzgerald
c4b62e19f2
Do Proof of History verification before appending entries to the bank
...
Note: replicate_stage is still using `process_entries()` because
changing it to `process_blocks()` causes the `test_replicate` test to
fail.
2018-06-29 15:35:39 -06:00
Greg Fitzgerald
9a4733bde7
Remove interactive behavior from wallet
2018-06-29 13:22:20 -06:00
Greg Fitzgerald
517d08c637
Cleanup
2018-06-29 09:51:13 -07:00
Greg Fitzgerald
90dd794ae5
cargo fmt
...
rustfmt 0.6.1-stable (49279d71 2018-05-08)
2018-06-29 09:51:13 -07:00
Tyera Eulberg
e0dbbba8a3
fmt
2018-06-29 09:51:13 -07:00
Tyera Eulberg
d354e85a9a
Return bool on signature check
2018-06-29 09:51:13 -07:00
Tyera Eulberg
e4e1f8ec1e
Missing -m parameter handling
2018-06-29 09:51:13 -07:00
Tyera Eulberg
0112a24179
Add confirm command to wallet, and update RPU to check bank for a signature
2018-06-29 09:51:13 -07:00
Stephen Akridge
a094507bb8
Lower default benchmarking numbers to make CI timeout
2018-06-29 07:14:47 -06:00
Stephen Akridge
8effa4e3e0
Clear old blobs before putting in the new one
...
Otherwise we will just warn about overrun and not insert new blob
Also, break if the index we find is less than consumed otherwise
we can infinite loop
2018-06-29 07:14:47 -06:00
Stephen Akridge
1c9e7dbc45
Don't recycle in the replicate stage
...
Windowing stage owns all the blobs now
2018-06-29 07:14:47 -06:00
Stephen Akridge
799b249f02
Don't null blob window until we have to
2018-06-29 07:14:47 -06:00
Michael Vines
47917d00d1
Always bind to 0.0.0.0 regardless of what's being advertised to other nodes
2018-06-28 19:13:36 -07:00