Mixnet integration (#1346)

See #1345, <https://github.com/paritytech/substrate/pull/14207>.

This adds all the necessary mixnet components, and puts them together in
the "kitchen-sink" node/runtime. The components added are:

- A pallet (`frame/mixnet`). This is responsible for determining the
current mixnet session and phase, and the mixnodes to use in each
session. It provides a function that validators can call to register a
mixnode for the next session. The logic of this pallet is very similar
to that of the `im-online` pallet.
- A service (`client/mixnet`). This implements the core mixnet logic,
building on the `mixnet` crate. The service communicates with other
nodes using notifications sent over the "mixnet" protocol.
- An RPC interface. This currently only supports sending transactions
over the mixnet.

---------

Co-authored-by: David Emett <dave@sp4m.net>
Co-authored-by: Javier Viola <javier@parity.io>
This commit is contained in:
David Emett
2023-10-09 15:56:30 +02:00
committed by GitHub
parent 1dc935c715
commit a808a3a091
52 changed files with 3010 additions and 109 deletions
+6
View File
@@ -35,6 +35,7 @@ sp-block-builder = { path = "../../../primitives/block-builder", default-feature
sp-genesis-builder = { version = "0.1.0-dev", default-features = false, path = "../../../primitives/genesis-builder" }
sp-inherents = { path = "../../../primitives/inherents", default-features = false}
node-primitives = { path = "../primitives", default-features = false}
sp-mixnet = { path = "../../../primitives/mixnet", default-features = false }
sp-offchain = { path = "../../../primitives/offchain", default-features = false}
sp-core = { path = "../../../primitives/core", default-features = false}
sp-std = { path = "../../../primitives/std", default-features = false}
@@ -88,6 +89,7 @@ pallet-identity = { path = "../../../frame/identity", default-features = false}
pallet-lottery = { path = "../../../frame/lottery", default-features = false}
pallet-membership = { path = "../../../frame/membership", default-features = false}
pallet-message-queue = { path = "../../../frame/message-queue", default-features = false}
pallet-mixnet = { path = "../../../frame/mixnet", default-features = false }
pallet-mmr = { path = "../../../frame/merkle-mountain-range", default-features = false}
pallet-multisig = { path = "../../../frame/multisig", default-features = false}
pallet-nfts = { path = "../../../frame/nfts", default-features = false}
@@ -185,6 +187,7 @@ std = [
"pallet-lottery/std",
"pallet-membership/std",
"pallet-message-queue/std",
"pallet-mixnet/std",
"pallet-mmr/std",
"pallet-multisig/std",
"pallet-nft-fractionalization/std",
@@ -235,6 +238,7 @@ std = [
"sp-genesis-builder/std",
"sp-inherents/std",
"sp-io/std",
"sp-mixnet/std",
"sp-offchain/std",
"sp-runtime/std",
"sp-session/std",
@@ -281,6 +285,7 @@ runtime-benchmarks = [
"pallet-lottery/runtime-benchmarks",
"pallet-membership/runtime-benchmarks",
"pallet-message-queue/runtime-benchmarks",
"pallet-mixnet/runtime-benchmarks",
"pallet-mmr/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-nft-fractionalization/runtime-benchmarks",
@@ -354,6 +359,7 @@ try-runtime = [
"pallet-lottery/try-runtime",
"pallet-membership/try-runtime",
"pallet-message-queue/try-runtime",
"pallet-mixnet/try-runtime",
"pallet-mmr/try-runtime",
"pallet-multisig/try-runtime",
"pallet-nft-fractionalization/try-runtime",