Commit Graph

8845 Commits

Author SHA1 Message Date
darkfi
3ce7d4cdcb wallet: bugfix editbox chars randomly repeating. sometimes miniquad doesn't send the key_up event. 2024-07-04 16:58:37 +02:00
darkfi
2a08980807 wallet: add EditBox 2024-07-04 14:29:03 +02:00
draoi
74eb6f9ba3 seedsync: don't allow duplicate connections to the same seed 2024-07-02 21:43:23 +02:00
skoupidi
97820d7301 darkfid: fixed some sync issues 2024-07-02 22:41:51 +03:00
skoupidi
4582e23745 darkfid: minor cleanup 2024-07-02 17:52:20 +03:00
skoupidi
89424e1126 minerd/rpc: more logs added 2024-07-02 17:18:14 +03:00
skoupidi
85670eb1f6 src/rpc: server handle requests in the background 2024-07-02 17:17:34 +03:00
draoi
9033567f00 net: stabilize HostState.unregister() calls
We previously deleted the call to `unregister()` after the refinery is
successful on a16dd562d9.

It was considered redundant since the `unregister()` call happens in
`subscribe_on_stop()`, which for refine session is called directly after
the refinery process finishes (after `channel.stop()`).

However, in a highly async environment the `unregister()` call in
`subscribe_on_stop()` can be called before the call to `move_host()`, meaning
that the host would then be stuck in the `Moving` state.

We have fixed this by specifying that `unregister` should only be called
in `subscribe_on_stop()` to peers that are not part of a refine session.
We seperately call `unregister` after `move_host` in the refinery.

This commit also fixes some documentation.

Note: the call to `unregister()` is highly fragile and can lead to race
conditions. We are working to replace this with something more robust
(like `tombstone()`).
2024-07-02 13:57:02 +02:00
parazyd
e09f0b192d net/tor: Add a way to retrieve the running onion address 2024-07-02 13:05:43 +02:00
parazyd
ccc5d9cf30 net/tor: Use P2P datastore for Tor's state and cache dirs 2024-07-02 12:13:22 +02:00
parazyd
c6aa5c1544 net: Define a datastore path 2024-07-02 11:51:42 +02:00
parazyd
ba62cdf6e5 net/settings: Convert hostlist into an Option<String> 2024-07-02 11:45:06 +02:00
parazyd
7858b933f2 chore: Update arti crate dependencies 2024-07-02 11:16:22 +02:00
darkfi
c9e13255cf wallet: editbox stub 2024-07-02 11:09:41 +02:00
dasman
1280470758 tau: gitignore python stuff 2024-07-02 01:24:47 +03:00
skoupidi
cb029adc4d contract/dao/lib: typo lol 2024-07-01 18:37:57 +03:00
darkfi
28951fd4d1 doc: dao add comments from dev meet 2024-07-01 17:34:51 +02:00
skoupidi
7b92070c7c contract/dao/lib: fixed blockwindow 2024-07-01 18:33:31 +03:00
skoupidi
97f7a91879 drk: rpc cleanup and minor fix
- All rpc use same fn to perform requests towards darkfid\n- Moved all rpc related Drk fns to rpc.rs\n- Fixed subscribe where if darkfid went off, drk subscription errored and drk hanged
2024-07-01 16:36:29 +03:00
skoupidi
54c0e83a16 Makefile: fixed standalone minerd building 2024-07-01 14:23:44 +03:00
darkfi
b1cfd8e7c6 wallet: fix race condition: delete old buffers should happen after creating new ones. 2024-07-01 10:59:58 +02:00
darkfi
1ff57a6ecf wallet: UI Text properties can be edited realtime 2024-07-01 09:43:21 +02:00
darkfi
da0381d3c0 doc: extend suggested changes with optional Abstain votes 2024-07-01 09:10:09 +02:00
darkfi
c96628e604 doc: collect list of recommended changes to DAO 2024-06-30 14:34:21 +02:00
darkfi
342eda76c4 doc: add doc section on aragon DAO 2024-06-30 14:23:23 +02:00
skoupidi
a4fdc3cec1 tau/taud/mont_tasks: clippy chore 2024-06-29 16:51:03 +03:00
skoupidi
46f8c30a20 darkfid: minor cleanup 2024-06-29 16:49:46 +03:00
draoi
8113b42fc0 darkfid: enable dnet
Add dnet_subscribe_events and p2p.get_info RPC calls. Fix a typo in
dnet.switch RPC call. Activate the dnet subscription in main.rs.
2024-06-29 15:24:25 +02:00
darkfi
c3625916d0 doc: add openzeppelin dao analysis 2024-06-29 07:31:59 +02:00
draoi
a16dd562d9 refine_session: remove redundant call to unregister()
unregister() will get called when the refine session channel disconnects
in session::remove_sub_on_stop(). Calling it here is actually dangerous
and creates rare race conditions.
2024-06-28 15:47:36 +02:00
draoi
39ce78632a hosts: create resize() and sort_by_last_seen() methods
We organize this functionality into distinct methods which get called
higher up, for example rather than manually resizing inside of store(),
we call resize() after we call store().

