Commit Graph

1867 Commits

Author SHA1 Message Date
ghassmo
edf2458ee9 raft: prune seen messages 2022-07-17 17:33:50 +04:00
ghassmo
5f06f4090d raft: avoid load all the logs from datasotre and implement slice_from and slice_to 2022-07-17 02:36:36 +04:00
ghassmo
6923bac6b0 raft: proper names for getter functions 2022-07-16 17:33:19 +04:00
ghassmo
be36b79927 raft: using fxhashmap 2022-07-16 17:28:00 +04:00
ghassmo
69772d8400 using sled datastore api to get logs and other required data 2022-07-16 17:22:21 +04:00
ghassmo
e00bc7d967 minor fix to log messages in tau and net 2022-07-16 17:21:14 +04:00
Dastan-glitch
f98063fa73 Revert "raft: remove redundant code"
This reverts commit b64f3f379d.
2022-07-10 23:54:59 +00:00
Dastan-glitch
b64f3f379d raft: remove redundant code 2022-07-10 23:38:34 +00:00
ghassmo
7abeea28b4 tau: remove old codes 2022-07-10 22:27:34 +03:00
ghassmo
cc823f1a65 util/time: remove the name of day when printing date 2022-07-10 22:25:54 +03:00
ghassmo
4203adc403 raft: increase sync attempts 2022-07-10 21:28:14 +03:00
ghassmo
eb101f22e2 bin/tau: catching errors and exit signals 2022-07-10 16:20:39 +03:00
ghassmo
6675cc2262 raft: more robust syncing process 2022-07-10 01:40:22 +03:00
lunar-mining
2a7ece72b0 net: improve some documentation and correct errors 2022-07-09 12:47:20 +02:00
lunar-mining
578e5dc612 net: change timer to 15 mins, name SESSION_OUTBOUND explicitly, add todos 2022-07-09 12:47:20 +02:00
lunar-mining
ac5c97cb76 net: if it's an outbound session + has an external_addr, then:
* start another process in the jobsman
* loop send our addr
* sleep for 20 min
2022-07-09 12:47:19 +02:00
lunar-mining
2f6909ab6a net: create session() function that returns an Arc pointer to session 2022-07-09 12:47:19 +02:00
lunar-mining
967f9ec770 net: channel hosts a pointer to Session
solved a bug which warned Session could not be made into an object.

documented here: https://github.com/rust-lang/rust/issues/51443
and here: https://stackoverflow.com/questions/72838225/rust-trait-warning-method-references-the-self-type-in-its-where-clause
2022-07-09 12:47:19 +02:00
lunar-mining
ab2a5af40b net: error[E0038]: Weak pointer to parent trait from child
Provokes the following error:

 error[E0038]: the trait `Session` cannot be made into an object
  --> src/net/channel.rs:72:14
   |
72 |     session: SessionWeakPtr,
   |              ^^^^^^^^^^^^^^ `Session` cannot be made into an object
   |
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
  --> src/net/session/mod.rs:79:14
   |
