Commit Graph

1427 Commits

Author SHA1 Message Date
narodnik
a64820132a cleanup ProtocolRegistry 2022-02-05 22:28:32 +01:00
parazyd
cabbe3c8ea zkas: Unify error functions into an error emitter. 2022-02-05 20:20:15 +01:00
narodnik
cd74b6aa0b from now on all subscribers in protocols must be created in the constructor. move subscribers in ProtocolPing to the constructor. 2022-02-05 11:04:19 +01:00
narodnik
7343c0be83 delete old new() functions and rename new2() to new() 2022-02-05 10:51:46 +01:00
narodnik
7a8a10aaac add protocol names 2022-02-05 10:49:12 +01:00
narodnik
a9a714aa73 net: when registering protocols, use a bitwise selector to specify
sessions it will be activated for.

    registry.register(SESSION_INBOUND | SESSION_OUTBOUND, ProtocolFoo::new)

The constructors accept a channel and p2p instance.
For an example of passing additional arguments, you have to use an async
closure:
    let foo2 = foo.clone();

    //

    registry.register(
        !net::SESSION_SEED,
        move |channel, p2p| {
            let foo = foo2.clone();
            async move {
                ProtocolFoo::new(channel, p2p, foo).await
            }
        }).await;
2022-02-05 09:56:34 +01:00
narodnik
f4026bf8a2 remove uneeded 'static declarations 2022-02-05 07:46:40 +01:00
narodnik
6fb1304c00 cargo fmt 2022-02-03 08:26:55 +01:00
narodnik
eb23a3cda5 remove unecessary plurals: protocols -> protocol, sessions -> session, messages -> message 2022-02-03 08:23:15 +01:00
narodnik
d1d184c0ea Add a protocol registry which properly handles creating the protocols in
a suspended sleep state, then activating them once the channel is
operating.
2022-02-03 08:11:42 +01:00
parazyd
fa93009a57 Remove zkvm feature and compile it directly with crypto feature. 2022-01-31 09:31:45 +01:00
parazyd
fedd378510 zk/vm: Use a macro to generate a match statement for PoseidonHash length. 2022-01-26 12:09:14 +01:00
parazyd
f30d5ec0c6 crypto/proof: Fix test unit. 2022-01-26 11:58:23 +01:00
parazyd
52355333b3 node/service: Silence clippy warning. 2022-01-26 10:13:24 +01:00
parazyd
f8ab5ef5e3 Move mint and burn Rust examples into proof/ to complement zkas code. 2022-01-26 10:11:13 +01:00
parazyd
287302f4ec make fix 2022-01-26 03:06:29 +01:00
parazyd
7e76a669cc zk/vm: Simplify some enums and properly witness some remaining types. 2022-01-26 02:59:01 +01:00
parazyd
86d9aa81b2 zk/vm: Proper separation for prover and verifier.
The witnesses the prover passes in should be correct, and the witnesses
that the verifier passes in should have the same types, and be None.

We'll see later how this will affect more complex circuits, but we
hope it won't bite us in the ass.
2022-01-26 01:29:10 +01:00
parazyd
6cab96a28c zk/vm: Remove old VM code and move newest to "vm" module. 2022-01-25 23:47:54 +01:00
parazyd
ab8991e2bb zk/vm/stack: Silence large enum clippy warning. 2022-01-25 20:33:28 +01:00
parazyd
c5aab1d2f8 example/vm: Update for new enums. 2022-01-25 20:31:35 +01:00
parazyd
4b013f27ee zkas: Use usize for stack indexes. 2022-01-25 20:24:30 +01:00
parazyd
813c6f077d zk/vm: Clean up WIP code. 2022-01-25 20:24:00 +01:00
parazyd
980a4649d2 zk/vm: Initial VM implementation for zkas code. 2022-01-25 18:57:34 +01:00
parazyd
7bf9f43986 crypto: Export public inputs functions for mint and burn proofs. 2022-01-25 18:57:34 +01:00
parazyd
65e189fad6 zkas: Add Uin64 type. 2022-01-25 18:57:34 +01:00
parazyd
17f6638a03 zkas: Move toolchain into main library and the binary into bin/ namespace. 2022-01-25 18:57:34 +01:00
parazyd
2b753f3c5d zkas: Implement decoder errors. 2022-01-19 13:04:04 +01:00
parazyd
1c6a7c17a4 rpc/jsonrpc: Use parsed path for unix socket connection. 2022-01-18 15:17:36 +01:00
parazyd
1b55841418 rpc/jsonrpc: Transparently handle arbitrary protocols for requests. 2022-01-18 14:42:12 +01:00
Dastan-glitch
167b015fff crypto: minor cleanup 2022-01-18 13:37:16 +01:00
ghassmo
5ee7330eb3 node/service: implement functions in p2p gateway 2022-01-14 22:52:33 +04:00
ghassmo
59abc99789 create a POC for p2p gateway 2022-01-14 19:46:21 +04:00
parazyd
2c3a4073ee cli: Remove spurious clone from spawn_config() 2022-01-13 21:08:44 +01:00
parazyd
46df997faa util/serial: Add usize serialization. 2022-01-13 20:33:01 +01:00
parazyd
a431fab6d7 Have config files be spawned by the binaries if necessary.
Closes: #42
2022-01-13 19:54:19 +01:00
parazyd
162138f7de Fix test units. 2022-01-13 17:00:50 +01:00
parazyd
d0395115f1 error: Remove unused errors. 2022-01-13 17:00:50 +01:00
parazyd
d5bdb0d1db cargo +nightly fmt. 2022-01-13 17:00:49 +01:00
parazyd
d192ae23f0 bin/drk: Finalize features refactor. 2022-01-13 15:42:56 +01:00
parazyd
ee5f94ad33 bin/darkfid: Finalize features refactor. 2022-01-13 15:42:56 +01:00
parazyd
78f6a89e20 Clean up and enable working examples. 2022-01-13 15:42:55 +01:00
parazyd
cfa2d5d955 Rename "chain" module to "blockchain". 2022-01-13 15:42:55 +01:00
parazyd
e441396383 Add "node" feature. 2022-01-13 15:42:55 +01:00
parazyd
fabafa3e5e Add "crypto" feature. 2022-01-13 15:42:55 +01:00
parazyd
f3045f80e5 Add "net" feature. 2022-01-13 15:42:55 +01:00
parazyd
5dba6f6368 Add "system" feature. 2022-01-13 15:42:55 +01:00
parazyd
5e909054fa Add "tui" feature. 2022-01-13 15:42:55 +01:00
parazyd
07d739d916 Implement "chain" feature. 2022-01-13 15:42:54 +01:00
parazyd
fa17139c6a Implement "rpc" feature. 2022-01-13 15:42:54 +01:00