This is about reducing the "critical section" where locks are held and
using function scopes to ensure locks are released as quickly as possible.
2024-06-28 10:41:59 +02:00
draoi
2cd8b4dff7 net: use sync Mutex for HostContainer
Rationale: using a sync Mutex wherever possible is the recommended
method.

Additionally, using a sync Mutex here fixes some really weird fairness
behaviors we observed in the smol::lock::RwLock where writers in the
priority queue were occassionally ignored.
2024-06-27 15:03:22 +02:00
draoi
e7d8ba1864 refine_session: use remove_if_exists() method to delete entry when refinery fails
There's no need to acquire the write lock in the refinery when we can
just use one of the hosts methods.
2024-06-27 13:56:25 +02:00
dasman
ad627b7f26 darkirc: revert last changes regarding queuing user msgs if dag not synced 2024-06-27 04:39:49 +03:00
dasman
89afa62a4f darkirc: add a debug msg when if dag not synced and skipping 2024-06-26 14:50:55 +03:00
dasman
653670fc3f darkirc: revert start IRC after DAG sync and queue user messages until synced successfully 2024-06-26 14:41:16 +03:00
draoi
958361c953 net: simplfy fetch_last() method and fix lilith's usage 2024-06-26 10:24:06 +02:00
draoi
6a0d4cfe7d net: simplify update_last_seen() method
Also fix its usage by Lilith
2024-06-26 10:01:42 +02:00
draoi
e2ba275cb9 session/mod: use !p2p.connected() instead of channels().is_empty() 2024-06-26 09:21:23 +02:00
draoi
0958e69b62 hosts: modify last_seen instead of entire entry on store_or_update() 2024-06-26 09:13:30 +02:00
draoi
55af782eb3 refine_session: use !p2p.connected() instead of channels.is_empty() 2024-06-26 09:01:33 +02:00
draoi
dbf5c6bc8f hosts: use sync Mutex for HostRegistry
We don't need to use an AsyncMutex here since we're not holding across .await points or for long periods of time.

Using a sync Mutex here also fixes some really weird fairness behaviors we observed in the smol::lock::Mutex where writers in the priority queue were occasionally getting ignored. This was apparently not a deadlock since subsequent and prior readers and writers were able to access the data with no problems.
2024-06-26 08:52:46 +02:00
draoi
958f02a3eb hosts: use sync Mutex for HostRegistry
We don't need to use an AsyncMutex here since we're not holding across .await points or for long periods of time.

Using a sync Mutex here also fixes some really weird fairness behaviors we observed in the smol::lock::Mutex where writers in the priority queue were occasionally getting ignored. This was apparently not a deadlock since subsequent and prior readers and writers were able to access the data with no problems.
2024-06-25 22:16:20 +02:00
skoupidi
235ba3f644 darkfid: purge current forks on network dc 2024-06-25 16:00:38 +03:00
skoupidi
df95f854a7 darkfid/task: use network disconnect subscription 2024-06-25 14:27:02 +03:00
draoi
787d9ac395 net: make disconnect_publisher notify with an Error instead of a bool 2024-06-25 09:12:12 +02:00
draoi
2badfbb141 net: create a disconnect_publisher that notifies when we have no connectons
We check whether there are any remaining channels when we remove a
channel in remove_sub_on_stop(). If the channel list is empty,
we call notify() on disconnect_pubisher and set its inner value to true.

Note that this only signals when we do not have any connections, and
does not update to false when new connections are formed.
2024-06-25 08:44:32 +02:00
dasman
01d57d5877 darkirc: start IRC server task after the DAG has been synced 2024-06-25 03:20:38 +03:00
dasman
c4ea68e474 event_graph: in dag_insert() continue instead of break when iterating over/cleaning unreferenced_tips 2024-06-25 03:18:54 +03:00
skoupidi
c43c293a09 darkfid/task/consensus.rs: properly handle the proposals subscription 2024-06-24 20:59:05 +03:00