Commit Graph

6795 Commits

Author SHA1 Message Date
aggstam
be4da84140 chore: clippy 2023-08-31 16:18:44 +03:00
parazyd
3951152d30 darkirc: Move crypto module into a separate directory. 2023-08-31 15:00:02 +02:00
Dastan-glitch
be037de544 event_graph: add some debug log 2023-08-31 15:24:01 +03:00
x
bcc159ea55 channel: minor fix to debug! statement 2023-08-31 14:14:36 +02:00
x
daca803280 sys: improve docstring for CondVar 2023-08-31 13:15:04 +02:00
lunar-mining
7d57ce77d2 script/dnetview: commit dummy TUI
most of the widgets we need for dnetview are now working, but it has yet
to be plugged into real data.
2023-08-31 13:14:41 +02:00
x
902ec7bbf1 system: add unit tests for CondVar and StoppableTask like a good boi 2023-08-31 13:03:13 +02:00
parazyd
ab7a6af93a rpc/client: Refactor to use StoppableTask 2023-08-31 12:29:35 +02:00
greptile
5534be7474 script: add simple script to remove username from files (#204)
* script: add simple script to remove username from files

* cleanup and add quotations around vars

---------

Co-authored-by: y <y>
2023-08-31 09:54:40 +00:00
y
92a7a80ddc cleanup: put test002 after test001 2023-08-31 09:54:26 +00:00
parazyd
fb1350daec rpc/server: Implement stop_connections() in RequestHandler. 2023-08-31 11:43:50 +02:00
parazyd
43e1c2f7a0 bin: Update RequestHandler users API 2023-08-31 11:08:18 +02:00
parazyd
5b1510e112 rpc/server: Extend RequestHandler trait with methods for avoiding Mutex lock scope issues. 2023-08-31 11:08:18 +02:00
x
b0ca5dc7dd net/channel: improve Debug, and use {:?} in all trace/debug messages instead of self.address() 2023-08-31 10:23:24 +02:00
parazyd
882ef29351 rpc/server/test: Stop all active connections when the server is stopped. 2023-08-31 10:18:07 +02:00
parazyd
d030a19be4 rpc: Add missing license headers. 2023-08-31 09:53:04 +02:00
x
2c94dfdfa9 StoppableTask: use CondVar instead of channels, add logs and make impl more robust 2023-08-31 09:44:13 +02:00
Dastan-glitch
7ed79b1365 event_graph: [bug fix] rewrite get_offspring() method 2023-08-31 04:51:55 +03:00
parazyd
6e45af3c5d bin: Update respective binaries to new RPC server API. 2023-08-31 01:19:51 +02:00
parazyd
14fc49a7d6 rpc/server: Implement connection tracking through a StoppableTaskPtr set. 2023-08-31 01:19:22 +02:00
parazyd
59486b5392 system/stoppable_task: Implement Hash for StoppableTask and add an id field. 2023-08-31 01:18:45 +02:00
x
662c9936c6 undo accidental commit to cli.rs 2023-08-30 13:59:49 +02:00
x
0ecd4125a6 net: add inbound events to dnet 2023-08-30 13:47:22 +02:00
x
8b2c0b76f2 script/node_get_info.py: comment out some prints 2023-08-30 13:29:27 +02:00
x
113978a6d4 darkirc: add p2p.get_info() 2023-08-30 13:27:06 +02:00
parazyd
9aa9b3993e fud: Compile fix 2023-08-30 12:57:07 +02:00
parazyd
9be54085bb net/acceptor: More robust handling of listener.next() errors. 2023-08-30 12:39:14 +02:00
parazyd
eae2e53f42 Add a libsqlite3-sys exception when building on musl-libc. 2023-08-30 12:17:01 +02:00
parazyd
26090d9509 net/transport: Merge transport.rs and mod.rs 2023-08-30 11:53:20 +02:00
x
8a434ba6a6 net: add transport/mod.rs 2023-08-30 11:44:10 +02:00
x
4c3405697f Revert "net: Rename transport.rs to transport/mod.rs"
This reverts commit 9e61f76fd5.
2023-08-30 11:43:52 +02:00
parazyd
9e61f76fd5 net: Rename transport.rs to transport/mod.rs 2023-08-30 11:42:41 +02:00
x
08e5abb90b net: do some minor cleanup. move transport.rs into transport/ and make p2p.session_* non async functions 2023-08-30 11:35:56 +02:00
parazyd
3a948fee72 lilith: Also purge host after handshake failure.
So far we've been only doing it when the host is unreachable,
but we can be aggressive now.
2023-08-30 11:13:59 +02:00
x
e481bd8bae add Error::SeedFailed 2023-08-30 10:33:01 +02:00
x
4cf9878604 net: fix the Option.unwrap() bug. Adding debug info, we see:
16:14:42 [DEBUG] (2) net::channel::stop(): END => address=tcp+tls://lilith1.dark.fi:5262 remote=485041065
    16:14:42 [DEBUG] (2) net::p2p::seed(): P2P::seed() [END]
    16:14:42 [DEBUG] (2) net::channel::main_receive_loop(): dnet sending recv msg, remote 485041065
    thread '<unnamed>' panicked at src/net/channel.rs:314:32:
    called `Option::unwrap()` on a `None` value

So the bug is caused after running p2p.seed(), where after
channel.stop() is called, main_receive_loop() keeps running. Examining
the code further we see ch.stop().await is called and the session is
destroyed but this doesn't give enough time for the channel to finish.

One solution is to modify `net/session/seedsync_session.rs` to this:

    let stop_sub = ch.subscribe_stop().await;
    ch.stop().await;
    stop_sub.recv().await;
    stop_sub.unsubscribe().await;

However a better solution is to make channel.stop() itself await until
the channel is fully closed (using the above code inside Channel::stop())

But the better solution is to ensure that StoppableTask.stop() itself
will not finish until the task it's responsible for has finished and
is no longer running. We do that by adding a stop barrier (see diff).
2023-08-30 10:19:52 +02:00
parazyd
31478a5305 zkas: Enable regression_001 test 2023-08-30 07:59:38 +02:00
parazyd
db28d4ef8a serial: Compile fix. 2023-08-30 07:59:19 +02:00
spital
2536a46aaa Dockerfile.almalinux and fix builds, latest working b36861fa1d_2023-06-13 (#183)
* Dockerfile.almalinux and fix builds, latest working b36861fa1d_2023-06-13

* Docker build can skip tests, add runtime deps

* update Fedora and Almalinux dockerfiles, worked for 95d0f47_2023-08-11 with "--build-arg DONT_EXEC_TESTS=1 --build-arg RUST_VER=nightly"

---------

Co-authored-by: parazyd <parazyd@dyne.org>
2023-08-30 05:57:33 +00:00
spital
2a67711868 fix/update_dependencies_202307_fedora_almalinux (#182)
Co-authored-by: parazyd <parazyd@users.noreply.github.com>
2023-08-30 05:52:01 +00:00
greptile
67b8de8451 zkas: fix index-out-of-bounds panic (#203)
Add check for indexing into byte array

Add regression unit test using input discovered via fuzzing

Co-authored-by: y <y>
Co-authored-by: parazyd <parazyd@users.noreply.github.com>
2023-08-30 05:51:01 +00:00
greptile
9d5ca4b904 zkas: fix out-of-memory panic (#202)
* zkas: fix out-of-memory panic

Fix panic due to unchecked Vec::with_capacity inputs. Also change
VecDeque to use the same validation pattern even though it was not
directly affected

Add panic regression unit test based on fuzzer input that caused the crash

* Add the vec alloc try to async serial as well

---------

Co-authored-by: y <y>
Co-authored-by: parazyd <parazyd@dyne.org>
2023-08-30 05:48:28 +00:00
greptile
7e76cf360c docs: Add more details about fuzzing (#201)
Add more documentation to fuzz/README.md, especially when it comes to
interpreting out-of-memory issues.

Co-authored-by: y <y>
Co-authored-by: parazyd <parazyd@users.noreply.github.com>
2023-08-30 05:44:42 +00:00
y
374d19851f fuzz: Restructure corpora git structure
Use artifacts/ rather than corpus/ to track fuzz inputs. corpus appears
to be a temporary directory that will be modified when minimizing test
cases using commands like `cargo fuzz cmin` or `cargo fuzz tmin`. For
this reason it's not suitable for long-term storage and is likely to
make the git commit-staging process very messy.
2023-08-30 05:42:23 +00:00
greptile
ccc46c2d3e doc: add troubleshooting steps for development (#199)
* doc: add troubleshooting steps for development

* Minor consistency fixes

---------

Co-authored-by: y <y>
Co-authored-by: parazyd <parazyd@dyne.org>
2023-08-30 05:40:51 +00:00
parazyd
c36e34eb83 Makefile: Remove target directory on distclean 2023-08-30 07:36:35 +02:00
parazyd
31a5f28d66 sdk: Enable halo2_gadgets dev feature used for constants tests. 2023-08-29 22:03:43 +02:00
parazyd
b72660860c lib: Hopefully final feature powerset fix 2023-08-29 18:26:36 +02:00
parazyd
96d35d5022 research/pow: Block timestamp verification 2023-08-29 17:48:46 +02:00
parazyd
e8a25b9ec4 Kill Tim Cook 2023-08-29 14:34:20 +02:00