Commit Graph

3238 Commits

Author SHA1 Message Date
Dastan-glitch
e67e7b25e2 rpc: fix close connection cleanly 2023-08-23 17:53:13 +03:00
y
ed53f896af chore: fix typos in comments and logs 2023-08-23 09:12:40 +00:00
greptile
970698f4a9 consensus: add unit test for bounds on f (#192)
* consensus: add unit test for bounds on f

Added test f_is_bounded to src/validator/consensus/pid.rs

Test by running:
cargo test --release --all-features f_is_bounded

* fix CI error (cargo fmt)

---------

Co-authored-by: y <y>
2023-08-23 09:12:13 +00:00
x
3b4103e40b net: change private p2p functions to pub(crate) 2023-08-23 10:45:59 +02:00
x
f203b77281 Revert "bugfix: get_log_config(), the log level is set in TermLogger::new(), not in get_log_config() which simply controls the formatting."
This reverts commit 39db8099d9.
2023-08-23 09:41:58 +02:00
x
39db8099d9 bugfix: get_log_config(), the log level is set in TermLogger::new(), not in get_log_config() which simply controls the formatting. 2023-08-23 09:25:06 +02:00
parazyd
ae6a2b7707 contract: Fix test compilation. 2023-08-22 20:25:29 +02:00
parazyd
9b4418931f zkas: Remove itertools dependency. 2023-08-22 20:22:58 +02:00
parazyd
2b3859e194 util/parse: Delete unused truncate() function. 2023-08-22 19:59:51 +02:00
parazyd
478bfa2a00 contract: Remove async-std dependencies. 2023-08-22 19:55:37 +02:00
parazyd
a02e3475f6 lib: Remove async-std dependency. 2023-08-22 19:55:37 +02:00
x
4c94fa251c add docstring for StoppableTask 2023-08-22 15:19:50 +02:00
parazyd
0f125fa2db net: Remove async-std dependency and prefer smol.
Also we now take the global executor and keep it around in P2p.
2023-08-22 15:07:48 +02:00
parazyd
557dfd0bb5 system: Implement async timeout helpers.
This is copied from async-std, under the MIT license.
2023-08-22 15:04:47 +02:00
x
25b84e18f6 net: make dnet! macro more compact (and rename to dnetev!) 2023-08-22 14:56:34 +02:00
x
ebe6f4e5c4 net/dnet: add outbound connected/disconnected events 2023-08-22 13:52:03 +02:00
parazyd
a0b73961fb system: Use a bounded channel for StoppableTask. 2023-08-22 09:49:13 +02:00
parazyd
f782c236a4 system: Fully port to smol runtime. 2023-08-22 09:38:22 +02:00
aggstam
fb0102a7e0 taud: use StoppableTask instead of detach() 2023-08-22 01:39:57 +03:00
aggstam
3f6b79908b darkfid: use StoppableTask instead of detach() 2023-08-21 19:15:43 +03:00
aggstam
dbe413d8f0 darkfid2: use StoppableTask instead of detach() 2023-08-21 19:01:16 +03:00
parazyd
8fed5c49d3 consensus/validator: Disable subscriber notify functions.
The module is scheduled for deletion.
2023-08-21 14:47:44 +02:00
parazyd
2eea9daffd taud: Finish new RPC port. 2023-08-21 14:44:39 +02:00
parazyd
017cf68480 net/p2p: Expose the dnet subscriber through a function. 2023-08-21 12:01:19 +02:00
parazyd
02b15fd1c9 net/channel: Make ChannelInfo ID a u32. 2023-08-21 12:01:19 +02:00
parazyd
ee6d1d7b92 rpc: Add a few From impls from net module. 2023-08-21 12:01:18 +02:00
parazyd
d3f3ac8737 rpc: Have JSON notifications take JsonValue as params.
This outsources encoding/serialization to the caller.
2023-08-21 11:41:39 +02:00
parazyd
ebb4cab0ea chore: Add missing license headers. 2023-08-21 10:35:00 +02:00
x
e23fb30604 p2p: debug net info cleanup and add support to darkirc 2023-08-21 10:20:37 +02:00
parazyd
21dd80ae99 rpc: Replace serde_json with tinyjson. 2023-08-20 18:53:52 +02:00
parazyd
332b65cc74 rpc/clock_sync: Remove peer_request method.
This should not be done over JSON-RPC but rather in p2p.
2023-08-20 18:53:52 +02:00
parazyd
50ac8bf93c net: Remove most of dnet and replace with a ChannelInfo subscriber.
We want to make dnet event-based and not a polling thing, and we also
want to remove the JSON dependency directly in the p2p library. Such
format conversions should happen out of the library, likely in the
daemon providing debugging info.
2023-08-20 18:53:52 +02:00
parazyd
cf002a03b0 system/subscriber: Change SubscriptionId type to usize. 2023-08-20 18:53:52 +02:00
x
d8c9f893a1 Revert "net: these lines aren't needed. The enable/disable guard is simply for channel message logging. The other info is still accessible and adds no costs."
This reverts commit 977f3027ff.
2023-08-20 13:50:43 +02:00
x
977f3027ff net: these lines aren't needed. The enable/disable guard is simply for channel message logging. The other info is still accessible and adds no costs. 2023-08-20 13:44:44 +02:00
x
1b35330082 zkrunner/pydrk: add --trace argument to zkrunner, and appropriate changes to the py bindings. 2023-08-20 09:47:05 +02:00
x
37bd0ccdf4 zk tracer: add a bool pass through instead of using if let idiom. As a consequence we change weaker matches into stronger unwraps. 2023-08-19 13:13:26 +02:00
x
7962f8ff8e zk: add forgotten file in last commit tracer.rs 2023-08-19 12:54:13 +02:00
x
f3a6672bfb zk: add debug tracer 2023-08-19 12:51:34 +02:00
x
41197407bf replace .iter().map(|x| x.clone()).collect() with .clone()
tested with example/zk.rs and dao contract test.
2023-08-18 12:21:11 +02:00
parazyd
1237e5be24 tests: Implement JSON-RPC server/client test. 2023-08-18 11:40:09 +02:00
parazyd
44982d320e chore: Update crate dependencies 2023-08-18 10:15:14 +02:00
parazyd
cf330b872c rpc/client: Reintroduce subscribe().
Added a FIXME note about "Triggering next consume". This should not
be required. Instead we should just be waiting for notifications and
never have to send anything back.
2023-08-18 09:37:26 +02:00
parazyd
b57d0c1c9b net: Implement Unix socket transport (both dialer and listener) 2023-08-18 08:56:54 +02:00
parazyd
827ec53f63 rpc: Cleanup client and server and refactor into smaller functions.
* Implement a read timeout to avoid a DoS path
* Use dynamic buffer allocation with a max size limit
* Make the JSON-RPC a line-based protocol
2023-08-18 08:56:54 +02:00
parazyd
0ba9740b84 chore: Clippy lints 2023-08-17 12:03:11 +02:00
Dastan-glitch
93b7301528 event_graph: add remove_old_events() method
this method takes a timestamp as an argument and removes every event that is older than the timesamp from the tree
and relink the oldest event in the resulted tree to the root event
2023-08-17 05:30:27 +03:00
Dastan-glitch
0adf421d71 event_graph: rewrite find_ancestor() 2023-08-17 05:22:02 +03:00
parazyd
6a024ab801 zkas: Add a field definition on top of the circuit file.
Currently unused, but will probably be expanded to define proofs over
different fields.
2023-08-14 17:09:18 +02:00
parazyd
af01483bfb sdk/python: Remove unused to_json function. 2023-08-14 17:06:33 +02:00