76 | pub trait Session: Sync {
   |           ------- this trait cannot be made into an object...
...
79 |     async fn register_channel(
   |              ^^^^^^^^^^^^^^^^ ...because associated function `register_channel` has no `self` parameter
help: consider turning `register_channel` into a method by giving it a `&self` argument
   |
79 |     async fn register_channel(&self,
   |                               ++++++
help: alternatively, consider constraining `register_channel` so it does not apply to trait objects
   |
82 |         executor: Arc<Executor<'_, Self: Sized>>,
   |                                  +++++++++++++
-----------------------
2022-07-09 12:47:19 +02:00
parazyd
0063271679 Update project dependencies. 2022-07-03 15:26:35 +02:00
parazyd
b436d659ba ircd: Implement IRC TLS listener. 2022-07-03 14:29:30 +02:00
ghassmo
9fdc11bd70 raft: add sent messages to seen_msgs vector 2022-07-02 18:16:22 +03:00
lunar-mining
b2734bf42b net: comment out unimplemented code 2022-07-01 11:01:22 +02:00
lunar-mining
af68236b8a net: rename selector_id() to type_id() 2022-07-01 10:59:29 +02:00
ghassmo
36e9faf2f7 raft: major fix in protocol_raft 2022-07-01 09:58:48 +03:00
ghassmo
d9da1b316f raft/consensus: fix bugs & clean up 2022-06-30 04:48:20 +03:00
ghassmo
65393bc322 raft: proper names for msgs and commits channels & minor changes 2022-06-30 03:38:38 +03:00
aggstam
59d4711e24 blockchain/metadatastore.rs: fixed genesis streamlet metadata hash 2022-06-30 00:26:53 +03:00
aggstam
54ede683a2 consensus: removed public key from Vote, validation through Participant.public_key 2022-06-29 23:54:31 +03:00
aggstam
633fbc362a consensus: removed public key from Block Proposal, validation through Participant.public_key 2022-06-29 23:43:21 +03:00
aggstam
0f36ed8e9e consensus: added node public key to Participant struct 2022-06-29 23:27:58 +03:00
ghassmo
9f819b0dba general clean up and run cargo clippy for all bins 2022-06-29 01:15:03 +03:00
lunar-mining
c155861b1a net/settings: change outbound_retry_seconds default to 20 minutes 2022-06-28 11:00:07 +02:00
lunar-mining
e8ae96ff9c net: keep looping load_addr + print a warning instead of exiting with error 2022-06-28 10:52:25 +02:00
ghassmo
e5bde0c6d1 system/subscriber: use warn msg instead of panic once notify call failed 2022-06-28 01:50:47 +03:00
ghassmo
06db050229 bin/ircd: send messages in buffer to the client after JOIN command 2022-06-28 01:43:53 +03:00
parazyd
8c5119d61c zk: Add tests for the arithmetic chip. 2022-06-27 09:23:55 +02:00
aggstam
9cac1225dc consensus/proposal: addeed fmt::Display trait for simpler logging 2022-06-25 16:11:57 +03:00
ghassmo
789bbf93c6 system/subscriber: add notify_with_exclude function to Subscriber 2022-06-25 16:02:30 +03:00
ghassmo
bf946b3876 system: add self_notify function to Subscription 2022-06-25 16:02:30 +03:00
lunar-mining
fcc6964692 net/ seed_session: fix bug which caused seed to drop
previously we were looping through all start_seed tasks linearily and
applying a global timer for all tasks. if any tasks exceeded the timer,
all tasks after the timeout were dropped.

here we implement a unique timer for every unique task. if the task
exceeds a timer, that task is dropped, with no impact on any future
tasks.
2022-06-25 12:55:00 +02:00
ghassmo
d42a17cd2f net: don't print a message when the inbound is not configured 2022-06-24 21:14:33 +03:00
lunar-mining
6fc73c2d2d net: add addr message subscription to seed protocol class
also add debug info to seed session
2022-06-24 11:56:26 +02:00
lunar-mining
9e07f7a216 net: disconnect from seed after performing seed protocol 2022-06-24 11:11:19 +02:00
narodnik
5cac77a67a net: allow configuring a node_id. this is sent to all nodes with the version message for debugging purposes. 2022-06-22 15:59:51 +02:00
aggstam
d02ee72177 consensus: explicit field names in structures 2022-06-22 16:35:01 +03:00
aggstam
20467eadba consesus:block restructure 2022-06-22 14:29:39 +03:00
aggstam
d5c96db14c crypto/constants.rs: created commonly used MERKLE_DEPT constant 2022-06-22 09:55:10 +03:00
ghassmo
b6ad2e1506 raft: increase heartbeat timeout 2022-06-21 13:31:38 +03:00
ghassmo
fe147fe8ae more explicit names for network errors 2022-06-20 12:26:46 +03:00