2022-07-16 21:49:35 +00:00
|
|
|
# This file is automatically @generated by Cargo.
|
|
|
|
# It is not intended for manual editing.
|
|
|
|
version = 3
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "Inflector"
|
|
|
|
version = "0.11.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3"
|
|
|
|
dependencies = [
|
|
|
|
"lazy_static",
|
|
|
|
"regex",
|
|
|
|
]
|
|
|
|
|
2022-12-21 04:12:26 +00:00
|
|
|
[[package]]
|
|
|
|
name = "addr2line"
|
|
|
|
version = "0.19.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97"
|
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"gimli",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-07-02 00:27:03 +00:00
|
|
|
[[package]]
|
|
|
|
name = "addr2line"
|
|
|
|
version = "0.20.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3"
|
|
|
|
dependencies = [
|
|
|
|
"gimli",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "adler"
|
|
|
|
version = "1.0.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "aead"
|
|
|
|
version = "0.3.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331"
|
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2023-01-16 15:42:31 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "aead"
|
|
|
|
version = "0.4.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877"
|
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2023-01-16 15:42:31 +00:00
|
|
|
"rand_core 0.6.4",
|
|
|
|
]
|
|
|
|
|
2023-03-06 12:39:43 +00:00
|
|
|
[[package]]
|
|
|
|
name = "aead"
|
2023-04-08 08:44:28 +00:00
|
|
|
version = "0.5.2"
|
2023-03-06 12:39:43 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-08 08:44:28 +00:00
|
|
|
checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0"
|
2023-03-06 12:39:43 +00:00
|
|
|
dependencies = [
|
|
|
|
"crypto-common",
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2023-03-06 12:39:43 +00:00
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "aes"
|
|
|
|
version = "0.6.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561"
|
|
|
|
dependencies = [
|
|
|
|
"aes-soft",
|
|
|
|
"aesni",
|
|
|
|
"cipher 0.2.5",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "aes"
|
|
|
|
version = "0.7.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
2022-10-29 08:54:42 +00:00
|
|
|
"cipher 0.3.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"cpufeatures",
|
2023-04-08 08:44:28 +00:00
|
|
|
"opaque-debug",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2022-12-07 23:05:06 +00:00
|
|
|
[[package]]
|
|
|
|
name = "aes"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.8.3"
|
2022-12-07 23:05:06 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2"
|
2022-12-07 23:05:06 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
2023-03-11 09:49:05 +00:00
|
|
|
"cipher 0.4.4",
|
2022-12-07 23:05:06 +00:00
|
|
|
"cpufeatures",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "aes-gcm"
|
|
|
|
version = "0.9.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6"
|
|
|
|
dependencies = [
|
2023-01-16 15:42:31 +00:00
|
|
|
"aead 0.4.3",
|
2022-12-07 23:05:06 +00:00
|
|
|
"aes 0.7.5",
|
2022-10-29 08:54:42 +00:00
|
|
|
"cipher 0.3.0",
|
2022-12-07 23:05:06 +00:00
|
|
|
"ctr 0.8.0",
|
2023-01-16 15:42:31 +00:00
|
|
|
"ghash 0.4.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
2023-03-06 12:39:43 +00:00
|
|
|
[[package]]
|
|
|
|
name = "aes-gcm"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.10.2"
|
2023-03-06 12:39:43 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237"
|
2023-03-06 12:39:43 +00:00
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"aead 0.5.2",
|
2023-06-22 10:25:30 +00:00
|
|
|
"aes 0.8.3",
|
2023-03-11 09:49:05 +00:00
|
|
|
"cipher 0.4.4",
|
2023-03-06 12:39:43 +00:00
|
|
|
"ctr 0.9.2",
|
|
|
|
"ghash 0.5.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "aes-soft"
|
|
|
|
version = "0.6.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072"
|
|
|
|
dependencies = [
|
|
|
|
"cipher 0.2.5",
|
2023-04-08 08:44:28 +00:00
|
|
|
"opaque-debug",
|
2023-01-16 15:42:31 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "aesni"
|
|
|
|
version = "0.10.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce"
|
|
|
|
dependencies = [
|
|
|
|
"cipher 0.2.5",
|
2023-04-08 08:44:28 +00:00
|
|
|
"opaque-debug",
|
2023-01-16 15:42:31 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "ahash"
|
|
|
|
version = "0.7.6"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
|
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"getrandom 0.2.10",
|
2022-07-16 21:49:35 +00:00
|
|
|
"once_cell",
|
|
|
|
"version_check",
|
|
|
|
]
|
|
|
|
|
2023-03-06 12:39:43 +00:00
|
|
|
[[package]]
|
|
|
|
name = "ahash"
|
|
|
|
version = "0.8.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
2023-06-22 10:25:30 +00:00
|
|
|
"getrandom 0.2.10",
|
2023-03-06 12:39:43 +00:00
|
|
|
"once_cell",
|
|
|
|
"version_check",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "aho-corasick"
|
2022-11-23 12:44:30 +00:00
|
|
|
version = "0.7.20"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-11-23 12:44:30 +00:00
|
|
|
checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"memchr",
|
|
|
|
]
|
|
|
|
|
2023-04-23 23:21:24 +00:00
|
|
|
[[package]]
|
|
|
|
name = "aho-corasick"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "1.0.2"
|
2023-04-23 23:21:24 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41"
|
2023-04-23 23:21:24 +00:00
|
|
|
dependencies = [
|
|
|
|
"memchr",
|
|
|
|
]
|
|
|
|
|
2023-06-29 01:16:33 +00:00
|
|
|
[[package]]
|
|
|
|
name = "allocator-api2"
|
|
|
|
version = "0.2.15"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "56fc6cf8dc8c4158eed8649f9b8b0ea1518eb62b544fe9490d66fa0b349eafe9"
|
|
|
|
|
2023-06-22 10:25:30 +00:00
|
|
|
[[package]]
|
|
|
|
name = "android-tzdata"
|
|
|
|
version = "0.1.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
|
|
|
|
|
2022-08-16 07:44:32 +00:00
|
|
|
[[package]]
|
|
|
|
name = "android_system_properties"
|
2022-09-18 19:30:38 +00:00
|
|
|
version = "0.1.5"
|
2022-08-16 07:44:32 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-09-18 19:30:38 +00:00
|
|
|
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
|
2022-08-16 07:44:32 +00:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "ansi_term"
|
|
|
|
version = "0.12.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
|
|
|
|
dependencies = [
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
2023-03-31 06:34:52 +00:00
|
|
|
[[package]]
|
|
|
|
name = "anstream"
|
2023-05-10 11:34:07 +00:00
|
|
|
version = "0.3.2"
|
2023-03-31 06:34:52 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-10 11:34:07 +00:00
|
|
|
checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163"
|
2023-03-31 06:34:52 +00:00
|
|
|
dependencies = [
|
|
|
|
"anstyle",
|
|
|
|
"anstyle-parse",
|
2023-04-14 01:05:18 +00:00
|
|
|
"anstyle-query",
|
2023-03-31 06:34:52 +00:00
|
|
|
"anstyle-wincon",
|
2023-04-14 01:05:18 +00:00
|
|
|
"colorchoice",
|
2023-03-31 06:34:52 +00:00
|
|
|
"is-terminal",
|
|
|
|
"utf8parse",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "anstyle"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "1.0.1"
|
2023-03-31 06:34:52 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd"
|
2023-03-31 06:34:52 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "anstyle-parse"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.2.1"
|
2023-03-31 06:34:52 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333"
|
2023-03-31 06:34:52 +00:00
|
|
|
dependencies = [
|
|
|
|
"utf8parse",
|
|
|
|
]
|
|
|
|
|
2023-04-14 01:05:18 +00:00
|
|
|
[[package]]
|
|
|
|
name = "anstyle-query"
|
|
|
|
version = "1.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
|
|
|
|
dependencies = [
|
|
|
|
"windows-sys 0.48.0",
|
|
|
|
]
|
|
|
|
|
2023-03-31 06:34:52 +00:00
|
|
|
[[package]]
|
|
|
|
name = "anstyle-wincon"
|
2023-05-01 07:17:37 +00:00
|
|
|
version = "1.0.1"
|
2023-03-31 06:34:52 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-01 07:17:37 +00:00
|
|
|
checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188"
|
2023-03-31 06:34:52 +00:00
|
|
|
dependencies = [
|
|
|
|
"anstyle",
|
2023-04-14 01:05:18 +00:00
|
|
|
"windows-sys 0.48.0",
|
2023-03-31 06:34:52 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "anyhow"
|
2023-05-01 07:17:37 +00:00
|
|
|
version = "1.0.71"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-01 07:17:37 +00:00
|
|
|
checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "approx"
|
|
|
|
version = "0.5.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6"
|
|
|
|
dependencies = [
|
|
|
|
"num-traits",
|
|
|
|
]
|
|
|
|
|
2022-09-29 18:33:09 +00:00
|
|
|
[[package]]
|
2023-01-16 15:42:31 +00:00
|
|
|
name = "arc-swap"
|
|
|
|
version = "1.6.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6"
|
2022-09-29 18:33:09 +00:00
|
|
|
|
2022-07-17 21:17:23 +00:00
|
|
|
[[package]]
|
2022-09-29 18:33:09 +00:00
|
|
|
name = "array-bytes"
|
2023-01-05 03:52:41 +00:00
|
|
|
version = "4.2.0"
|
2022-07-17 21:17:23 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-05 03:52:41 +00:00
|
|
|
checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6"
|
2022-07-17 21:17:23 +00:00
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "arrayref"
|
2023-03-25 04:45:33 +00:00
|
|
|
version = "0.3.7"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-25 04:45:33 +00:00
|
|
|
checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "arrayvec"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.7.4"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ascii-canvas"
|
|
|
|
version = "3.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6"
|
|
|
|
dependencies = [
|
|
|
|
"term",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2023-01-16 15:42:31 +00:00
|
|
|
name = "asn1-rs"
|
|
|
|
version = "0.3.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-16 15:42:31 +00:00
|
|
|
checksum = "30ff05a702273012438132f449575dbc804e27b2f3cbe3069aa237d26c98fa33"
|
|
|
|
dependencies = [
|
|
|
|
"asn1-rs-derive 0.1.0",
|
|
|
|
"asn1-rs-impl",
|
|
|
|
"displaydoc",
|
|
|
|
"nom",
|
|
|
|
"num-traits",
|
|
|
|
"rusticata-macros",
|
|
|
|
"thiserror",
|
2023-06-22 10:25:30 +00:00
|
|
|
"time 0.3.22",
|
2023-01-16 15:42:31 +00:00
|
|
|
]
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
2023-01-16 15:42:31 +00:00
|
|
|
name = "asn1-rs"
|
2023-03-11 09:49:05 +00:00
|
|
|
version = "0.5.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-11 09:49:05 +00:00
|
|
|
checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-01-16 15:42:31 +00:00
|
|
|
"asn1-rs-derive 0.4.0",
|
|
|
|
"asn1-rs-impl",
|
|
|
|
"displaydoc",
|
|
|
|
"nom",
|
|
|
|
"num-traits",
|
|
|
|
"rusticata-macros",
|
|
|
|
"thiserror",
|
2023-06-22 10:25:30 +00:00
|
|
|
"time 0.3.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2023-01-16 15:42:31 +00:00
|
|
|
name = "asn1-rs-derive"
|
|
|
|
version = "0.1.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-16 15:42:31 +00:00
|
|
|
checksum = "db8b7511298d5b7784b40b092d9e9dcd3a627a5707e4b5e507931ab0d44eeebf"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-01-16 15:42:31 +00:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2023-01-16 15:42:31 +00:00
|
|
|
"synstructure",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2023-01-16 15:42:31 +00:00
|
|
|
name = "asn1-rs-derive"
|
|
|
|
version = "0.4.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-16 15:42:31 +00:00
|
|
|
checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-01-16 15:42:31 +00:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2023-01-16 15:42:31 +00:00
|
|
|
"synstructure",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "asn1-rs-impl"
|
|
|
|
version = "0.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-03-26 12:43:01 +00:00
|
|
|
[[package]]
|
|
|
|
name = "async-channel"
|
|
|
|
version = "1.8.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833"
|
|
|
|
dependencies = [
|
|
|
|
"concurrent-queue",
|
|
|
|
"event-listener",
|
|
|
|
"futures-core",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "async-io"
|
2023-03-25 04:45:33 +00:00
|
|
|
version = "1.13.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-25 04:45:33 +00:00
|
|
|
checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-11-04 12:07:37 +00:00
|
|
|
"async-lock",
|
2022-09-18 19:30:38 +00:00
|
|
|
"autocfg",
|
2023-03-25 04:45:33 +00:00
|
|
|
"cfg-if",
|
2022-12-07 22:56:53 +00:00
|
|
|
"concurrent-queue",
|
2022-07-16 21:49:35 +00:00
|
|
|
"futures-lite",
|
|
|
|
"log",
|
|
|
|
"parking",
|
|
|
|
"polling",
|
2023-07-02 00:27:03 +00:00
|
|
|
"rustix 0.37.21",
|
2022-07-16 21:49:35 +00:00
|
|
|
"slab",
|
2023-06-22 10:25:30 +00:00
|
|
|
"socket2 0.4.9",
|
2022-07-16 21:49:35 +00:00
|
|
|
"waker-fn",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "async-lock"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "2.7.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"event-listener",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "async-trait"
|
2023-03-25 04:45:33 +00:00
|
|
|
version = "0.1.68"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-25 04:45:33 +00:00
|
|
|
checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "async_io_stream"
|
|
|
|
version = "0.3.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c"
|
|
|
|
dependencies = [
|
|
|
|
"futures",
|
|
|
|
"pharos",
|
2023-01-05 03:52:41 +00:00
|
|
|
"rustc_version",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "asynchronous-codec"
|
2022-11-11 04:59:20 +00:00
|
|
|
version = "0.6.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-11-11 04:59:20 +00:00
|
|
|
checksum = "06a0daa378f5fd10634e44b0a29b2a87b890657658e072a30d6f26e57ddee182"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"futures-sink",
|
|
|
|
"futures-util",
|
|
|
|
"memchr",
|
|
|
|
"pin-project-lite 0.2.9",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "atomic-waker"
|
2023-04-08 08:44:28 +00:00
|
|
|
version = "1.1.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-08 08:44:28 +00:00
|
|
|
checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "auto_impl"
|
2023-05-10 11:34:07 +00:00
|
|
|
version = "1.1.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-10 11:34:07 +00:00
|
|
|
checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro-error",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "autocfg"
|
|
|
|
version = "1.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "backtrace"
|
2023-07-02 00:27:03 +00:00
|
|
|
version = "0.3.68"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-07-02 00:27:03 +00:00
|
|
|
checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-07-02 00:27:03 +00:00
|
|
|
"addr2line 0.20.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"cc",
|
|
|
|
"cfg-if",
|
|
|
|
"libc",
|
2023-07-02 00:27:03 +00:00
|
|
|
"miniz_oxide",
|
|
|
|
"object 0.31.1",
|
2022-07-16 21:49:35 +00:00
|
|
|
"rustc-demangle",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "base-x"
|
|
|
|
version = "0.2.11"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "base16ct"
|
|
|
|
version = "0.1.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce"
|
|
|
|
|
|
|
|
[[package]]
|
2023-03-25 04:45:33 +00:00
|
|
|
name = "base16ct"
|
|
|
|
version = "0.2.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-25 04:45:33 +00:00
|
|
|
checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "base58"
|
|
|
|
version = "0.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "base58-monero"
|
|
|
|
version = "1.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9d079cdf47e1ca75554200bb2f30bff5a5af16964cac4a566b18de9a5d48db2b"
|
|
|
|
dependencies = [
|
|
|
|
"thiserror",
|
2023-06-29 08:14:29 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "base58-monero"
|
|
|
|
version = "1.1.0"
|
|
|
|
source = "git+https://github.com/monero-rs/base58-monero?rev=5045e8d2b817b3b6c1190661f504e879bc769c29#5045e8d2b817b3b6c1190661f504e879bc769c29"
|
|
|
|
dependencies = [
|
2022-07-16 21:49:35 +00:00
|
|
|
"tiny-keccak",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "base64"
|
2022-10-22 01:40:50 +00:00
|
|
|
version = "0.13.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-10-22 01:40:50 +00:00
|
|
|
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "base64"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.21.2"
|
2023-01-16 15:42:31 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d"
|
2023-01-16 15:42:31 +00:00
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "base64ct"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "1.6.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "bech32"
|
|
|
|
version = "0.7.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2dabbe35f96fb9507f7330793dc490461b2962659ac5d427181e451a623751d1"
|
|
|
|
|
2023-01-31 12:48:14 +00:00
|
|
|
[[package]]
|
|
|
|
name = "bech32"
|
|
|
|
version = "0.9.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "beef"
|
|
|
|
version = "0.5.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1"
|
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "bincode"
|
|
|
|
version = "1.3.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
|
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "bindgen"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.65.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"bitflags 1.3.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"cexpr",
|
|
|
|
"clang-sys",
|
|
|
|
"lazy_static",
|
|
|
|
"lazycell",
|
|
|
|
"peeking_take_while",
|
2023-06-28 18:57:58 +00:00
|
|
|
"prettyplease 0.2.9",
|
2022-07-16 21:49:35 +00:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"regex",
|
|
|
|
"rustc-hash",
|
|
|
|
"shlex",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "bit-set"
|
2022-08-16 07:44:32 +00:00
|
|
|
version = "0.5.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-08-16 07:44:32 +00:00
|
|
|
checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"bit-vec",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "bit-vec"
|
|
|
|
version = "0.6.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
|
|
|
|
|
2023-01-31 12:48:14 +00:00
|
|
|
[[package]]
|
|
|
|
name = "bitcoin"
|
2023-04-09 06:31:10 +00:00
|
|
|
version = "0.30.0"
|
2023-01-31 12:48:14 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 06:31:10 +00:00
|
|
|
checksum = "b36f4c848f6bd9ff208128f08751135846cc23ae57d66ab10a22efff1c675f3c"
|
2023-01-31 12:48:14 +00:00
|
|
|
dependencies = [
|
|
|
|
"bech32 0.9.1",
|
2023-04-09 06:31:10 +00:00
|
|
|
"bitcoin-private",
|
2023-01-31 12:48:14 +00:00
|
|
|
"bitcoin_hashes",
|
2023-04-09 06:31:10 +00:00
|
|
|
"hex_lit",
|
2023-01-31 12:48:14 +00:00
|
|
|
"secp256k1",
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
2023-04-09 06:31:10 +00:00
|
|
|
[[package]]
|
|
|
|
name = "bitcoin-private"
|
|
|
|
version = "0.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "73290177011694f38ec25e165d0387ab7ea749a4b81cd4c80dae5988229f7a57"
|
|
|
|
|
2023-01-31 12:48:14 +00:00
|
|
|
[[package]]
|
|
|
|
name = "bitcoin-serai"
|
2023-03-21 00:28:41 +00:00
|
|
|
version = "0.2.0"
|
2023-01-31 12:48:14 +00:00
|
|
|
dependencies = [
|
|
|
|
"bitcoin",
|
|
|
|
"flexible-transcript",
|
|
|
|
"hex",
|
2023-03-28 08:38:01 +00:00
|
|
|
"k256",
|
2023-01-31 12:48:14 +00:00
|
|
|
"lazy_static",
|
|
|
|
"modular-frost",
|
|
|
|
"rand_core 0.6.4",
|
|
|
|
"reqwest",
|
|
|
|
"secp256k1",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2023-01-31 12:48:14 +00:00
|
|
|
"thiserror",
|
2023-03-18 01:25:38 +00:00
|
|
|
"tokio",
|
2023-03-18 00:47:42 +00:00
|
|
|
"zeroize",
|
2023-01-31 12:48:14 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "bitcoin_hashes"
|
2023-04-09 06:31:10 +00:00
|
|
|
version = "0.12.0"
|
2023-01-31 12:48:14 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 06:31:10 +00:00
|
|
|
checksum = "5d7066118b13d4b20b23645932dfb3a81ce7e29f95726c2036fa33cd7b092501"
|
2023-01-31 12:48:14 +00:00
|
|
|
dependencies = [
|
2023-04-09 06:31:10 +00:00
|
|
|
"bitcoin-private",
|
2023-01-31 12:48:14 +00:00
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "bitflags"
|
|
|
|
version = "1.3.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
|
|
|
|
2023-06-28 18:57:58 +00:00
|
|
|
[[package]]
|
|
|
|
name = "bitflags"
|
|
|
|
version = "2.3.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "bitvec"
|
|
|
|
version = "0.17.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c"
|
|
|
|
dependencies = [
|
|
|
|
"either",
|
|
|
|
"radium 0.3.0",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "bitvec"
|
|
|
|
version = "1.0.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c"
|
|
|
|
dependencies = [
|
|
|
|
"funty",
|
|
|
|
"radium 0.7.0",
|
|
|
|
"tap",
|
|
|
|
"wyz",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "blake2"
|
2022-12-21 04:12:26 +00:00
|
|
|
version = "0.10.6"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-21 04:12:26 +00:00
|
|
|
checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "blake2b_simd"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "1.0.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"arrayref",
|
2023-04-08 08:44:28 +00:00
|
|
|
"arrayvec",
|
2023-06-22 10:25:30 +00:00
|
|
|
"constant_time_eq 0.2.6",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "blake2s_simd"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "1.0.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "6637f448b9e61dfadbdcbae9a885fadee1f3eaffb1f8d3c1965d3ade8bdfd44f"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"arrayref",
|
2023-04-08 08:44:28 +00:00
|
|
|
"arrayvec",
|
2023-06-22 10:25:30 +00:00
|
|
|
"constant_time_eq 0.2.6",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "blake3"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "1.4.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "729b71f35bd3fa1a4c86b85d32c8b9069ea7fe14f7a53cfabb65f62d4265b888"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"arrayref",
|
2023-04-08 08:44:28 +00:00
|
|
|
"arrayvec",
|
2022-07-16 21:49:35 +00:00
|
|
|
"cc",
|
|
|
|
"cfg-if",
|
2023-06-22 10:25:30 +00:00
|
|
|
"constant_time_eq 0.2.6",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "block-buffer"
|
|
|
|
version = "0.9.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
|
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "block-buffer"
|
2023-03-11 09:49:05 +00:00
|
|
|
version = "0.10.4"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-11 09:49:05 +00:00
|
|
|
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "block-modes"
|
|
|
|
version = "0.7.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0"
|
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"block-padding",
|
2023-01-16 15:42:31 +00:00
|
|
|
"cipher 0.2.5",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
2023-01-16 15:42:31 +00:00
|
|
|
name = "block-padding"
|
|
|
|
version = "0.2.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-16 15:42:31 +00:00
|
|
|
checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae"
|
2022-12-07 22:56:53 +00:00
|
|
|
|
2023-03-28 08:38:01 +00:00
|
|
|
[[package]]
|
|
|
|
name = "bls12_381"
|
|
|
|
version = "0.8.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d7bc6d6292be3a19e6379786dac800f551e5865a5bb51ebbe3064ab80433f403"
|
|
|
|
dependencies = [
|
|
|
|
"ff 0.13.0",
|
|
|
|
"group 0.13.0",
|
|
|
|
"pairing",
|
|
|
|
"rand_core 0.6.4",
|
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
2023-03-06 12:39:43 +00:00
|
|
|
[[package]]
|
|
|
|
name = "bounded-collections"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.1.8"
|
2023-03-06 12:39:43 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "eb5b05133427c07c4776906f673ccf36c21b102c9829c641a5b56bd151d44fd6"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-03-06 12:39:43 +00:00
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"serde",
|
2022-12-07 22:56:53 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "bs58"
|
|
|
|
version = "0.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3"
|
2023-03-25 04:45:33 +00:00
|
|
|
dependencies = [
|
|
|
|
"sha2 0.9.9",
|
|
|
|
]
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "bstr"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "1.5.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"memchr",
|
2023-01-08 14:10:17 +00:00
|
|
|
"serde",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "build-helper"
|
|
|
|
version = "0.1.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "bdce191bf3fa4995ce948c8c83b4640a1745457a149e73c6db75b4ffe36aad5f"
|
|
|
|
dependencies = [
|
|
|
|
"semver 0.6.0",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "bumpalo"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "3.13.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "byte-slice-cast"
|
2022-11-04 12:07:37 +00:00
|
|
|
version = "1.2.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-11-04 12:07:37 +00:00
|
|
|
checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
2023-03-06 12:39:43 +00:00
|
|
|
[[package]]
|
|
|
|
name = "bytemuck"
|
|
|
|
version = "1.13.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "byteorder"
|
|
|
|
version = "1.4.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "bytes"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "1.4.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "bzip2"
|
2023-01-08 14:10:17 +00:00
|
|
|
version = "0.4.4"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-08 14:10:17 +00:00
|
|
|
checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"bzip2-sys",
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "bzip2-sys"
|
|
|
|
version = "0.1.11+1.0.8"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc"
|
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
"libc",
|
|
|
|
"pkg-config",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "camino"
|
2023-03-11 09:49:05 +00:00
|
|
|
version = "1.1.4"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-11 09:49:05 +00:00
|
|
|
checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cargo-platform"
|
|
|
|
version = "0.1.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27"
|
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cargo_metadata"
|
2023-04-08 08:44:28 +00:00
|
|
|
version = "0.15.4"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-08 08:44:28 +00:00
|
|
|
checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"camino",
|
|
|
|
"cargo-platform",
|
2023-03-16 23:37:32 +00:00
|
|
|
"semver 1.0.17",
|
2022-07-16 21:49:35 +00:00
|
|
|
"serde",
|
|
|
|
"serde_json",
|
2022-11-04 12:07:37 +00:00
|
|
|
"thiserror",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cc"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "1.0.79"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"jobserver",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2023-01-16 15:42:31 +00:00
|
|
|
name = "ccm"
|
|
|
|
version = "0.3.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-16 15:42:31 +00:00
|
|
|
checksum = "5aca1a8fbc20b50ac9673ff014abfb2b5f4085ee1a850d408f14a159c5853ac7"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-01-16 15:42:31 +00:00
|
|
|
"aead 0.3.2",
|
|
|
|
"cipher 0.2.5",
|
|
|
|
"subtle",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cexpr"
|
|
|
|
version = "0.6.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
|
|
|
|
dependencies = [
|
|
|
|
"nom",
|
|
|
|
]
|
|
|
|
|
2022-09-29 18:33:09 +00:00
|
|
|
[[package]]
|
|
|
|
name = "cfg-expr"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.15.3"
|
2022-09-29 18:33:09 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "215c0072ecc28f92eeb0eea38ba63ddfcb65c2828c46311d646f1a3ff5f9841c"
|
2022-09-29 18:33:09 +00:00
|
|
|
dependencies = [
|
|
|
|
"smallvec",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "cfg-if"
|
|
|
|
version = "1.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|
|
|
|
2022-09-29 18:33:09 +00:00
|
|
|
[[package]]
|
|
|
|
name = "cfg_aliases"
|
|
|
|
version = "0.1.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "chacha20"
|
|
|
|
version = "0.8.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
2022-10-29 08:54:42 +00:00
|
|
|
"cipher 0.3.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"cpufeatures",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2022-10-29 08:54:42 +00:00
|
|
|
[[package]]
|
|
|
|
name = "chacha20"
|
2023-04-08 08:44:28 +00:00
|
|
|
version = "0.9.1"
|
2022-10-29 08:54:42 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-08 08:44:28 +00:00
|
|
|
checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818"
|
2022-10-29 08:54:42 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
2023-03-11 09:49:05 +00:00
|
|
|
"cipher 0.4.4",
|
2022-10-29 08:54:42 +00:00
|
|
|
"cpufeatures",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "chacha20poly1305"
|
|
|
|
version = "0.9.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5"
|
|
|
|
dependencies = [
|
2023-01-16 15:42:31 +00:00
|
|
|
"aead 0.4.3",
|
2022-10-29 08:54:42 +00:00
|
|
|
"chacha20 0.8.2",
|
|
|
|
"cipher 0.3.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"poly1305",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "chrono"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.4.26"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"android-tzdata",
|
2022-08-16 07:44:32 +00:00
|
|
|
"iana-time-zone",
|
|
|
|
"js-sys",
|
2022-07-16 21:49:35 +00:00
|
|
|
"num-traits",
|
2023-01-17 07:35:22 +00:00
|
|
|
"serde",
|
2022-12-07 22:56:53 +00:00
|
|
|
"time 0.1.45",
|
2022-08-16 07:44:32 +00:00
|
|
|
"wasm-bindgen",
|
2022-07-16 21:49:35 +00:00
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cid"
|
2022-08-16 07:44:32 +00:00
|
|
|
version = "0.8.6"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-08-16 07:44:32 +00:00
|
|
|
checksum = "f6ed9c8b2d17acb8110c46f1da5bf4a696d745e1474a16db0cd2b49cd0249bf2"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"core2",
|
|
|
|
"multibase",
|
2023-03-06 12:39:43 +00:00
|
|
|
"multihash 0.16.3",
|
2022-07-16 21:49:35 +00:00
|
|
|
"serde",
|
|
|
|
"unsigned-varint",
|
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "cipher"
|
|
|
|
version = "0.2.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801"
|
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2023-01-16 15:42:31 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "cipher"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7"
|
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2022-10-29 08:54:42 +00:00
|
|
|
[[package]]
|
|
|
|
name = "cipher"
|
2023-03-11 09:49:05 +00:00
|
|
|
version = "0.4.4"
|
2022-10-29 08:54:42 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-11 09:49:05 +00:00
|
|
|
checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
|
2022-10-29 08:54:42 +00:00
|
|
|
dependencies = [
|
|
|
|
"crypto-common",
|
|
|
|
"inout",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ciphersuite"
|
2023-03-21 00:28:41 +00:00
|
|
|
version = "0.3.0"
|
2022-10-29 08:54:42 +00:00
|
|
|
dependencies = [
|
|
|
|
"dalek-ff-group",
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
|
|
|
"elliptic-curve 0.13.5",
|
2023-03-28 08:38:01 +00:00
|
|
|
"ff 0.13.0",
|
2022-12-25 07:50:10 +00:00
|
|
|
"ff-group-tests",
|
2023-03-02 15:04:18 +00:00
|
|
|
"flexible-transcript",
|
2023-03-28 08:38:01 +00:00
|
|
|
"group 0.13.0",
|
2022-12-25 07:50:10 +00:00
|
|
|
"hex",
|
2023-03-28 08:38:01 +00:00
|
|
|
"k256",
|
2022-10-29 08:54:42 +00:00
|
|
|
"minimal-ed448",
|
2023-04-16 03:21:18 +00:00
|
|
|
"p256 0.13.2",
|
2022-10-29 08:54:42 +00:00
|
|
|
"rand_core 0.6.4",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2022-10-29 08:54:42 +00:00
|
|
|
"sha3",
|
2023-04-22 08:38:47 +00:00
|
|
|
"std-shims",
|
2022-10-29 08:54:42 +00:00
|
|
|
"subtle",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "clang-sys"
|
2023-03-31 06:34:52 +00:00
|
|
|
version = "1.6.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-31 06:34:52 +00:00
|
|
|
checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"glob",
|
|
|
|
"libc",
|
2022-10-20 05:05:36 +00:00
|
|
|
"libloading",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "clap"
|
2023-07-02 00:27:03 +00:00
|
|
|
version = "4.3.10"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-07-02 00:27:03 +00:00
|
|
|
checksum = "384e169cc618c613d5e3ca6404dda77a8685a63e08660dcc64abaf7da7cb0c7a"
|
2022-10-20 05:05:36 +00:00
|
|
|
dependencies = [
|
2023-03-31 06:34:52 +00:00
|
|
|
"clap_builder",
|
2023-06-22 10:25:30 +00:00
|
|
|
"clap_derive",
|
2022-10-20 05:05:36 +00:00
|
|
|
"once_cell",
|
2023-03-31 06:34:52 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "clap_builder"
|
2023-07-02 00:27:03 +00:00
|
|
|
version = "4.3.10"
|
2023-03-31 06:34:52 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-07-02 00:27:03 +00:00
|
|
|
checksum = "ef137bbe35aab78bdb468ccfba75a5f4d8321ae011d34063770780545176af2d"
|
2023-03-31 06:34:52 +00:00
|
|
|
dependencies = [
|
|
|
|
"anstream",
|
|
|
|
"anstyle",
|
2023-06-22 10:25:30 +00:00
|
|
|
"clap_lex",
|
2022-10-20 05:05:36 +00:00
|
|
|
"strsim",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "clap_derive"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "4.3.2"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f"
|
2022-10-20 05:05:36 +00:00
|
|
|
dependencies = [
|
2023-03-06 12:39:43 +00:00
|
|
|
"heck 0.4.1",
|
2022-10-20 05:05:36 +00:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-10-20 05:05:36 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "clap_lex"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.5.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b"
|
2022-10-20 05:05:36 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "codespan-reporting"
|
|
|
|
version = "0.11.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e"
|
|
|
|
dependencies = [
|
|
|
|
"termcolor",
|
|
|
|
"unicode-width",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "coins-bip32"
|
2023-03-25 04:45:33 +00:00
|
|
|
version = "0.8.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-25 04:45:33 +00:00
|
|
|
checksum = "b30a84aab436fcb256a2ab3c80663d8aec686e6bae12827bb05fef3e1e439c9f"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"bincode",
|
|
|
|
"bs58",
|
|
|
|
"coins-core",
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
|
|
|
"getrandom 0.2.10",
|
2022-07-16 21:49:35 +00:00
|
|
|
"hmac 0.12.1",
|
2023-03-28 08:38:01 +00:00
|
|
|
"k256",
|
2022-07-16 21:49:35 +00:00
|
|
|
"lazy_static",
|
|
|
|
"serde",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "coins-bip39"
|
2023-04-11 13:23:54 +00:00
|
|
|
version = "0.8.6"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-11 13:23:54 +00:00
|
|
|
checksum = "84f4d04ee18e58356accd644896aeb2094ddeafb6a713e056cef0c0a8e468c15"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"bitvec 0.17.4",
|
|
|
|
"coins-bip32",
|
2023-06-22 10:25:30 +00:00
|
|
|
"getrandom 0.2.10",
|
2022-07-16 21:49:35 +00:00
|
|
|
"hmac 0.12.1",
|
2023-03-25 04:45:33 +00:00
|
|
|
"once_cell",
|
|
|
|
"pbkdf2 0.12.1",
|
2022-07-16 21:49:35 +00:00
|
|
|
"rand 0.8.5",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "coins-core"
|
2023-03-25 04:45:33 +00:00
|
|
|
version = "0.8.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-25 04:45:33 +00:00
|
|
|
checksum = "9b949a1c63fb7eb591eb7ba438746326aedf0ae843e51ec92ba6bec5bb382c4f"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"base64 0.21.2",
|
2023-01-31 12:48:14 +00:00
|
|
|
"bech32 0.7.3",
|
2023-03-25 04:45:33 +00:00
|
|
|
"bs58",
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2022-07-16 21:49:35 +00:00
|
|
|
"hex",
|
|
|
|
"ripemd",
|
|
|
|
"serde",
|
|
|
|
"serde_derive",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2022-10-20 05:05:36 +00:00
|
|
|
"sha3",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
2023-04-14 01:05:18 +00:00
|
|
|
[[package]]
|
|
|
|
name = "colorchoice"
|
|
|
|
version = "1.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "comfy-table"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "6.2.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "7e959d788268e3bf9d35ace83e81b124190378e4c91c9067524675e33394b8ba"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-08-16 07:44:32 +00:00
|
|
|
"strum",
|
|
|
|
"strum_macros",
|
2022-07-16 21:49:35 +00:00
|
|
|
"unicode-width",
|
|
|
|
]
|
|
|
|
|
2022-11-11 04:59:20 +00:00
|
|
|
[[package]]
|
|
|
|
name = "concurrent-queue"
|
2023-04-08 08:44:28 +00:00
|
|
|
version = "2.2.0"
|
2022-11-11 04:59:20 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-08 08:44:28 +00:00
|
|
|
checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c"
|
2022-11-11 04:59:20 +00:00
|
|
|
dependencies = [
|
|
|
|
"crossbeam-utils",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "const-oid"
|
2023-07-02 00:27:03 +00:00
|
|
|
version = "0.9.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-07-02 00:27:03 +00:00
|
|
|
checksum = "6340df57935414636969091153f35f68d9f00bbc8fb4a9c6054706c213e6c6bc"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "constant_time_eq"
|
|
|
|
version = "0.1.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
|
|
|
|
|
2022-11-21 07:23:38 +00:00
|
|
|
[[package]]
|
|
|
|
name = "constant_time_eq"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.2.6"
|
2022-11-21 07:23:38 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6"
|
2022-11-21 07:23:38 +00:00
|
|
|
|
2023-04-11 13:21:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "coordinator"
|
|
|
|
version = "0.1.0"
|
|
|
|
dependencies = [
|
2023-04-16 04:51:56 +00:00
|
|
|
"async-trait",
|
2023-04-11 23:04:53 +00:00
|
|
|
"blake2",
|
2023-04-16 04:51:56 +00:00
|
|
|
"ciphersuite",
|
|
|
|
"flexible-transcript",
|
2023-04-23 20:56:23 +00:00
|
|
|
"futures",
|
2023-05-10 04:46:51 +00:00
|
|
|
"hex",
|
2023-04-23 07:48:50 +00:00
|
|
|
"lazy_static",
|
2023-04-15 21:38:47 +00:00
|
|
|
"log",
|
2023-04-11 23:04:53 +00:00
|
|
|
"modular-frost",
|
2023-04-18 06:01:53 +00:00
|
|
|
"parity-scale-codec",
|
2023-04-11 23:04:53 +00:00
|
|
|
"processor-messages",
|
|
|
|
"rand_core 0.6.4",
|
2023-04-23 02:27:12 +00:00
|
|
|
"schnorr-signatures",
|
2023-05-10 04:46:51 +00:00
|
|
|
"schnorrkel",
|
2023-04-15 04:40:33 +00:00
|
|
|
"serai-client",
|
2023-04-15 21:38:47 +00:00
|
|
|
"serai-db",
|
2023-04-22 14:49:52 +00:00
|
|
|
"sp-application-crypto",
|
2023-04-11 13:21:35 +00:00
|
|
|
"tokio",
|
2023-04-11 23:04:53 +00:00
|
|
|
"tributary-chain",
|
2023-04-16 04:51:56 +00:00
|
|
|
"zeroize",
|
2023-04-11 13:21:35 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "core-foundation"
|
|
|
|
version = "0.9.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
|
|
|
|
dependencies = [
|
|
|
|
"core-foundation-sys",
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "core-foundation-sys"
|
2023-04-08 08:44:28 +00:00
|
|
|
version = "0.8.4"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-08 08:44:28 +00:00
|
|
|
checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "core2"
|
|
|
|
version = "0.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505"
|
|
|
|
dependencies = [
|
|
|
|
"memchr",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cpp_demangle"
|
|
|
|
version = "0.3.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cpufeatures"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.2.8"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-bforest"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.95.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "1277fbfa94bc82c8ec4af2ded3e639d49ca5f7f3c7eeab2c66accd135ece4e70"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cranelift-entity",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-codegen"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.95.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "c6e8c31ad3b2270e9aeec38723888fe1b0ace3bea2b06b3f749ccf46661d3220"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-09-29 18:33:09 +00:00
|
|
|
"bumpalo",
|
2022-07-16 21:49:35 +00:00
|
|
|
"cranelift-bforest",
|
|
|
|
"cranelift-codegen-meta",
|
|
|
|
"cranelift-codegen-shared",
|
|
|
|
"cranelift-entity",
|
|
|
|
"cranelift-isle",
|
2023-06-28 18:57:58 +00:00
|
|
|
"gimli",
|
|
|
|
"hashbrown 0.13.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"log",
|
|
|
|
"regalloc2",
|
|
|
|
"smallvec",
|
|
|
|
"target-lexicon",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-codegen-meta"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.95.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "c8ac5ac30d62b2d66f12651f6b606dbdfd9c2cfd0908de6b387560a277c5c9da"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cranelift-codegen-shared",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-codegen-shared"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.95.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "dd82b8b376247834b59ed9bdc0ddeb50f517452827d4a11bccf5937b213748b8"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-entity"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.95.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "40099d38061b37e505e63f89bab52199037a72b931ad4868d9089ff7268660b0"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-frontend"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.95.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "64a25d9d0a0ae3079c463c34115ec59507b4707175454f0eee0891e83e30e82d"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cranelift-codegen",
|
|
|
|
"log",
|
|
|
|
"smallvec",
|
|
|
|
"target-lexicon",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-isle"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.95.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "80de6a7d0486e4acbd5f9f87ec49912bf4c8fb6aea00087b989685460d4469ba"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-native"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.95.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "bb6b03e0e03801c4b3fd8ce0758a94750c07a44e7944cc0ffbf0d3f2e7c79b00"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cranelift-codegen",
|
|
|
|
"libc",
|
|
|
|
"target-lexicon",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-wasm"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.95.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "ff3220489a3d928ad91e59dd7aeaa8b3de18afb554a6211213673a71c90737ac"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cranelift-codegen",
|
|
|
|
"cranelift-entity",
|
|
|
|
"cranelift-frontend",
|
|
|
|
"itertools",
|
|
|
|
"log",
|
|
|
|
"smallvec",
|
|
|
|
"wasmparser",
|
|
|
|
"wasmtime-types",
|
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "crc"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "3.0.1"
|
2023-01-16 15:42:31 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe"
|
2023-01-16 15:42:31 +00:00
|
|
|
dependencies = [
|
|
|
|
"crc-catalog",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crc-catalog"
|
|
|
|
version = "2.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "crc32fast"
|
|
|
|
version = "1.3.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crossbeam-channel"
|
2023-04-10 04:27:17 +00:00
|
|
|
version = "0.5.8"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-10 04:27:17 +00:00
|
|
|
checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"crossbeam-utils",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crossbeam-deque"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.8.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"crossbeam-epoch",
|
|
|
|
"crossbeam-utils",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crossbeam-epoch"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.9.15"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"autocfg",
|
|
|
|
"cfg-if",
|
|
|
|
"crossbeam-utils",
|
2023-06-22 10:25:30 +00:00
|
|
|
"memoffset 0.9.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"scopeguard",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crossbeam-utils"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.8.16"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crunchy"
|
|
|
|
version = "0.2.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crypto-bigint"
|
2022-10-20 05:05:36 +00:00
|
|
|
version = "0.4.9"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-10-20 05:05:36 +00:00
|
|
|
checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2022-09-18 19:30:38 +00:00
|
|
|
"rand_core 0.6.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
"subtle",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2023-03-17 19:31:04 +00:00
|
|
|
[[package]]
|
|
|
|
name = "crypto-bigint"
|
2023-05-01 07:17:37 +00:00
|
|
|
version = "0.5.2"
|
2023-03-17 19:31:04 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-01 07:17:37 +00:00
|
|
|
checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15"
|
2023-03-17 19:31:04 +00:00
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2023-03-17 19:31:04 +00:00
|
|
|
"rand_core 0.6.4",
|
|
|
|
"subtle",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "crypto-common"
|
2022-07-18 00:56:10 +00:00
|
|
|
version = "0.1.6"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-07-18 00:56:10 +00:00
|
|
|
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2023-03-06 12:39:43 +00:00
|
|
|
"rand_core 0.6.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
"typenum",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crypto-mac"
|
|
|
|
version = "0.8.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab"
|
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2022-07-16 21:49:35 +00:00
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crypto-mac"
|
|
|
|
version = "0.11.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714"
|
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2022-07-16 21:49:35 +00:00
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ctr"
|
|
|
|
version = "0.8.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea"
|
|
|
|
dependencies = [
|
2022-10-29 08:54:42 +00:00
|
|
|
"cipher 0.3.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2022-12-07 23:05:06 +00:00
|
|
|
[[package]]
|
|
|
|
name = "ctr"
|
|
|
|
version = "0.9.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835"
|
|
|
|
dependencies = [
|
2023-03-11 09:49:05 +00:00
|
|
|
"cipher 0.4.4",
|
2022-12-07 23:05:06 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "curve25519-dalek"
|
|
|
|
version = "3.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61"
|
|
|
|
dependencies = [
|
|
|
|
"byteorder",
|
|
|
|
"digest 0.9.0",
|
|
|
|
"rand_core 0.5.1",
|
2023-01-17 07:35:22 +00:00
|
|
|
"serde",
|
2022-07-16 21:49:35 +00:00
|
|
|
"subtle",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "curve25519-dalek"
|
2023-04-09 06:31:10 +00:00
|
|
|
version = "4.0.0-rc.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 06:31:10 +00:00
|
|
|
checksum = "8d4ba9852b42210c7538b75484f9daa0655e9a3ac04f693747bb0f02cf3cfe16"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-12-21 04:12:26 +00:00
|
|
|
"cfg-if",
|
|
|
|
"fiat-crypto",
|
|
|
|
"packed_simd_2",
|
2023-04-09 06:31:10 +00:00
|
|
|
"platforms",
|
2022-07-16 21:49:35 +00:00
|
|
|
"subtle",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2023-04-08 08:44:28 +00:00
|
|
|
[[package]]
|
|
|
|
name = "curve25519-dalek-ng"
|
|
|
|
version = "4.1.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8"
|
|
|
|
dependencies = [
|
|
|
|
"byteorder",
|
|
|
|
"digest 0.9.0",
|
|
|
|
"rand_core 0.6.4",
|
|
|
|
"subtle-ng",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2022-10-20 05:05:36 +00:00
|
|
|
[[package]]
|
|
|
|
name = "cxx"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "1.0.97"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "e88abab2f5abbe4c56e8f1fb431b784d710b709888f35755a160e62e33fe38e8"
|
2022-10-20 05:05:36 +00:00
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
"cxxbridge-flags",
|
|
|
|
"cxxbridge-macro",
|
|
|
|
"link-cplusplus",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cxx-build"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "1.0.97"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "5c0c11acd0e63bae27dcd2afced407063312771212b7a823b4fd72d633be30fb"
|
2022-10-20 05:05:36 +00:00
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
"codespan-reporting",
|
|
|
|
"once_cell",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"scratch",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-10-20 05:05:36 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cxxbridge-flags"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "1.0.97"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "8d3816ed957c008ccd4728485511e3d9aaf7db419aa321e3d2c5a2f3411e36c8"
|
2022-10-20 05:05:36 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cxxbridge-macro"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "1.0.97"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "a26acccf6f445af85ea056362561a24ef56cdc15fcc685f03aec50b9c702cb6d"
|
2022-10-20 05:05:36 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-10-20 05:05:36 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "dalek-ff-group"
|
2023-03-21 00:28:41 +00:00
|
|
|
version = "0.3.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-05-01 07:17:37 +00:00
|
|
|
"crypto-bigint 0.5.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"curve25519-dalek 3.2.0",
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2023-03-28 08:38:01 +00:00
|
|
|
"ff 0.13.0",
|
2022-12-24 20:09:09 +00:00
|
|
|
"ff-group-tests",
|
2023-03-28 08:38:01 +00:00
|
|
|
"group 0.13.0",
|
2022-09-18 19:30:38 +00:00
|
|
|
"rand_core 0.6.4",
|
2023-03-28 08:43:10 +00:00
|
|
|
"rustversion",
|
2023-02-23 09:27:31 +00:00
|
|
|
"sha2 0.9.9",
|
2022-07-16 21:49:35 +00:00
|
|
|
"subtle",
|
Utilize zeroize (#76)
* Apply Zeroize to nonces used in Bulletproofs
Also makes bit decomposition constant time for a given amount of
outputs.
* Fix nonce reuse for single-signer CLSAG
* Attach Zeroize to most structures in Monero, and ZOnDrop to anything with private data
* Zeroize private keys and nonces
* Merge prepare_outputs and prepare_transactions
* Ensure CLSAG is constant time
* Pass by borrow where needed, bug fixes
The past few commitments have been one in-progress chunk which I've
broken up as best read.
* Add Zeroize to FROST structs
Still needs to zeroize internally, yet next step. Not quite as
aggressive as Monero, partially due to the limitations of HashMaps,
partially due to less concern about metadata, yet does still delete a
few smaller items of metadata (group key, context string...).
* Remove Zeroize from most Monero multisig structs
These structs largely didn't have private data, just fields with private
data, yet those fields implemented ZeroizeOnDrop making them already
covered. While there is still traces of the transaction left in RAM,
fully purging that was never the intent.
* Use Zeroize within dleq
bitvec doesn't offer Zeroize, so a manual zeroing has been implemented.
* Use Zeroize for random_nonce
It isn't perfect, due to the inability to zeroize the digest, and due to
kp256 requiring a few transformations. It does the best it can though.
Does move the per-curve random_nonce to a provided one, which is allowed
as of https://github.com/cfrg/draft-irtf-cfrg-frost/pull/231.
* Use Zeroize on FROST keygen/signing
* Zeroize constant time multiexp.
* Correct when FROST keygen zeroizes
* Move the FROST keys Arc into FrostKeys
Reduces amount of instances in memory.
* Manually implement Debug for FrostCore to not leak the secret share
* Misc bug fixes
* clippy + multiexp test bug fixes
* Correct FROST key gen share summation
It leaked our own share for ourself.
* Fix cross-group DLEq tests
2022-08-03 08:25:18 +00:00
|
|
|
"zeroize",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "darling"
|
2023-03-11 09:49:05 +00:00
|
|
|
version = "0.14.4"
|
2023-01-16 15:42:31 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-11 09:49:05 +00:00
|
|
|
checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850"
|
2023-01-16 15:42:31 +00:00
|
|
|
dependencies = [
|
|
|
|
"darling_core",
|
|
|
|
"darling_macro",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "darling_core"
|
2023-03-11 09:49:05 +00:00
|
|
|
version = "0.14.4"
|
2023-01-16 15:42:31 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-11 09:49:05 +00:00
|
|
|
checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0"
|
2023-01-16 15:42:31 +00:00
|
|
|
dependencies = [
|
|
|
|
"fnv",
|
|
|
|
"ident_case",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"strsim",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2023-01-16 15:42:31 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "darling_macro"
|
2023-03-11 09:49:05 +00:00
|
|
|
version = "0.14.4"
|
2023-01-16 15:42:31 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-11 09:49:05 +00:00
|
|
|
checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e"
|
2023-01-16 15:42:31 +00:00
|
|
|
dependencies = [
|
|
|
|
"darling_core",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2023-01-16 15:42:31 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "data-encoding"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.4.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "data-encoding-macro"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.1.13"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "c904b33cc60130e1aeea4956ab803d08a3f4a0ca82d64ed757afac3891f2bb99"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"data-encoding",
|
|
|
|
"data-encoding-macro-internal",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "data-encoding-macro-internal"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.1.11"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "8fdf3fce3ce863539ec1d7fd1b6dcc3c645663376b43ed376bbf887733e4f772"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"data-encoding",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "der"
|
2022-12-07 22:56:53 +00:00
|
|
|
version = "0.6.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-07 22:56:53 +00:00
|
|
|
checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"const-oid",
|
2023-01-16 15:42:31 +00:00
|
|
|
"pem-rfc7468",
|
2022-07-16 21:49:35 +00:00
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2023-03-25 04:45:33 +00:00
|
|
|
[[package]]
|
|
|
|
name = "der"
|
2023-07-02 00:27:03 +00:00
|
|
|
version = "0.7.7"
|
2023-03-25 04:45:33 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-07-02 00:27:03 +00:00
|
|
|
checksum = "0c7ed52955ce76b1554f509074bb357d3fb8ac9b51288a65a3fd480d1dfba946"
|
2023-03-25 04:45:33 +00:00
|
|
|
dependencies = [
|
|
|
|
"const-oid",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "der-parser"
|
|
|
|
version = "7.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "fe398ac75057914d7d07307bf67dc7f3f574a26783b4fc7805a20ffa9f506e82"
|
|
|
|
dependencies = [
|
|
|
|
"asn1-rs 0.3.1",
|
|
|
|
"displaydoc",
|
|
|
|
"nom",
|
|
|
|
"num-bigint",
|
|
|
|
"num-traits",
|
|
|
|
"rusticata-macros",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "der-parser"
|
2023-03-11 09:49:05 +00:00
|
|
|
version = "8.2.0"
|
2023-01-16 15:42:31 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-11 09:49:05 +00:00
|
|
|
checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e"
|
2023-01-16 15:42:31 +00:00
|
|
|
dependencies = [
|
2023-03-11 09:49:05 +00:00
|
|
|
"asn1-rs 0.5.2",
|
2023-01-16 15:42:31 +00:00
|
|
|
"displaydoc",
|
|
|
|
"nom",
|
|
|
|
"num-bigint",
|
|
|
|
"num-traits",
|
|
|
|
"rusticata-macros",
|
|
|
|
]
|
|
|
|
|
2023-01-20 16:00:18 +00:00
|
|
|
[[package]]
|
|
|
|
name = "derivative"
|
|
|
|
version = "2.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2023-01-20 16:00:18 +00:00
|
|
|
]
|
|
|
|
|
2023-03-06 12:39:43 +00:00
|
|
|
[[package]]
|
|
|
|
name = "derive-syn-parse"
|
|
|
|
version = "0.1.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2023-03-06 12:39:43 +00:00
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "derive_builder"
|
|
|
|
version = "0.11.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3"
|
|
|
|
dependencies = [
|
|
|
|
"derive_builder_macro",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "derive_builder_core"
|
|
|
|
version = "0.11.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4"
|
|
|
|
dependencies = [
|
|
|
|
"darling",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2023-01-16 15:42:31 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "derive_builder_macro"
|
|
|
|
version = "0.11.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68"
|
|
|
|
dependencies = [
|
|
|
|
"derive_builder_core",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2023-01-16 15:42:31 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "derive_more"
|
|
|
|
version = "0.99.17"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "diff"
|
|
|
|
version = "0.1.13"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8"
|
|
|
|
|
2022-10-20 05:05:36 +00:00
|
|
|
[[package]]
|
|
|
|
name = "difflib"
|
|
|
|
version = "0.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "digest"
|
|
|
|
version = "0.9.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
|
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "digest"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.10.7"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-03-11 09:49:05 +00:00
|
|
|
"block-buffer 0.10.4",
|
2023-04-08 08:44:28 +00:00
|
|
|
"const-oid",
|
2022-07-16 21:49:35 +00:00
|
|
|
"crypto-common",
|
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
2022-11-15 04:24:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "digest_auth"
|
2023-05-10 11:34:07 +00:00
|
|
|
version = "0.3.1"
|
2022-11-15 04:24:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-10 11:34:07 +00:00
|
|
|
checksum = "3054f4e81d395e50822796c5e99ca522e6ba7be98947d6d4b0e5e61640bdb894"
|
2022-11-15 04:24:35 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2022-11-15 04:24:35 +00:00
|
|
|
"hex",
|
2023-05-10 11:34:07 +00:00
|
|
|
"md-5",
|
2022-11-15 04:24:35 +00:00
|
|
|
"rand 0.8.5",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2022-11-15 04:24:35 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "directories"
|
|
|
|
version = "4.0.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210"
|
|
|
|
dependencies = [
|
|
|
|
"dirs-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "directories-next"
|
|
|
|
version = "2.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"dirs-sys-next",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "dirs-next"
|
|
|
|
version = "2.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"dirs-sys-next",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "dirs-sys"
|
|
|
|
version = "0.3.7"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"redox_users",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "dirs-sys-next"
|
|
|
|
version = "0.1.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"redox_users",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "displaydoc"
|
2023-05-10 11:34:07 +00:00
|
|
|
version = "0.2.4"
|
2023-01-16 15:42:31 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-10 11:34:07 +00:00
|
|
|
checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
|
2023-01-16 15:42:31 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2023-01-16 15:42:31 +00:00
|
|
|
]
|
|
|
|
|
2022-10-29 08:54:42 +00:00
|
|
|
[[package]]
|
|
|
|
name = "dkg"
|
2023-03-21 00:28:41 +00:00
|
|
|
version = "0.4.0"
|
2022-10-29 08:54:42 +00:00
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"chacha20 0.9.1",
|
2022-10-29 08:54:42 +00:00
|
|
|
"ciphersuite",
|
|
|
|
"dleq",
|
|
|
|
"flexible-transcript",
|
|
|
|
"multiexp",
|
|
|
|
"rand_core 0.6.4",
|
|
|
|
"schnorr-signatures",
|
2023-03-07 08:13:55 +00:00
|
|
|
"serde",
|
2023-05-13 03:24:47 +00:00
|
|
|
"std-shims",
|
2022-10-29 08:54:42 +00:00
|
|
|
"thiserror",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
2022-07-30 22:35:39 +00:00
|
|
|
name = "dleq"
|
2023-03-21 00:28:41 +00:00
|
|
|
version = "0.3.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"blake2",
|
|
|
|
"dalek-ff-group",
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2023-03-28 08:38:01 +00:00
|
|
|
"ff 0.13.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"flexible-transcript",
|
2023-03-28 08:38:01 +00:00
|
|
|
"group 0.13.0",
|
2023-04-09 06:31:10 +00:00
|
|
|
"hex-literal 0.4.1",
|
2023-03-28 08:38:01 +00:00
|
|
|
"k256",
|
2022-07-16 21:49:35 +00:00
|
|
|
"multiexp",
|
2022-09-18 19:30:38 +00:00
|
|
|
"rand_core 0.6.4",
|
2023-03-28 08:43:10 +00:00
|
|
|
"rustversion",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
Utilize zeroize (#76)
* Apply Zeroize to nonces used in Bulletproofs
Also makes bit decomposition constant time for a given amount of
outputs.
* Fix nonce reuse for single-signer CLSAG
* Attach Zeroize to most structures in Monero, and ZOnDrop to anything with private data
* Zeroize private keys and nonces
* Merge prepare_outputs and prepare_transactions
* Ensure CLSAG is constant time
* Pass by borrow where needed, bug fixes
The past few commitments have been one in-progress chunk which I've
broken up as best read.
* Add Zeroize to FROST structs
Still needs to zeroize internally, yet next step. Not quite as
aggressive as Monero, partially due to the limitations of HashMaps,
partially due to less concern about metadata, yet does still delete a
few smaller items of metadata (group key, context string...).
* Remove Zeroize from most Monero multisig structs
These structs largely didn't have private data, just fields with private
data, yet those fields implemented ZeroizeOnDrop making them already
covered. While there is still traces of the transaction left in RAM,
fully purging that was never the intent.
* Use Zeroize within dleq
bitvec doesn't offer Zeroize, so a manual zeroing has been implemented.
* Use Zeroize for random_nonce
It isn't perfect, due to the inability to zeroize the digest, and due to
kp256 requiring a few transformations. It does the best it can though.
Does move the per-curve random_nonce to a provided one, which is allowed
as of https://github.com/cfrg/draft-irtf-cfrg-frost/pull/231.
* Use Zeroize on FROST keygen/signing
* Zeroize constant time multiexp.
* Correct when FROST keygen zeroizes
* Move the FROST keys Arc into FrostKeys
Reduces amount of instances in memory.
* Manually implement Debug for FrostCore to not leak the secret share
* Misc bug fixes
* clippy + multiexp test bug fixes
* Correct FROST key gen share summation
It leaked our own share for ourself.
* Fix cross-group DLEq tests
2022-08-03 08:25:18 +00:00
|
|
|
"zeroize",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2022-10-20 05:05:36 +00:00
|
|
|
[[package]]
|
|
|
|
name = "downcast"
|
|
|
|
version = "0.11.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "downcast-rs"
|
|
|
|
version = "1.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "dtoa"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "1.0.6"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "65d09067bfacaa79114679b279d7f5885b53295b1e2cfb4e79c8e4bd3d633169"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "dunce"
|
2023-04-23 23:21:24 +00:00
|
|
|
version = "1.0.4"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-23 23:21:24 +00:00
|
|
|
checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "dyn-clonable"
|
|
|
|
version = "0.9.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4e9232f0e607a262ceb9bd5141a3dfb3e4db6994b31989bbfd845878cba59fd4"
|
|
|
|
dependencies = [
|
|
|
|
"dyn-clonable-impl",
|
|
|
|
"dyn-clone",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "dyn-clonable-impl"
|
|
|
|
version = "0.9.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "dyn-clone"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "1.0.11"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ecdsa"
|
2022-09-29 18:33:09 +00:00
|
|
|
version = "0.14.8"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-09-29 18:33:09 +00:00
|
|
|
checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-03-25 04:45:33 +00:00
|
|
|
"der 0.6.1",
|
|
|
|
"elliptic-curve 0.12.3",
|
|
|
|
"rfc6979 0.3.1",
|
2023-03-06 13:22:04 +00:00
|
|
|
"signature 1.6.4",
|
|
|
|
]
|
|
|
|
|
2023-03-25 04:45:33 +00:00
|
|
|
[[package]]
|
|
|
|
name = "ecdsa"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.16.7"
|
2023-03-25 04:45:33 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428"
|
2023-03-25 04:45:33 +00:00
|
|
|
dependencies = [
|
2023-07-02 00:27:03 +00:00
|
|
|
"der 0.7.7",
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
|
|
|
"elliptic-curve 0.13.5",
|
2023-03-25 04:45:33 +00:00
|
|
|
"rfc6979 0.4.0",
|
2023-04-08 08:44:28 +00:00
|
|
|
"signature 2.1.0",
|
2023-06-22 10:25:30 +00:00
|
|
|
"spki 0.7.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ed25519"
|
2023-01-16 15:42:31 +00:00
|
|
|
version = "1.5.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-16 15:42:31 +00:00
|
|
|
checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-03-06 13:22:04 +00:00
|
|
|
"signature 1.6.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ed25519-dalek"
|
|
|
|
version = "1.0.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d"
|
|
|
|
dependencies = [
|
|
|
|
"curve25519-dalek 3.2.0",
|
|
|
|
"ed25519",
|
|
|
|
"rand 0.7.3",
|
|
|
|
"serde",
|
|
|
|
"sha2 0.9.9",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2022-09-29 18:33:09 +00:00
|
|
|
[[package]]
|
|
|
|
name = "ed25519-zebra"
|
2022-11-04 12:07:37 +00:00
|
|
|
version = "3.1.0"
|
2022-09-29 18:33:09 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-11-04 12:07:37 +00:00
|
|
|
checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6"
|
2022-09-29 18:33:09 +00:00
|
|
|
dependencies = [
|
|
|
|
"curve25519-dalek 3.2.0",
|
2023-03-06 12:39:43 +00:00
|
|
|
"hashbrown 0.12.3",
|
2022-09-29 18:33:09 +00:00
|
|
|
"hex",
|
|
|
|
"rand_core 0.6.4",
|
|
|
|
"sha2 0.9.9",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "either"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "1.8.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "elliptic-curve"
|
2022-08-16 07:44:32 +00:00
|
|
|
version = "0.12.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-08-16 07:44:32 +00:00
|
|
|
checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-03-25 04:45:33 +00:00
|
|
|
"base16ct 0.1.1",
|
2023-03-17 19:31:04 +00:00
|
|
|
"crypto-bigint 0.4.9",
|
2023-03-25 04:45:33 +00:00
|
|
|
"der 0.6.1",
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2023-03-25 04:45:33 +00:00
|
|
|
"ff 0.12.1",
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2023-03-25 04:45:33 +00:00
|
|
|
"group 0.12.1",
|
2023-01-16 15:42:31 +00:00
|
|
|
"hkdf",
|
|
|
|
"pem-rfc7468",
|
2023-03-25 04:45:33 +00:00
|
|
|
"pkcs8 0.9.0",
|
2022-09-18 19:30:38 +00:00
|
|
|
"rand_core 0.6.4",
|
2023-03-25 04:45:33 +00:00
|
|
|
"sec1 0.3.0",
|
|
|
|
"subtle",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "elliptic-curve"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.13.5"
|
2023-03-25 04:45:33 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b"
|
2023-03-25 04:45:33 +00:00
|
|
|
dependencies = [
|
|
|
|
"base16ct 0.2.0",
|
2023-05-01 07:17:37 +00:00
|
|
|
"crypto-bigint 0.5.2",
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2023-03-25 04:45:33 +00:00
|
|
|
"ff 0.13.0",
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2023-03-25 04:45:33 +00:00
|
|
|
"group 0.13.0",
|
2023-04-08 08:44:28 +00:00
|
|
|
"pkcs8 0.10.2",
|
2023-03-25 04:45:33 +00:00
|
|
|
"rand_core 0.6.4",
|
2023-04-10 04:27:17 +00:00
|
|
|
"sec1 0.7.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"subtle",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ena"
|
2023-03-25 04:45:33 +00:00
|
|
|
version = "0.14.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-25 04:45:33 +00:00
|
|
|
checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"log",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "encoding_rs"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.8.32"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
]
|
|
|
|
|
2023-03-17 00:16:57 +00:00
|
|
|
[[package]]
|
|
|
|
name = "enr"
|
2023-05-01 07:17:37 +00:00
|
|
|
version = "0.8.1"
|
2023-03-17 00:16:57 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-01 07:17:37 +00:00
|
|
|
checksum = "cf56acd72bb22d2824e66ae8e9e5ada4d0de17a69c7fd35569dde2ada8ec9116"
|
2023-03-17 00:16:57 +00:00
|
|
|
dependencies = [
|
|
|
|
"base64 0.13.1",
|
|
|
|
"bytes",
|
|
|
|
"hex",
|
2023-03-28 08:38:01 +00:00
|
|
|
"k256",
|
2023-03-17 00:16:57 +00:00
|
|
|
"log",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"rlp",
|
|
|
|
"serde",
|
|
|
|
"sha3",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "enum-as-inner"
|
2022-10-20 05:05:36 +00:00
|
|
|
version = "0.5.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-10-20 05:05:36 +00:00
|
|
|
checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-03-06 12:39:43 +00:00
|
|
|
"heck 0.4.1",
|
2022-07-16 21:49:35 +00:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "env_logger"
|
2023-01-08 14:10:17 +00:00
|
|
|
version = "0.10.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-08 14:10:17 +00:00
|
|
|
checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"humantime",
|
2023-01-08 14:10:17 +00:00
|
|
|
"is-terminal",
|
2022-07-16 21:49:35 +00:00
|
|
|
"log",
|
|
|
|
"regex",
|
|
|
|
"termcolor",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "environmental"
|
2022-12-07 22:56:53 +00:00
|
|
|
version = "1.1.4"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-07 22:56:53 +00:00
|
|
|
checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
2023-06-28 18:57:58 +00:00
|
|
|
[[package]]
|
|
|
|
name = "equivalent"
|
|
|
|
version = "1.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1"
|
|
|
|
|
2023-03-25 04:45:33 +00:00
|
|
|
[[package]]
|
|
|
|
name = "errno"
|
2023-04-08 08:44:28 +00:00
|
|
|
version = "0.3.1"
|
2023-03-25 04:45:33 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-08 08:44:28 +00:00
|
|
|
checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a"
|
2023-03-25 04:45:33 +00:00
|
|
|
dependencies = [
|
|
|
|
"errno-dragonfly",
|
|
|
|
"libc",
|
2023-04-08 08:44:28 +00:00
|
|
|
"windows-sys 0.48.0",
|
2023-03-25 04:45:33 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "errno-dragonfly"
|
|
|
|
version = "0.1.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
|
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "eth-keystore"
|
2022-12-07 23:05:06 +00:00
|
|
|
version = "0.5.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-07 23:05:06 +00:00
|
|
|
checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"aes 0.8.3",
|
2022-12-07 23:05:06 +00:00
|
|
|
"ctr 0.9.2",
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
"hex",
|
|
|
|
"hmac 0.12.1",
|
2022-08-16 07:44:32 +00:00
|
|
|
"pbkdf2 0.11.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"rand 0.8.5",
|
|
|
|
"scrypt",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2022-10-20 05:05:36 +00:00
|
|
|
"sha3",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
2023-01-16 15:42:31 +00:00
|
|
|
"uuid 0.8.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ethabi"
|
2022-12-07 23:05:06 +00:00
|
|
|
version = "18.0.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-07 23:05:06 +00:00
|
|
|
checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"ethereum-types",
|
|
|
|
"hex",
|
|
|
|
"once_cell",
|
|
|
|
"regex",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
2022-10-20 05:05:36 +00:00
|
|
|
"sha3",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
|
|
|
"uint",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ethbloom"
|
2022-12-07 23:05:06 +00:00
|
|
|
version = "0.13.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-07 23:05:06 +00:00
|
|
|
checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"crunchy",
|
2023-01-17 07:35:22 +00:00
|
|
|
"fixed-hash 0.8.0",
|
2022-12-07 23:05:06 +00:00
|
|
|
"impl-codec",
|
2022-07-16 21:49:35 +00:00
|
|
|
"impl-rlp",
|
2023-01-05 03:52:41 +00:00
|
|
|
"impl-serde",
|
2022-12-07 23:05:06 +00:00
|
|
|
"scale-info",
|
2022-07-16 21:49:35 +00:00
|
|
|
"tiny-keccak",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ethereum-serai"
|
|
|
|
version = "0.1.0"
|
|
|
|
dependencies = [
|
|
|
|
"ethers",
|
|
|
|
"ethers-solc",
|
|
|
|
"eyre",
|
2023-03-28 08:38:01 +00:00
|
|
|
"group 0.13.0",
|
|
|
|
"k256",
|
2022-07-16 21:49:35 +00:00
|
|
|
"modular-frost",
|
2022-09-18 19:30:38 +00:00
|
|
|
"rand_core 0.6.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
"serde",
|
|
|
|
"serde_json",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2022-10-20 05:05:36 +00:00
|
|
|
"sha3",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ethereum-types"
|
2022-12-07 23:05:06 +00:00
|
|
|
version = "0.14.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-07 23:05:06 +00:00
|
|
|
checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"ethbloom",
|
2023-01-17 07:35:22 +00:00
|
|
|
"fixed-hash 0.8.0",
|
2022-12-07 23:05:06 +00:00
|
|
|
"impl-codec",
|
2022-07-16 21:49:35 +00:00
|
|
|
"impl-rlp",
|
2023-01-05 03:52:41 +00:00
|
|
|
"impl-serde",
|
2022-12-07 23:05:06 +00:00
|
|
|
"primitive-types",
|
|
|
|
"scale-info",
|
2022-07-16 21:49:35 +00:00
|
|
|
"uint",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ethers"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.0.7"
|
2022-07-22 16:36:30 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "2a58ce802c65cf3d0756dee5a61094a92cde53c1583b246e9ee5b37226c7fc15"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"ethers-addressbook",
|
|
|
|
"ethers-contract",
|
|
|
|
"ethers-core",
|
|
|
|
"ethers-etherscan",
|
|
|
|
"ethers-middleware",
|
|
|
|
"ethers-providers",
|
|
|
|
"ethers-signers",
|
|
|
|
"ethers-solc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ethers-addressbook"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.0.7"
|
2022-07-22 16:36:30 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "7b856b7b8ff5c961093cb8efe151fbcce724b451941ce20781de11a531ccd578"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"ethers-core",
|
|
|
|
"once_cell",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ethers-contract"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.0.7"
|
2022-07-22 16:36:30 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "e066a0d9cfc70c454672bf16bb433b0243427420076dc5b2f49c448fb5a10628"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"ethers-contract-abigen",
|
|
|
|
"ethers-contract-derive",
|
|
|
|
"ethers-core",
|
|
|
|
"ethers-providers",
|
|
|
|
"futures-util",
|
|
|
|
"hex",
|
|
|
|
"once_cell",
|
|
|
|
"pin-project",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ethers-contract-abigen"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.0.7"
|
2022-07-22 16:36:30 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "c113e3e86b6bc16d98484b2c3bb2d01d6fed9f489fe2e592e5cc87c3024d616b"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"Inflector",
|
|
|
|
"dunce",
|
|
|
|
"ethers-core",
|
|
|
|
"eyre",
|
|
|
|
"hex",
|
2023-06-22 10:25:30 +00:00
|
|
|
"prettyplease 0.2.9",
|
2022-07-16 21:49:35 +00:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2022-12-07 23:05:06 +00:00
|
|
|
"regex",
|
2022-07-16 21:49:35 +00:00
|
|
|
"serde",
|
|
|
|
"serde_json",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
|
|
|
"toml 0.7.5",
|
2022-07-16 21:49:35 +00:00
|
|
|
"walkdir",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ethers-contract-derive"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.0.7"
|
2022-07-22 16:36:30 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "8c3fb5adee25701c79ec58fcf2c63594cd8829bc9ad6037ff862d5a111101ed2"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-04-14 01:05:18 +00:00
|
|
|
"Inflector",
|
2022-07-16 21:49:35 +00:00
|
|
|
"ethers-contract-abigen",
|
|
|
|
"ethers-core",
|
|
|
|
"hex",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-04-14 01:05:18 +00:00
|
|
|
"serde_json",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ethers-core"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.0.7"
|
2022-07-22 16:36:30 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "6da5fa198af0d3be20c19192df2bd9590b92ce09a8421e793bec8851270f1b05"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"arrayvec",
|
2022-07-16 21:49:35 +00:00
|
|
|
"bytes",
|
2023-03-06 12:39:43 +00:00
|
|
|
"cargo_metadata",
|
2022-07-16 21:49:35 +00:00
|
|
|
"chrono",
|
2023-06-22 10:25:30 +00:00
|
|
|
"elliptic-curve 0.13.5",
|
2022-07-16 21:49:35 +00:00
|
|
|
"ethabi",
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2022-07-16 21:49:35 +00:00
|
|
|
"hex",
|
2023-03-28 08:38:01 +00:00
|
|
|
"k256",
|
2023-03-17 00:16:57 +00:00
|
|
|
"num_enum",
|
2022-07-16 21:49:35 +00:00
|
|
|
"once_cell",
|
2022-12-07 23:05:06 +00:00
|
|
|
"open-fastrlp",
|
2022-07-16 21:49:35 +00:00
|
|
|
"rand 0.8.5",
|
|
|
|
"rlp",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
2022-08-16 07:44:32 +00:00
|
|
|
"strum",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2023-03-17 00:16:57 +00:00
|
|
|
"tempfile",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
|
|
|
"tiny-keccak",
|
|
|
|
"unicode-xid",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ethers-etherscan"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.0.7"
|
2022-07-22 16:36:30 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "84ebb401ba97c6f5af278c2c9936c4546cad75dec464b439ae6df249906f4caa"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"ethers-core",
|
2023-03-17 00:16:57 +00:00
|
|
|
"ethers-solc",
|
2022-07-16 21:49:35 +00:00
|
|
|
"reqwest",
|
2023-03-16 23:37:32 +00:00
|
|
|
"semver 1.0.17",
|
2022-07-16 21:49:35 +00:00
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"thiserror",
|
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ethers-middleware"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.0.7"
|
2022-07-22 16:36:30 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "740f4a773c19dd6d6a68c8c2e0996c096488d38997d524e21dc612c55da3bd24"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
2023-03-17 00:16:57 +00:00
|
|
|
"auto_impl",
|
2022-07-16 21:49:35 +00:00
|
|
|
"ethers-contract",
|
|
|
|
"ethers-core",
|
|
|
|
"ethers-etherscan",
|
|
|
|
"ethers-providers",
|
|
|
|
"ethers-signers",
|
2023-03-25 04:45:33 +00:00
|
|
|
"futures-channel",
|
2022-07-16 21:49:35 +00:00
|
|
|
"futures-locks",
|
|
|
|
"futures-util",
|
|
|
|
"instant",
|
|
|
|
"reqwest",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
"tracing",
|
|
|
|
"tracing-futures",
|
|
|
|
"url",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ethers-providers"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.0.7"
|
2022-07-22 16:36:30 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "56b498fd2a6c019d023e43e83488cd1fb0721f299055975aa6bac8dbf1e95f2c"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
2023-03-17 00:16:57 +00:00
|
|
|
"auto_impl",
|
2023-06-22 10:25:30 +00:00
|
|
|
"base64 0.21.2",
|
2023-03-25 04:45:33 +00:00
|
|
|
"bytes",
|
2023-03-17 00:16:57 +00:00
|
|
|
"enr",
|
2022-07-16 21:49:35 +00:00
|
|
|
"ethers-core",
|
|
|
|
"futures-core",
|
|
|
|
"futures-timer",
|
|
|
|
"futures-util",
|
|
|
|
"hashers",
|
|
|
|
"hex",
|
|
|
|
"http",
|
2023-03-25 04:45:33 +00:00
|
|
|
"instant",
|
2022-07-16 21:49:35 +00:00
|
|
|
"once_cell",
|
|
|
|
"pin-project",
|
|
|
|
"reqwest",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
"tracing",
|
|
|
|
"tracing-futures",
|
|
|
|
"url",
|
|
|
|
"wasm-bindgen",
|
|
|
|
"wasm-bindgen-futures",
|
|
|
|
"web-sys",
|
|
|
|
"ws_stream_wasm",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ethers-signers"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.0.7"
|
2022-07-22 16:36:30 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "02c4b7e15f212fa7cc2e1251868320221d4ff77a3d48068e69f47ce1c491df2d"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"coins-bip32",
|
|
|
|
"coins-bip39",
|
2023-06-22 10:25:30 +00:00
|
|
|
"elliptic-curve 0.13.5",
|
2022-07-16 21:49:35 +00:00
|
|
|
"eth-keystore",
|
|
|
|
"ethers-core",
|
|
|
|
"hex",
|
|
|
|
"rand 0.8.5",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
2023-03-17 00:16:57 +00:00
|
|
|
"tracing",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ethers-solc"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.0.7"
|
2022-07-22 16:36:30 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "a81c89f121595cf8959e746045bb8b25a6a38d72588561e1a3b7992fc213f674"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"dunce",
|
|
|
|
"ethers-core",
|
|
|
|
"glob",
|
|
|
|
"hex",
|
|
|
|
"home",
|
2023-05-10 11:34:07 +00:00
|
|
|
"md-5",
|
2022-07-16 21:49:35 +00:00
|
|
|
"num_cpus",
|
|
|
|
"once_cell",
|
|
|
|
"path-slash",
|
|
|
|
"rayon",
|
|
|
|
"regex",
|
2023-03-16 23:37:32 +00:00
|
|
|
"semver 1.0.17",
|
2022-07-16 21:49:35 +00:00
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"solang-parser",
|
|
|
|
"svm-rs",
|
|
|
|
"thiserror",
|
|
|
|
"tiny-keccak",
|
|
|
|
"tokio",
|
|
|
|
"tracing",
|
|
|
|
"walkdir",
|
2022-12-07 23:05:06 +00:00
|
|
|
"yansi",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "event-listener"
|
2022-08-16 07:44:32 +00:00
|
|
|
version = "2.5.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-08-16 07:44:32 +00:00
|
|
|
checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "exit-future"
|
|
|
|
version = "0.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5"
|
|
|
|
dependencies = [
|
|
|
|
"futures",
|
|
|
|
]
|
|
|
|
|
2023-03-26 12:43:01 +00:00
|
|
|
[[package]]
|
|
|
|
name = "expander"
|
|
|
|
version = "1.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f360349150728553f92e4c997a16af8915f418d3a0f21b440d34c5632f16ed84"
|
|
|
|
dependencies = [
|
|
|
|
"blake2",
|
|
|
|
"fs-err",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn 1.0.109",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "eyre"
|
|
|
|
version = "0.6.8"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb"
|
|
|
|
dependencies = [
|
|
|
|
"indenter",
|
|
|
|
"once_cell",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "fallible-iterator"
|
|
|
|
version = "0.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "fastrand"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "1.9.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"instant",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "fdlimit"
|
|
|
|
version = "0.2.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2c4c9e43643f5a3be4ca5b67d26b98031ff9db6806c3440ae32e02e3ceac3f1b"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ff"
|
2022-11-04 12:07:37 +00:00
|
|
|
version = "0.12.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-11-04 12:07:37 +00:00
|
|
|
checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-09-18 19:30:38 +00:00
|
|
|
"rand_core 0.6.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
2023-03-25 04:45:33 +00:00
|
|
|
[[package]]
|
|
|
|
name = "ff"
|
|
|
|
version = "0.13.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449"
|
|
|
|
dependencies = [
|
2023-03-28 08:38:01 +00:00
|
|
|
"bitvec 1.0.1",
|
2023-03-25 04:45:33 +00:00
|
|
|
"rand_core 0.6.4",
|
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
2022-12-24 20:09:09 +00:00
|
|
|
[[package]]
|
|
|
|
name = "ff-group-tests"
|
2023-03-28 08:38:01 +00:00
|
|
|
version = "0.13.0"
|
2022-12-24 20:09:09 +00:00
|
|
|
dependencies = [
|
2023-03-28 08:38:01 +00:00
|
|
|
"bls12_381",
|
|
|
|
"group 0.13.0",
|
|
|
|
"k256",
|
2023-04-16 03:21:18 +00:00
|
|
|
"p256 0.13.2",
|
2023-03-28 08:38:01 +00:00
|
|
|
"pasta_curves",
|
2023-02-24 11:03:56 +00:00
|
|
|
"rand_core 0.6.4",
|
2023-03-28 08:38:01 +00:00
|
|
|
"subtle",
|
2022-12-24 20:09:09 +00:00
|
|
|
]
|
|
|
|
|
2022-12-21 04:12:26 +00:00
|
|
|
[[package]]
|
|
|
|
name = "fiat-crypto"
|
2023-04-01 09:44:18 +00:00
|
|
|
version = "0.1.20"
|
2022-12-21 04:12:26 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-01 09:44:18 +00:00
|
|
|
checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77"
|
2022-12-21 04:12:26 +00:00
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "file-per-thread-logger"
|
2023-01-08 14:10:17 +00:00
|
|
|
version = "0.1.6"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-08 14:10:17 +00:00
|
|
|
checksum = "84f2e425d9790201ba4af4630191feac6dcc98765b118d4d18e91d23c2353866"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"env_logger",
|
|
|
|
"log",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "filetime"
|
2023-04-08 08:44:28 +00:00
|
|
|
version = "0.2.21"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-08 08:44:28 +00:00
|
|
|
checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"libc",
|
2023-03-31 06:34:52 +00:00
|
|
|
"redox_syscall 0.2.16",
|
2023-04-08 08:44:28 +00:00
|
|
|
"windows-sys 0.48.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "finality-grandpa"
|
2023-03-16 23:37:32 +00:00
|
|
|
version = "0.16.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-16 23:37:32 +00:00
|
|
|
checksum = "36530797b9bf31cd4ff126dcfee8170f86b00cfdcea3269d73133cc0415945c3"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"either",
|
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
|
|
|
"log",
|
|
|
|
"num-traits",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"scale-info",
|
|
|
|
]
|
|
|
|
|
2023-01-17 07:35:22 +00:00
|
|
|
[[package]]
|
|
|
|
name = "fixed-hash"
|
|
|
|
version = "0.7.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c"
|
|
|
|
dependencies = [
|
|
|
|
"byteorder",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"rustc-hex",
|
|
|
|
"static_assertions",
|
|
|
|
]
|
|
|
|
|
2022-10-20 05:05:36 +00:00
|
|
|
[[package]]
|
|
|
|
name = "fixed-hash"
|
|
|
|
version = "0.8.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534"
|
|
|
|
dependencies = [
|
|
|
|
"byteorder",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"rustc-hex",
|
|
|
|
"static_assertions",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "fixedbitset"
|
|
|
|
version = "0.4.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "flate2"
|
2023-05-01 07:17:37 +00:00
|
|
|
version = "1.0.26"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-01 07:17:37 +00:00
|
|
|
checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"crc32fast",
|
|
|
|
"libz-sys",
|
2023-07-02 00:27:03 +00:00
|
|
|
"miniz_oxide",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "flexible-transcript"
|
2023-03-21 00:28:41 +00:00
|
|
|
version = "0.3.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"blake2",
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2023-04-08 08:44:28 +00:00
|
|
|
"merlin",
|
2023-03-28 08:43:10 +00:00
|
|
|
"rustversion",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2023-03-28 08:43:10 +00:00
|
|
|
"subtle",
|
|
|
|
"zeroize",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2022-10-20 05:05:36 +00:00
|
|
|
[[package]]
|
|
|
|
name = "float-cmp"
|
|
|
|
version = "0.9.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4"
|
|
|
|
dependencies = [
|
|
|
|
"num-traits",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "fnv"
|
|
|
|
version = "1.0.7"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "foreign-types"
|
|
|
|
version = "0.3.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
|
|
|
|
dependencies = [
|
|
|
|
"foreign-types-shared",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "foreign-types-shared"
|
|
|
|
version = "0.1.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "fork-tree"
|
|
|
|
version = "3.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"parity-scale-codec",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "form_urlencoded"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "1.2.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"percent-encoding",
|
|
|
|
]
|
|
|
|
|
2022-10-20 05:05:36 +00:00
|
|
|
[[package]]
|
|
|
|
name = "fragile"
|
|
|
|
version = "2.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "frame-benchmarking"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"frame-support",
|
2023-03-06 12:39:43 +00:00
|
|
|
"frame-support-procedural",
|
2022-07-16 21:49:35 +00:00
|
|
|
"frame-system",
|
|
|
|
"linregress",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"paste",
|
|
|
|
"scale-info",
|
|
|
|
"serde",
|
|
|
|
"sp-api",
|
|
|
|
"sp-application-crypto",
|
2022-09-29 18:33:09 +00:00
|
|
|
"sp-core",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-io",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-runtime-interface",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-storage",
|
2023-03-06 12:39:43 +00:00
|
|
|
"static_assertions",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "frame-benchmarking-cli"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"Inflector",
|
2022-09-29 18:33:09 +00:00
|
|
|
"array-bytes",
|
2022-07-16 21:49:35 +00:00
|
|
|
"chrono",
|
2023-06-22 10:25:30 +00:00
|
|
|
"clap",
|
2022-07-16 21:49:35 +00:00
|
|
|
"comfy-table",
|
|
|
|
"frame-benchmarking",
|
|
|
|
"frame-support",
|
|
|
|
"frame-system",
|
|
|
|
"gethostname",
|
|
|
|
"handlebars",
|
|
|
|
"itertools",
|
|
|
|
"lazy_static",
|
|
|
|
"linked-hash-map",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"rand 0.8.5",
|
2023-01-16 15:42:31 +00:00
|
|
|
"rand_pcg",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-block-builder",
|
|
|
|
"sc-cli",
|
|
|
|
"sc-client-api",
|
|
|
|
"sc-client-db",
|
|
|
|
"sc-executor",
|
|
|
|
"sc-service",
|
|
|
|
"sc-sysinfo",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"sp-api",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-core",
|
|
|
|
"sp-database",
|
|
|
|
"sp-externalities",
|
|
|
|
"sp-inherents",
|
|
|
|
"sp-keystore",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-state-machine",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-storage",
|
|
|
|
"sp-trie",
|
|
|
|
"thiserror",
|
|
|
|
"thousands",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "frame-executive"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"frame-support",
|
|
|
|
"frame-system",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"sp-core",
|
|
|
|
"sp-io",
|
|
|
|
"sp-runtime",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-tracing",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "frame-metadata"
|
2023-03-31 06:34:52 +00:00
|
|
|
version = "15.1.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-31 06:34:52 +00:00
|
|
|
checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "frame-support"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"bitflags 1.3.2",
|
2023-03-26 12:43:01 +00:00
|
|
|
"environmental",
|
2022-07-16 21:49:35 +00:00
|
|
|
"frame-metadata",
|
|
|
|
"frame-support-procedural",
|
|
|
|
"impl-trait-for-tuples",
|
2023-03-28 08:38:01 +00:00
|
|
|
"k256",
|
2022-07-16 21:49:35 +00:00
|
|
|
"log",
|
|
|
|
"once_cell",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"paste",
|
|
|
|
"scale-info",
|
|
|
|
"serde",
|
|
|
|
"smallvec",
|
2022-09-29 18:33:09 +00:00
|
|
|
"sp-api",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-arithmetic",
|
|
|
|
"sp-core",
|
|
|
|
"sp-core-hashing-proc-macro",
|
2023-06-28 18:57:58 +00:00
|
|
|
"sp-debug-derive",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-inherents",
|
|
|
|
"sp-io",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-staking",
|
|
|
|
"sp-state-machine",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-tracing",
|
2022-09-29 18:33:09 +00:00
|
|
|
"sp-weights",
|
2022-07-16 21:49:35 +00:00
|
|
|
"tt-call",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "frame-support-procedural"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"Inflector",
|
2022-09-29 18:33:09 +00:00
|
|
|
"cfg-expr",
|
2023-03-06 12:39:43 +00:00
|
|
|
"derive-syn-parse",
|
2022-07-16 21:49:35 +00:00
|
|
|
"frame-support-procedural-tools",
|
2022-09-29 18:33:09 +00:00
|
|
|
"itertools",
|
2023-05-01 07:17:37 +00:00
|
|
|
"proc-macro-warning",
|
2022-07-16 21:49:35 +00:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "frame-support-procedural-tools"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"frame-support-procedural-tools-derive",
|
2022-12-07 23:05:06 +00:00
|
|
|
"proc-macro-crate",
|
2022-07-16 21:49:35 +00:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "frame-support-procedural-tools-derive"
|
|
|
|
version = "3.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "frame-system"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"cfg-if",
|
2022-07-16 21:49:35 +00:00
|
|
|
"frame-support",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"serde",
|
|
|
|
"sp-core",
|
|
|
|
"sp-io",
|
|
|
|
"sp-runtime",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-version",
|
2022-09-29 18:33:09 +00:00
|
|
|
"sp-weights",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "frame-system-rpc-runtime-api"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"parity-scale-codec",
|
|
|
|
"sp-api",
|
|
|
|
]
|
|
|
|
|
2023-04-10 10:05:17 +00:00
|
|
|
[[package]]
|
|
|
|
name = "frost-schnorrkel"
|
|
|
|
version = "0.1.0"
|
|
|
|
dependencies = [
|
|
|
|
"ciphersuite",
|
|
|
|
"flexible-transcript",
|
|
|
|
"group 0.13.0",
|
|
|
|
"modular-frost",
|
|
|
|
"rand_core 0.6.4",
|
|
|
|
"schnorr-signatures",
|
|
|
|
"schnorrkel",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2023-03-26 12:43:01 +00:00
|
|
|
[[package]]
|
|
|
|
name = "fs-err"
|
|
|
|
version = "2.9.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "fs2"
|
|
|
|
version = "0.4.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
2023-03-26 12:43:01 +00:00
|
|
|
[[package]]
|
|
|
|
name = "fs4"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.6.5"
|
2023-03-26 12:43:01 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "7672706608ecb74ab2e055c68327ffc25ae4cac1e12349204fd5fb0f3487cce2"
|
2023-03-26 12:43:01 +00:00
|
|
|
dependencies = [
|
2023-07-02 00:27:03 +00:00
|
|
|
"rustix 0.37.21",
|
2023-05-10 11:34:07 +00:00
|
|
|
"windows-sys 0.48.0",
|
2023-03-26 12:43:01 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "funty"
|
|
|
|
version = "2.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures"
|
2023-03-31 06:34:52 +00:00
|
|
|
version = "0.3.28"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-31 06:34:52 +00:00
|
|
|
checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"futures-channel",
|
|
|
|
"futures-core",
|
|
|
|
"futures-executor",
|
|
|
|
"futures-io",
|
|
|
|
"futures-sink",
|
|
|
|
"futures-task",
|
|
|
|
"futures-util",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures-channel"
|
2023-03-31 06:34:52 +00:00
|
|
|
version = "0.3.28"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-31 06:34:52 +00:00
|
|
|
checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"futures-core",
|
|
|
|
"futures-sink",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures-core"
|
2023-03-31 06:34:52 +00:00
|
|
|
version = "0.3.28"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-31 06:34:52 +00:00
|
|
|
checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures-executor"
|
2023-03-31 06:34:52 +00:00
|
|
|
version = "0.3.28"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-31 06:34:52 +00:00
|
|
|
checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"futures-core",
|
|
|
|
"futures-task",
|
|
|
|
"futures-util",
|
|
|
|
"num_cpus",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures-io"
|
2023-03-31 06:34:52 +00:00
|
|
|
version = "0.3.28"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-31 06:34:52 +00:00
|
|
|
checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures-lite"
|
2023-04-08 08:44:28 +00:00
|
|
|
version = "1.13.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-08 08:44:28 +00:00
|
|
|
checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"fastrand",
|
|
|
|
"futures-core",
|
|
|
|
"futures-io",
|
|
|
|
"memchr",
|
|
|
|
"parking",
|
|
|
|
"pin-project-lite 0.2.9",
|
|
|
|
"waker-fn",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures-locks"
|
2022-12-21 04:12:26 +00:00
|
|
|
version = "0.7.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-21 04:12:26 +00:00
|
|
|
checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"futures-channel",
|
|
|
|
"futures-task",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures-macro"
|
2023-03-31 06:34:52 +00:00
|
|
|
version = "0.3.28"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-31 06:34:52 +00:00
|
|
|
checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures-rustls"
|
2022-08-16 07:44:32 +00:00
|
|
|
version = "0.22.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-08-16 07:44:32 +00:00
|
|
|
checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"futures-io",
|
2023-01-16 15:42:31 +00:00
|
|
|
"rustls 0.20.8",
|
|
|
|
"webpki 0.22.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures-sink"
|
2023-03-31 06:34:52 +00:00
|
|
|
version = "0.3.28"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-31 06:34:52 +00:00
|
|
|
checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures-task"
|
2023-03-31 06:34:52 +00:00
|
|
|
version = "0.3.28"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-31 06:34:52 +00:00
|
|
|
checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures-timer"
|
|
|
|
version = "3.0.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c"
|
2023-03-25 04:45:33 +00:00
|
|
|
dependencies = [
|
|
|
|
"gloo-timers",
|
|
|
|
"send_wrapper 0.4.0",
|
|
|
|
]
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures-util"
|
2023-03-31 06:34:52 +00:00
|
|
|
version = "0.3.28"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-31 06:34:52 +00:00
|
|
|
checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"futures-channel",
|
|
|
|
"futures-core",
|
|
|
|
"futures-io",
|
|
|
|
"futures-macro",
|
|
|
|
"futures-sink",
|
|
|
|
"futures-task",
|
|
|
|
"memchr",
|
|
|
|
"pin-project-lite 0.2.9",
|
|
|
|
"pin-utils",
|
|
|
|
"slab",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "fxhash"
|
|
|
|
version = "0.2.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
|
|
|
|
dependencies = [
|
|
|
|
"byteorder",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "generic-array"
|
2023-03-31 06:34:52 +00:00
|
|
|
version = "0.14.7"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-31 06:34:52 +00:00
|
|
|
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"typenum",
|
|
|
|
"version_check",
|
2023-03-25 04:45:33 +00:00
|
|
|
"zeroize",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "gethostname"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.4.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
2023-06-28 19:04:48 +00:00
|
|
|
"windows-targets 0.48.1",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "getrandom"
|
|
|
|
version = "0.1.16"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"libc",
|
|
|
|
"wasi 0.9.0+wasi-snapshot-preview1",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "getrandom"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.2.10"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"js-sys",
|
|
|
|
"libc",
|
|
|
|
"wasi 0.11.0+wasi-snapshot-preview1",
|
|
|
|
"wasm-bindgen",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ghash"
|
|
|
|
version = "0.4.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99"
|
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"opaque-debug",
|
2023-03-06 12:39:43 +00:00
|
|
|
"polyval 0.5.3",
|
2023-01-16 15:42:31 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "ghash"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.5.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"opaque-debug",
|
2023-06-22 10:25:30 +00:00
|
|
|
"polyval 0.6.1",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "gimli"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.27.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"fallible-iterator",
|
2023-06-28 18:57:58 +00:00
|
|
|
"indexmap 1.9.3",
|
2022-07-16 21:49:35 +00:00
|
|
|
"stable_deref_trait",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "glob"
|
2023-01-08 14:10:17 +00:00
|
|
|
version = "0.3.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-08 14:10:17 +00:00
|
|
|
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "globset"
|
2023-01-08 14:10:17 +00:00
|
|
|
version = "0.4.10"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-08 14:10:17 +00:00
|
|
|
checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-04-23 23:21:24 +00:00
|
|
|
"aho-corasick 0.7.20",
|
2022-07-16 21:49:35 +00:00
|
|
|
"bstr",
|
|
|
|
"fnv",
|
|
|
|
"log",
|
|
|
|
"regex",
|
|
|
|
]
|
|
|
|
|
2023-03-25 04:45:33 +00:00
|
|
|
[[package]]
|
|
|
|
name = "gloo-timers"
|
|
|
|
version = "0.2.6"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c"
|
|
|
|
dependencies = [
|
|
|
|
"futures-channel",
|
|
|
|
"futures-core",
|
|
|
|
"js-sys",
|
|
|
|
"wasm-bindgen",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "group"
|
2022-10-20 05:05:36 +00:00
|
|
|
version = "0.12.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-10-20 05:05:36 +00:00
|
|
|
checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-03-25 04:45:33 +00:00
|
|
|
"ff 0.12.1",
|
|
|
|
"rand_core 0.6.4",
|
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "group"
|
|
|
|
version = "0.13.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63"
|
|
|
|
dependencies = [
|
|
|
|
"ff 0.13.0",
|
2022-09-18 19:30:38 +00:00
|
|
|
"rand_core 0.6.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "h2"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.3.20"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"fnv",
|
|
|
|
"futures-core",
|
|
|
|
"futures-sink",
|
|
|
|
"futures-util",
|
|
|
|
"http",
|
2023-06-28 18:57:58 +00:00
|
|
|
"indexmap 1.9.3",
|
2022-07-16 21:49:35 +00:00
|
|
|
"slab",
|
|
|
|
"tokio",
|
|
|
|
"tokio-util",
|
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "handlebars"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "4.3.7"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"log",
|
|
|
|
"pest",
|
|
|
|
"pest_derive",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hash-db"
|
2023-03-26 12:43:01 +00:00
|
|
|
version = "0.16.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-26 12:43:01 +00:00
|
|
|
checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hash256-std-hasher"
|
|
|
|
version = "0.15.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2"
|
|
|
|
dependencies = [
|
|
|
|
"crunchy",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hashbrown"
|
2022-07-18 00:56:10 +00:00
|
|
|
version = "0.12.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-07-18 00:56:10 +00:00
|
|
|
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-03-06 12:39:43 +00:00
|
|
|
"ahash 0.7.6",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hashbrown"
|
|
|
|
version = "0.13.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
|
|
|
|
dependencies = [
|
|
|
|
"ahash 0.8.3",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-06-28 18:57:58 +00:00
|
|
|
[[package]]
|
|
|
|
name = "hashbrown"
|
|
|
|
version = "0.14.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a"
|
2023-06-29 01:16:33 +00:00
|
|
|
dependencies = [
|
|
|
|
"ahash 0.8.3",
|
|
|
|
"allocator-api2",
|
|
|
|
]
|
2023-06-28 18:57:58 +00:00
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "hashers"
|
|
|
|
version = "1.0.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30"
|
|
|
|
dependencies = [
|
|
|
|
"fxhash",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "heck"
|
2023-01-17 07:35:22 +00:00
|
|
|
version = "0.3.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
|
|
|
|
dependencies = [
|
|
|
|
"unicode-segmentation",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "heck"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.4.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
2023-03-06 12:39:43 +00:00
|
|
|
[[package]]
|
|
|
|
name = "hermit-abi"
|
|
|
|
version = "0.3.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "hex"
|
|
|
|
version = "0.4.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hex-literal"
|
|
|
|
version = "0.3.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0"
|
|
|
|
|
2023-04-09 06:31:10 +00:00
|
|
|
[[package]]
|
|
|
|
name = "hex-literal"
|
|
|
|
version = "0.4.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hex_lit"
|
|
|
|
version = "0.1.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd"
|
|
|
|
|
2023-03-16 20:59:20 +00:00
|
|
|
[[package]]
|
|
|
|
name = "hkdf"
|
|
|
|
version = "0.12.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437"
|
|
|
|
dependencies = [
|
|
|
|
"hmac 0.12.1",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "hmac"
|
|
|
|
version = "0.8.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840"
|
|
|
|
dependencies = [
|
|
|
|
"crypto-mac 0.8.0",
|
|
|
|
"digest 0.9.0",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hmac"
|
|
|
|
version = "0.11.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b"
|
|
|
|
dependencies = [
|
|
|
|
"crypto-mac 0.11.1",
|
|
|
|
"digest 0.9.0",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hmac"
|
|
|
|
version = "0.12.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
|
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hmac-drbg"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1"
|
|
|
|
dependencies = [
|
|
|
|
"digest 0.9.0",
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2022-07-16 21:49:35 +00:00
|
|
|
"hmac 0.8.1",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "home"
|
2023-05-01 07:17:37 +00:00
|
|
|
version = "0.5.5"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-01 07:17:37 +00:00
|
|
|
checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-05-01 07:17:37 +00:00
|
|
|
"windows-sys 0.48.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hostname"
|
|
|
|
version = "0.3.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"match_cfg",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "http"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.2.9"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"fnv",
|
2022-10-20 05:05:36 +00:00
|
|
|
"itoa",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "http-body"
|
|
|
|
version = "0.4.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1"
|
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"http",
|
|
|
|
"pin-project-lite 0.2.9",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2023-01-04 08:17:36 +00:00
|
|
|
name = "http-range-header"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "httparse"
|
2022-09-18 19:30:38 +00:00
|
|
|
version = "1.8.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-09-18 19:30:38 +00:00
|
|
|
checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "httpdate"
|
|
|
|
version = "1.0.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "humantime"
|
|
|
|
version = "2.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hyper"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.14.27"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"futures-channel",
|
|
|
|
"futures-core",
|
|
|
|
"futures-util",
|
|
|
|
"h2",
|
|
|
|
"http",
|
|
|
|
"http-body",
|
|
|
|
"httparse",
|
|
|
|
"httpdate",
|
2022-10-20 05:05:36 +00:00
|
|
|
"itoa",
|
2022-07-16 21:49:35 +00:00
|
|
|
"pin-project-lite 0.2.9",
|
2023-06-22 10:25:30 +00:00
|
|
|
"socket2 0.4.9",
|
2022-07-16 21:49:35 +00:00
|
|
|
"tokio",
|
|
|
|
"tower-service",
|
|
|
|
"tracing",
|
|
|
|
"want",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hyper-rustls"
|
2022-12-21 04:12:26 +00:00
|
|
|
version = "0.23.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-21 04:12:26 +00:00
|
|
|
checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"http",
|
|
|
|
"hyper",
|
|
|
|
"log",
|
2023-01-16 15:42:31 +00:00
|
|
|
"rustls 0.20.8",
|
2022-07-16 21:49:35 +00:00
|
|
|
"rustls-native-certs",
|
|
|
|
"tokio",
|
2023-06-22 10:25:30 +00:00
|
|
|
"tokio-rustls 0.23.4",
|
2023-01-20 16:00:18 +00:00
|
|
|
"webpki-roots",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-06-22 10:25:30 +00:00
|
|
|
[[package]]
|
|
|
|
name = "hyper-rustls"
|
|
|
|
version = "0.24.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0646026eb1b3eea4cd9ba47912ea5ce9cc07713d105b1a14698f4e6433d348b7"
|
|
|
|
dependencies = [
|
|
|
|
"http",
|
|
|
|
"hyper",
|
|
|
|
"rustls 0.21.2",
|
|
|
|
"tokio",
|
|
|
|
"tokio-rustls 0.24.1",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "hyper-tls"
|
|
|
|
version = "0.5.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
|
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"hyper",
|
|
|
|
"native-tls",
|
|
|
|
"tokio",
|
|
|
|
"tokio-native-tls",
|
|
|
|
]
|
|
|
|
|
2022-08-16 07:44:32 +00:00
|
|
|
[[package]]
|
|
|
|
name = "iana-time-zone"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.1.57"
|
2022-08-16 07:44:32 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613"
|
2022-08-16 07:44:32 +00:00
|
|
|
dependencies = [
|
|
|
|
"android_system_properties",
|
|
|
|
"core-foundation-sys",
|
2022-10-20 05:05:36 +00:00
|
|
|
"iana-time-zone-haiku",
|
2022-08-16 07:44:32 +00:00
|
|
|
"js-sys",
|
|
|
|
"wasm-bindgen",
|
2023-04-08 08:44:28 +00:00
|
|
|
"windows 0.48.0",
|
2022-08-16 07:44:32 +00:00
|
|
|
]
|
|
|
|
|
2022-10-20 05:05:36 +00:00
|
|
|
[[package]]
|
|
|
|
name = "iana-time-zone-haiku"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.1.2"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
|
2022-10-20 05:05:36 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"cc",
|
2022-10-20 05:05:36 +00:00
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "ident_case"
|
|
|
|
version = "1.0.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "idna"
|
|
|
|
version = "0.2.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8"
|
|
|
|
dependencies = [
|
|
|
|
"matches",
|
|
|
|
"unicode-bidi",
|
|
|
|
"unicode-normalization",
|
|
|
|
]
|
|
|
|
|
2022-09-18 19:30:38 +00:00
|
|
|
[[package]]
|
|
|
|
name = "idna"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.4.0"
|
2022-09-18 19:30:38 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c"
|
2022-09-18 19:30:38 +00:00
|
|
|
dependencies = [
|
|
|
|
"unicode-bidi",
|
|
|
|
"unicode-normalization",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "if-addrs"
|
|
|
|
version = "0.7.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "cbc0fa01ffc752e9dbc72818cdb072cd028b86be5e09dd04c5a643704fe101a9"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "if-watch"
|
2023-03-31 06:34:52 +00:00
|
|
|
version = "3.0.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-31 06:34:52 +00:00
|
|
|
checksum = "a9465340214b296cd17a0009acdb890d6160010b8adf8f78a00d0d7ab270f79f"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"async-io",
|
|
|
|
"core-foundation",
|
|
|
|
"fnv",
|
|
|
|
"futures",
|
|
|
|
"if-addrs",
|
|
|
|
"ipnet",
|
|
|
|
"log",
|
|
|
|
"rtnetlink",
|
|
|
|
"system-configuration",
|
2023-01-16 15:42:31 +00:00
|
|
|
"tokio",
|
2023-03-25 04:45:33 +00:00
|
|
|
"windows 0.34.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "impl-codec"
|
|
|
|
version = "0.6.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f"
|
|
|
|
dependencies = [
|
|
|
|
"parity-scale-codec",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "impl-rlp"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808"
|
|
|
|
dependencies = [
|
|
|
|
"rlp",
|
|
|
|
]
|
|
|
|
|
2022-10-20 05:05:36 +00:00
|
|
|
[[package]]
|
|
|
|
name = "impl-serde"
|
|
|
|
version = "0.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd"
|
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "impl-trait-for-tuples"
|
|
|
|
version = "0.2.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2022-07-17 21:17:23 +00:00
|
|
|
[[package]]
|
2023-01-20 16:00:18 +00:00
|
|
|
name = "in-instructions-pallet"
|
|
|
|
version = "0.1.0"
|
2022-07-17 21:17:23 +00:00
|
|
|
dependencies = [
|
2023-01-20 16:00:18 +00:00
|
|
|
"frame-support",
|
|
|
|
"frame-system",
|
|
|
|
"in-instructions-primitives",
|
2022-07-17 21:17:23 +00:00
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
2023-01-20 16:00:18 +00:00
|
|
|
"serai-primitives",
|
2023-03-31 10:34:09 +00:00
|
|
|
"sp-application-crypto",
|
2023-01-20 16:00:18 +00:00
|
|
|
"sp-runtime",
|
|
|
|
"thiserror",
|
2023-01-28 06:47:13 +00:00
|
|
|
"tokens-pallet",
|
2023-03-31 10:34:09 +00:00
|
|
|
"validator-sets-pallet",
|
2022-07-17 21:17:23 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2023-01-20 16:00:18 +00:00
|
|
|
name = "in-instructions-primitives"
|
|
|
|
version = "0.1.0"
|
2022-07-17 21:17:23 +00:00
|
|
|
dependencies = [
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
2023-01-20 16:00:18 +00:00
|
|
|
"serai-primitives",
|
2022-07-17 21:17:23 +00:00
|
|
|
"serde",
|
Move in instructions from inherent transactions to unsigned transactions
The original intent was to use inherent transactions to prevent needing to vote
on-chain, which would spam the chain with worthless votes. Inherent
transactions, and our Tendermint library, would use the BFT's processs voting
to also vote on all included transactions. This perfectly collapses integrity
voting creating *no additional on-chain costs*.
Unfortunately, this led to issues such as #6, along with questions of validator
scalability when all validators are expencted to participate in consensus (in
order to vote on if the included instructions are valid). This has been
summarized in #241.
With this change, we can remove Tendermint from Substrate. This greatly
decreases our complexity. While I'm unhappy with the amount of time spent on
it, just to reach this conclusion, thankfully tendermint-machine itself is
still usable for #163. This also has reached a tipping point recently as the
polkadot-v0.9.40 branch of substrate changed how syncing works, requiring
further changes to sc-tendermint. These have no value if we're just going to
get rid of it later, due to fundamental design issues, yet I would like to
keep Substrate updated.
This should be followed by moving back to GRANDPA, enabling closing most open
Tendermint issues.
Please note the current in-instructions-pallet does not actually verify the
included signature yet. It's marked TODO, despite this bing critical.
2023-03-26 06:58:04 +00:00
|
|
|
"sp-application-crypto",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-runtime",
|
|
|
|
"sp-std 5.0.0",
|
2023-01-28 06:47:13 +00:00
|
|
|
"tokens-primitives",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"zeroize",
|
2022-07-17 21:17:23 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2022-07-16 21:49:35 +00:00
|
|
|
name = "indenter"
|
|
|
|
version = "0.3.3"
|
2022-07-17 21:17:23 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-07-16 21:49:35 +00:00
|
|
|
checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
|
2022-07-17 21:17:23 +00:00
|
|
|
|
|
|
|
[[package]]
|
2022-07-16 21:49:35 +00:00
|
|
|
name = "indexmap"
|
2023-03-25 04:45:33 +00:00
|
|
|
version = "1.9.3"
|
2022-07-17 21:17:23 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-25 04:45:33 +00:00
|
|
|
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
|
2022-07-17 21:17:23 +00:00
|
|
|
dependencies = [
|
2022-07-16 21:49:35 +00:00
|
|
|
"autocfg",
|
2023-03-06 12:39:43 +00:00
|
|
|
"hashbrown 0.12.3",
|
2022-07-16 21:49:35 +00:00
|
|
|
"serde",
|
2022-07-17 21:17:23 +00:00
|
|
|
]
|
|
|
|
|
2023-06-28 18:57:58 +00:00
|
|
|
[[package]]
|
|
|
|
name = "indexmap"
|
|
|
|
version = "2.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d"
|
|
|
|
dependencies = [
|
|
|
|
"equivalent",
|
|
|
|
"hashbrown 0.14.0",
|
|
|
|
]
|
|
|
|
|
2022-10-29 08:54:42 +00:00
|
|
|
[[package]]
|
|
|
|
name = "inout"
|
|
|
|
version = "0.1.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"
|
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2022-10-29 08:54:42 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "instant"
|
|
|
|
version = "0.1.12"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "integer-sqrt"
|
|
|
|
version = "0.1.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770"
|
|
|
|
dependencies = [
|
|
|
|
"num-traits",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2023-01-16 15:42:31 +00:00
|
|
|
name = "interceptor"
|
|
|
|
version = "0.8.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-16 15:42:31 +00:00
|
|
|
checksum = "1e8a11ae2da61704edada656798b61c94b35ecac2c58eb955156987d5e6be90b"
|
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"bytes",
|
|
|
|
"log",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"rtcp",
|
|
|
|
"rtp",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
"waitgroup",
|
|
|
|
"webrtc-srtp",
|
|
|
|
"webrtc-util",
|
|
|
|
]
|
2022-07-16 21:49:35 +00:00
|
|
|
|
2022-11-11 04:59:20 +00:00
|
|
|
[[package]]
|
|
|
|
name = "io-lifetimes"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "1.0.11"
|
2022-11-11 04:59:20 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
|
2022-11-11 04:59:20 +00:00
|
|
|
dependencies = [
|
2023-07-02 00:27:03 +00:00
|
|
|
"hermit-abi",
|
2022-11-11 04:59:20 +00:00
|
|
|
"libc",
|
2023-04-08 08:44:28 +00:00
|
|
|
"windows-sys 0.48.0",
|
2022-11-11 04:59:20 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "ip_network"
|
|
|
|
version = "0.4.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "aa2f047c0a98b2f299aa5d6d7088443570faae494e9ae1305e48be000c9e0eb1"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ipconfig"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.3.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"socket2 0.5.3",
|
2022-07-16 21:49:35 +00:00
|
|
|
"widestring",
|
2023-06-22 10:25:30 +00:00
|
|
|
"windows-sys 0.48.0",
|
|
|
|
"winreg 0.50.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ipnet"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "2.8.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6"
|
2022-12-07 22:56:53 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "is-terminal"
|
2023-07-02 00:27:03 +00:00
|
|
|
version = "0.4.8"
|
2022-12-07 22:56:53 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-07-02 00:27:03 +00:00
|
|
|
checksum = "24fddda5af7e54bf7da53067d6e802dbcc381d0a8eef629df528e3ebf68755cb"
|
2022-12-07 22:56:53 +00:00
|
|
|
dependencies = [
|
2023-07-02 00:27:03 +00:00
|
|
|
"hermit-abi",
|
|
|
|
"rustix 0.38.1",
|
2023-04-08 08:44:28 +00:00
|
|
|
"windows-sys 0.48.0",
|
2022-12-07 22:56:53 +00:00
|
|
|
]
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "itertools"
|
2022-09-29 18:33:09 +00:00
|
|
|
version = "0.10.5"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-09-29 18:33:09 +00:00
|
|
|
checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"either",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "itoa"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "1.0.6"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "jobserver"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.1.26"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "js-sys"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.3.64"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"wasm-bindgen",
|
|
|
|
]
|
|
|
|
|
2023-01-17 07:35:22 +00:00
|
|
|
[[package]]
|
|
|
|
name = "jsonrpc-core"
|
|
|
|
version = "18.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb"
|
|
|
|
dependencies = [
|
|
|
|
"futures",
|
|
|
|
"futures-executor",
|
|
|
|
"futures-util",
|
|
|
|
"log",
|
|
|
|
"serde",
|
|
|
|
"serde_derive",
|
|
|
|
"serde_json",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "jsonrpsee"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "0.16.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-04 08:17:36 +00:00
|
|
|
checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-01-20 16:00:18 +00:00
|
|
|
"jsonrpsee-client-transport",
|
2022-07-16 21:49:35 +00:00
|
|
|
"jsonrpsee-core",
|
2023-01-20 16:00:18 +00:00
|
|
|
"jsonrpsee-http-client",
|
2022-07-16 21:49:35 +00:00
|
|
|
"jsonrpsee-proc-macros",
|
2023-01-04 08:17:36 +00:00
|
|
|
"jsonrpsee-server",
|
2022-07-16 21:49:35 +00:00
|
|
|
"jsonrpsee-types",
|
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
2023-01-20 16:00:18 +00:00
|
|
|
[[package]]
|
|
|
|
name = "jsonrpsee-client-transport"
|
|
|
|
version = "0.16.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "965de52763f2004bc91ac5bcec504192440f0b568a5d621c59d9dbd6f886c3fb"
|
|
|
|
dependencies = [
|
|
|
|
"futures-util",
|
|
|
|
"http",
|
|
|
|
"jsonrpsee-core",
|
2022-07-16 21:49:35 +00:00
|
|
|
"jsonrpsee-types",
|
2023-01-20 16:00:18 +00:00
|
|
|
"pin-project",
|
|
|
|
"rustls-native-certs",
|
|
|
|
"soketto",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
2023-06-22 10:25:30 +00:00
|
|
|
"tokio-rustls 0.23.4",
|
2023-01-20 16:00:18 +00:00
|
|
|
"tokio-util",
|
2022-07-16 21:49:35 +00:00
|
|
|
"tracing",
|
2023-01-20 16:00:18 +00:00
|
|
|
"webpki-roots",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "jsonrpsee-core"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "0.16.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-04 08:17:36 +00:00
|
|
|
checksum = "a4e70b4439a751a5de7dd5ed55eacff78ebf4ffe0fc009cb1ebb11417f5b536b"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
2023-04-08 08:44:28 +00:00
|
|
|
"arrayvec",
|
2023-01-20 16:00:18 +00:00
|
|
|
"async-lock",
|
2022-07-16 21:49:35 +00:00
|
|
|
"async-trait",
|
|
|
|
"beef",
|
|
|
|
"futures-channel",
|
2023-01-20 16:00:18 +00:00
|
|
|
"futures-timer",
|
2022-07-16 21:49:35 +00:00
|
|
|
"futures-util",
|
|
|
|
"globset",
|
|
|
|
"hyper",
|
|
|
|
"jsonrpsee-types",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"rustc-hash",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"soketto",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2023-01-20 16:00:18 +00:00
|
|
|
name = "jsonrpsee-http-client"
|
|
|
|
version = "0.16.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-20 16:00:18 +00:00
|
|
|
checksum = "cc345b0a43c6bc49b947ebeb936e886a419ee3d894421790c969cc56040542ad"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-01-20 16:00:18 +00:00
|
|
|
"async-trait",
|
2022-07-16 21:49:35 +00:00
|
|
|
"hyper",
|
2023-06-22 10:25:30 +00:00
|
|
|
"hyper-rustls 0.23.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"jsonrpsee-core",
|
|
|
|
"jsonrpsee-types",
|
2023-01-20 16:00:18 +00:00
|
|
|
"rustc-hash",
|
2022-07-16 21:49:35 +00:00
|
|
|
"serde",
|
|
|
|
"serde_json",
|
2023-01-20 16:00:18 +00:00
|
|
|
"thiserror",
|
2022-07-16 21:49:35 +00:00
|
|
|
"tokio",
|
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "jsonrpsee-proc-macros"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "0.16.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-04 08:17:36 +00:00
|
|
|
checksum = "baa6da1e4199c10d7b1d0a6e5e8bd8e55f351163b6f4b3cbb044672a69bd4c1c"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-03-06 12:39:43 +00:00
|
|
|
"heck 0.4.1",
|
2022-12-07 23:05:06 +00:00
|
|
|
"proc-macro-crate",
|
2022-07-16 21:49:35 +00:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2023-01-04 08:17:36 +00:00
|
|
|
name = "jsonrpsee-server"
|
|
|
|
version = "0.16.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-04 08:17:36 +00:00
|
|
|
checksum = "1fb69dad85df79527c019659a992498d03f8495390496da2f07e6c24c2b356fc"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"futures-channel",
|
|
|
|
"futures-util",
|
2022-09-29 18:33:09 +00:00
|
|
|
"http",
|
2023-01-04 08:17:36 +00:00
|
|
|
"hyper",
|
2022-07-16 21:49:35 +00:00
|
|
|
"jsonrpsee-core",
|
|
|
|
"jsonrpsee-types",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"soketto",
|
|
|
|
"tokio",
|
|
|
|
"tokio-stream",
|
|
|
|
"tokio-util",
|
2023-01-04 08:17:36 +00:00
|
|
|
"tower",
|
2022-07-16 21:49:35 +00:00
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2023-01-04 08:17:36 +00:00
|
|
|
name = "jsonrpsee-types"
|
|
|
|
version = "0.16.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5bd522fe1ce3702fd94812965d7bb7a3364b1c9aba743944c5a00529aae80f8c"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"beef",
|
|
|
|
"serde",
|
2022-07-16 21:49:35 +00:00
|
|
|
"serde_json",
|
2023-01-04 08:17:36 +00:00
|
|
|
"thiserror",
|
2022-07-16 21:49:35 +00:00
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
2023-03-25 04:45:33 +00:00
|
|
|
[[package]]
|
|
|
|
name = "k256"
|
2023-04-11 13:23:54 +00:00
|
|
|
version = "0.13.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc"
|
2023-03-25 04:45:33 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
2023-06-22 10:25:30 +00:00
|
|
|
"ecdsa 0.16.7",
|
|
|
|
"elliptic-curve 0.13.5",
|
2023-03-06 13:22:04 +00:00
|
|
|
"once_cell",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2023-04-08 08:44:28 +00:00
|
|
|
"signature 2.1.0",
|
2023-03-06 13:22:04 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "keccak"
|
2023-05-10 11:34:07 +00:00
|
|
|
version = "0.1.4"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-10 11:34:07 +00:00
|
|
|
checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940"
|
2022-11-21 07:23:38 +00:00
|
|
|
dependencies = [
|
|
|
|
"cpufeatures",
|
|
|
|
]
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "kvdb"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "0.13.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-04 08:17:36 +00:00
|
|
|
checksum = "e7d770dcb02bf6835887c3a979b5107a04ff4bbde97a5f0928d27404a155add9"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"smallvec",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "kvdb-memorydb"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "0.13.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-04 08:17:36 +00:00
|
|
|
checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"kvdb",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "kvdb-rocksdb"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.19.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "b644c70b92285f66bfc2032922a79000ea30af7bc2ab31902992a5dcb9b434f6"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"kvdb",
|
|
|
|
"num_cpus",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"regex",
|
|
|
|
"rocksdb",
|
|
|
|
"smallvec",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "lalrpop"
|
2023-05-01 07:17:37 +00:00
|
|
|
version = "0.19.12"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-01 07:17:37 +00:00
|
|
|
checksum = "0a1cbf952127589f2851ab2046af368fd20645491bb4b376f04b7f94d7a9837b"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"ascii-canvas",
|
|
|
|
"bit-set",
|
|
|
|
"diff",
|
|
|
|
"ena",
|
2023-03-26 12:43:01 +00:00
|
|
|
"is-terminal",
|
2022-07-16 21:49:35 +00:00
|
|
|
"itertools",
|
|
|
|
"lalrpop-util",
|
|
|
|
"petgraph",
|
|
|
|
"regex",
|
2023-04-23 23:21:24 +00:00
|
|
|
"regex-syntax 0.6.29",
|
2022-07-16 21:49:35 +00:00
|
|
|
"string_cache",
|
|
|
|
"term",
|
|
|
|
"tiny-keccak",
|
|
|
|
"unicode-xid",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "lalrpop-util"
|
2023-05-01 07:17:37 +00:00
|
|
|
version = "0.19.12"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-01 07:17:37 +00:00
|
|
|
checksum = "d3c48237b9604c5a4702de6b824e02006c3214327564636aef27c1028a8fa0ed"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "lazy_static"
|
|
|
|
version = "1.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
2023-03-28 08:38:01 +00:00
|
|
|
dependencies = [
|
2023-06-29 01:16:33 +00:00
|
|
|
"spin 0.5.2",
|
2023-03-28 08:38:01 +00:00
|
|
|
]
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "lazycell"
|
|
|
|
version = "1.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libc"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.2.147"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libloading"
|
2022-11-11 04:59:20 +00:00
|
|
|
version = "0.7.4"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-11-11 04:59:20 +00:00
|
|
|
checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
2022-12-21 04:12:26 +00:00
|
|
|
[[package]]
|
|
|
|
name = "libm"
|
|
|
|
version = "0.1.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "libm"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.2.7"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libp2p"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.51.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "f210d259724eae82005b5c48078619b7745edb7b76de370b03f8ba59ea103097"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
2023-06-22 10:25:30 +00:00
|
|
|
"getrandom 0.2.10",
|
2022-07-16 21:49:35 +00:00
|
|
|
"instant",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-allow-block-list",
|
|
|
|
"libp2p-connection-limits",
|
|
|
|
"libp2p-core",
|
2022-07-16 21:49:35 +00:00
|
|
|
"libp2p-dns",
|
|
|
|
"libp2p-identify",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-identity",
|
2022-07-16 21:49:35 +00:00
|
|
|
"libp2p-kad",
|
|
|
|
"libp2p-mdns",
|
|
|
|
"libp2p-metrics",
|
|
|
|
"libp2p-noise",
|
|
|
|
"libp2p-ping",
|
2023-01-16 15:42:31 +00:00
|
|
|
"libp2p-quic",
|
2022-07-16 21:49:35 +00:00
|
|
|
"libp2p-request-response",
|
|
|
|
"libp2p-swarm",
|
|
|
|
"libp2p-tcp",
|
|
|
|
"libp2p-wasm-ext",
|
2023-01-16 15:42:31 +00:00
|
|
|
"libp2p-webrtc",
|
2022-07-16 21:49:35 +00:00
|
|
|
"libp2p-websocket",
|
|
|
|
"libp2p-yamux",
|
2023-06-28 18:57:58 +00:00
|
|
|
"multiaddr",
|
2022-07-16 21:49:35 +00:00
|
|
|
"pin-project",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2023-06-28 18:57:58 +00:00
|
|
|
name = "libp2p-allow-block-list"
|
|
|
|
version = "0.1.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "510daa05efbc25184458db837f6f9a5143888f1caa742426d92e1833ddd38a50"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-core",
|
|
|
|
"libp2p-identity",
|
|
|
|
"libp2p-swarm",
|
|
|
|
"void",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libp2p-connection-limits"
|
|
|
|
version = "0.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4caa33f1d26ed664c4fe2cca81a08c8e07d4c1c04f2f4ac7655c2dd85467fda0"
|
|
|
|
dependencies = [
|
|
|
|
"libp2p-core",
|
|
|
|
"libp2p-identity",
|
|
|
|
"libp2p-swarm",
|
2023-03-06 12:39:43 +00:00
|
|
|
"void",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libp2p-core"
|
2023-05-10 11:34:07 +00:00
|
|
|
version = "0.39.2"
|
2023-03-06 12:39:43 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-10 11:34:07 +00:00
|
|
|
checksum = "3c1df63c0b582aa434fb09b2d86897fa2b419ffeccf934b36f87fcedc8e835c2"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"either",
|
|
|
|
"fnv",
|
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
|
|
|
"instant",
|
2023-03-16 23:37:32 +00:00
|
|
|
"libp2p-identity",
|
2022-07-16 21:49:35 +00:00
|
|
|
"log",
|
2023-06-28 18:57:58 +00:00
|
|
|
"multiaddr",
|
2023-03-06 12:39:43 +00:00
|
|
|
"multihash 0.17.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"multistream-select",
|
2023-01-16 15:42:31 +00:00
|
|
|
"once_cell",
|
2022-07-16 21:49:35 +00:00
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"pin-project",
|
2023-03-16 23:37:32 +00:00
|
|
|
"quick-protobuf",
|
2022-07-16 21:49:35 +00:00
|
|
|
"rand 0.8.5",
|
|
|
|
"rw-stream-sink",
|
|
|
|
"smallvec",
|
|
|
|
"thiserror",
|
|
|
|
"unsigned-varint",
|
|
|
|
"void",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libp2p-dns"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.39.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"futures",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-core",
|
2022-07-16 21:49:35 +00:00
|
|
|
"log",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"smallvec",
|
|
|
|
"trust-dns-resolver",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libp2p-identify"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.42.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "5455f472243e63b9c497ff320ded0314254a9eb751799a39c283c6f20b793f3c"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"asynchronous-codec",
|
2023-06-28 18:57:58 +00:00
|
|
|
"either",
|
2022-07-16 21:49:35 +00:00
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-core",
|
|
|
|
"libp2p-identity",
|
2022-07-16 21:49:35 +00:00
|
|
|
"libp2p-swarm",
|
|
|
|
"log",
|
2023-07-02 00:27:03 +00:00
|
|
|
"lru 0.10.1",
|
2023-06-28 18:57:58 +00:00
|
|
|
"quick-protobuf",
|
|
|
|
"quick-protobuf-codec",
|
2022-07-16 21:49:35 +00:00
|
|
|
"smallvec",
|
|
|
|
"thiserror",
|
|
|
|
"void",
|
|
|
|
]
|
|
|
|
|
2023-03-16 23:37:32 +00:00
|
|
|
[[package]]
|
|
|
|
name = "libp2p-identity"
|
2023-05-10 11:34:07 +00:00
|
|
|
version = "0.1.2"
|
2023-03-16 23:37:32 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-10 11:34:07 +00:00
|
|
|
checksum = "9e2d584751cecb2aabaa56106be6be91338a60a0f4e420cf2af639204f596fc1"
|
2023-03-16 23:37:32 +00:00
|
|
|
dependencies = [
|
|
|
|
"bs58",
|
|
|
|
"ed25519-dalek",
|
|
|
|
"log",
|
2023-06-28 18:57:58 +00:00
|
|
|
"multiaddr",
|
2023-03-16 23:37:32 +00:00
|
|
|
"multihash 0.17.0",
|
|
|
|
"quick-protobuf",
|
|
|
|
"rand 0.8.5",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2023-03-16 23:37:32 +00:00
|
|
|
"thiserror",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "libp2p-kad"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.43.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"arrayvec",
|
2022-07-16 21:49:35 +00:00
|
|
|
"asynchronous-codec",
|
|
|
|
"bytes",
|
|
|
|
"either",
|
|
|
|
"fnv",
|
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
|
|
|
"instant",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-core",
|
|
|
|
"libp2p-identity",
|
2022-07-16 21:49:35 +00:00
|
|
|
"libp2p-swarm",
|
|
|
|
"log",
|
2023-06-28 18:57:58 +00:00
|
|
|
"quick-protobuf",
|
2022-10-20 05:05:36 +00:00
|
|
|
"rand 0.8.5",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
"smallvec",
|
|
|
|
"thiserror",
|
|
|
|
"uint",
|
|
|
|
"unsigned-varint",
|
|
|
|
"void",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libp2p-mdns"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.43.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "19983e1f949f979a928f2c603de1cf180cc0dc23e4ac93a62651ccb18341460b"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"data-encoding",
|
|
|
|
"futures",
|
|
|
|
"if-watch",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-core",
|
|
|
|
"libp2p-identity",
|
2022-07-16 21:49:35 +00:00
|
|
|
"libp2p-swarm",
|
|
|
|
"log",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"smallvec",
|
2023-06-22 10:25:30 +00:00
|
|
|
"socket2 0.4.9",
|
2023-01-04 08:17:36 +00:00
|
|
|
"tokio",
|
2023-01-16 15:42:31 +00:00
|
|
|
"trust-dns-proto",
|
2022-07-16 21:49:35 +00:00
|
|
|
"void",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libp2p-metrics"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.12.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "a42ec91e227d7d0dafa4ce88b333cdf5f277253873ab087555c92798db2ddd46"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-core",
|
2022-07-16 21:49:35 +00:00
|
|
|
"libp2p-identify",
|
|
|
|
"libp2p-kad",
|
|
|
|
"libp2p-ping",
|
|
|
|
"libp2p-swarm",
|
|
|
|
"prometheus-client",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libp2p-noise"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.42.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "9c3673da89d29936bc6435bafc638e2f184180d554ce844db65915113f86ec5e"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"curve25519-dalek 3.2.0",
|
|
|
|
"futures",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-core",
|
|
|
|
"libp2p-identity",
|
2022-07-16 21:49:35 +00:00
|
|
|
"log",
|
2023-01-16 15:42:31 +00:00
|
|
|
"once_cell",
|
2023-06-28 18:57:58 +00:00
|
|
|
"quick-protobuf",
|
2022-07-16 21:49:35 +00:00
|
|
|
"rand 0.8.5",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
"snow",
|
|
|
|
"static_assertions",
|
2023-01-16 15:42:31 +00:00
|
|
|
"thiserror",
|
|
|
|
"x25519-dalek 1.1.1",
|
2022-07-16 21:49:35 +00:00
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libp2p-ping"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.42.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "3e57759c19c28a73ef1eb3585ca410cefb72c1a709fcf6de1612a378e4219202"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"either",
|
2022-07-16 21:49:35 +00:00
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
|
|
|
"instant",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-core",
|
2022-07-16 21:49:35 +00:00
|
|
|
"libp2p-swarm",
|
|
|
|
"log",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"void",
|
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "libp2p-quic"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.7.0-alpha.3"
|
2023-01-16 15:42:31 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735"
|
2023-01-16 15:42:31 +00:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
|
|
|
"if-watch",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-core",
|
|
|
|
"libp2p-identity",
|
2023-01-16 15:42:31 +00:00
|
|
|
"libp2p-tls",
|
|
|
|
"log",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"quinn-proto",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"rustls 0.20.8",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "libp2p-request-response"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.24.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "7ffdb374267d42dc5ed5bc53f6e601d4a64ac5964779c6e40bb9e4f14c1e30d5"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"futures",
|
|
|
|
"instant",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-core",
|
|
|
|
"libp2p-identity",
|
2022-07-16 21:49:35 +00:00
|
|
|
"libp2p-swarm",
|
2022-10-20 05:05:36 +00:00
|
|
|
"rand 0.8.5",
|
2022-07-16 21:49:35 +00:00
|
|
|
"smallvec",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libp2p-swarm"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.42.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "903b3d592d7694e56204d211f29d31bc004be99386644ba8731fc3e3ef27b296"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"either",
|
|
|
|
"fnv",
|
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
|
|
|
"instant",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-core",
|
|
|
|
"libp2p-identity",
|
2023-01-16 15:42:31 +00:00
|
|
|
"libp2p-swarm-derive",
|
2022-07-16 21:49:35 +00:00
|
|
|
"log",
|
2022-10-20 05:05:36 +00:00
|
|
|
"rand 0.8.5",
|
2022-07-16 21:49:35 +00:00
|
|
|
"smallvec",
|
2023-01-16 15:42:31 +00:00
|
|
|
"tokio",
|
2022-07-16 21:49:35 +00:00
|
|
|
"void",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libp2p-swarm-derive"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.32.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "0fba456131824ab6acd4c7bf61e9c0f0a3014b5fc9868ccb8e10d344594cdc4f"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-03-06 12:39:43 +00:00
|
|
|
"heck 0.4.1",
|
2022-07-16 21:49:35 +00:00
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libp2p-tcp"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.39.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "33d33698596d7722d85d3ab0c86c2c322254fce1241e91208e3679b4eb3026cf"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
|
|
|
"if-watch",
|
|
|
|
"libc",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-core",
|
2022-07-16 21:49:35 +00:00
|
|
|
"log",
|
2023-06-22 10:25:30 +00:00
|
|
|
"socket2 0.4.9",
|
2023-01-04 08:17:36 +00:00
|
|
|
"tokio",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "libp2p-tls"
|
2023-03-16 23:37:32 +00:00
|
|
|
version = "0.1.0"
|
2023-01-16 15:42:31 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-16 23:37:32 +00:00
|
|
|
checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781"
|
2023-01-16 15:42:31 +00:00
|
|
|
dependencies = [
|
|
|
|
"futures",
|
|
|
|
"futures-rustls",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-core",
|
2023-03-16 23:37:32 +00:00
|
|
|
"libp2p-identity",
|
2023-01-16 15:42:31 +00:00
|
|
|
"rcgen 0.10.0",
|
|
|
|
"ring",
|
|
|
|
"rustls 0.20.8",
|
|
|
|
"thiserror",
|
|
|
|
"webpki 0.22.0",
|
|
|
|
"x509-parser 0.14.0",
|
|
|
|
"yasna",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libp2p-wasm-ext"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.39.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "77dff9d32353a5887adb86c8afc1de1a94d9e8c3bc6df8b2201d7cdf5c848f43"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"futures",
|
|
|
|
"js-sys",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-core",
|
2022-07-16 21:49:35 +00:00
|
|
|
"parity-send-wrapper",
|
|
|
|
"wasm-bindgen",
|
|
|
|
"wasm-bindgen-futures",
|
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "libp2p-webrtc"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.4.0-alpha.4"
|
2023-01-16 15:42:31 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "dba48592edbc2f60b4bc7c10d65445b0c3964c07df26fdf493b6880d33be36f8"
|
2023-01-16 15:42:31 +00:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"asynchronous-codec",
|
|
|
|
"bytes",
|
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
|
|
|
"hex",
|
|
|
|
"if-watch",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-core",
|
|
|
|
"libp2p-identity",
|
2023-01-16 15:42:31 +00:00
|
|
|
"libp2p-noise",
|
|
|
|
"log",
|
2023-06-28 18:57:58 +00:00
|
|
|
"multihash 0.17.0",
|
|
|
|
"quick-protobuf",
|
|
|
|
"quick-protobuf-codec",
|
2023-01-16 15:42:31 +00:00
|
|
|
"rand 0.8.5",
|
|
|
|
"rcgen 0.9.3",
|
|
|
|
"serde",
|
|
|
|
"stun",
|
|
|
|
"thiserror",
|
|
|
|
"tinytemplate",
|
|
|
|
"tokio",
|
|
|
|
"tokio-util",
|
|
|
|
"webrtc",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "libp2p-websocket"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.41.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "111273f7b3d3510524c752e8b7a5314b7f7a1fee7e68161c01a7d72cbb06db9f"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"either",
|
|
|
|
"futures",
|
|
|
|
"futures-rustls",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-core",
|
2022-07-16 21:49:35 +00:00
|
|
|
"log",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"quicksink",
|
|
|
|
"rw-stream-sink",
|
|
|
|
"soketto",
|
|
|
|
"url",
|
|
|
|
"webpki-roots",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libp2p-yamux"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.43.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"futures",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-core",
|
2022-10-20 05:05:36 +00:00
|
|
|
"log",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
|
|
|
"yamux",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "librocksdb-sys"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.11.0+8.1.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"bindgen",
|
|
|
|
"bzip2-sys",
|
|
|
|
"cc",
|
|
|
|
"glob",
|
|
|
|
"libc",
|
|
|
|
"libz-sys",
|
|
|
|
"tikv-jemalloc-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libsecp256k1"
|
|
|
|
version = "0.7.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1"
|
|
|
|
dependencies = [
|
|
|
|
"arrayref",
|
2022-10-22 01:40:50 +00:00
|
|
|
"base64 0.13.1",
|
2022-07-16 21:49:35 +00:00
|
|
|
"digest 0.9.0",
|
|
|
|
"hmac-drbg",
|
|
|
|
"libsecp256k1-core",
|
|
|
|
"libsecp256k1-gen-ecmult",
|
|
|
|
"libsecp256k1-gen-genmult",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"serde",
|
|
|
|
"sha2 0.9.9",
|
|
|
|
"typenum",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libsecp256k1-core"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451"
|
|
|
|
dependencies = [
|
|
|
|
"crunchy",
|
|
|
|
"digest 0.9.0",
|
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libsecp256k1-gen-ecmult"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809"
|
|
|
|
dependencies = [
|
|
|
|
"libsecp256k1-core",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libsecp256k1-gen-genmult"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c"
|
|
|
|
dependencies = [
|
|
|
|
"libsecp256k1-core",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libz-sys"
|
2023-05-01 07:17:37 +00:00
|
|
|
version = "1.1.9"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-01 07:17:37 +00:00
|
|
|
checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
"pkg-config",
|
|
|
|
"vcpkg",
|
|
|
|
]
|
|
|
|
|
2022-10-20 05:05:36 +00:00
|
|
|
[[package]]
|
|
|
|
name = "link-cplusplus"
|
2022-12-21 04:12:26 +00:00
|
|
|
version = "1.0.8"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-21 04:12:26 +00:00
|
|
|
checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5"
|
2022-10-20 05:05:36 +00:00
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "linked-hash-map"
|
|
|
|
version = "0.5.6"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "linked_hash_set"
|
|
|
|
version = "0.1.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588"
|
|
|
|
dependencies = [
|
|
|
|
"linked-hash-map",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "linregress"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.5.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "475015a7f8f017edb28d2e69813be23500ad4b32cfe3421c4148efc97324ee52"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"nalgebra",
|
|
|
|
]
|
|
|
|
|
2022-11-11 04:59:20 +00:00
|
|
|
[[package]]
|
|
|
|
name = "linux-raw-sys"
|
2022-12-21 04:12:26 +00:00
|
|
|
version = "0.1.4"
|
2022-11-11 04:59:20 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-21 04:12:26 +00:00
|
|
|
checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
|
2022-11-11 04:59:20 +00:00
|
|
|
|
2023-03-25 04:45:33 +00:00
|
|
|
[[package]]
|
|
|
|
name = "linux-raw-sys"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.3.8"
|
2023-03-25 04:45:33 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
|
2023-03-25 04:45:33 +00:00
|
|
|
|
2023-07-02 00:27:03 +00:00
|
|
|
[[package]]
|
|
|
|
name = "linux-raw-sys"
|
|
|
|
version = "0.4.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "lock_api"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.4.10"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"autocfg",
|
|
|
|
"scopeguard",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "log"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.4.19"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4"
|
2022-10-20 05:05:36 +00:00
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "lru"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.9.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "71e7d46de488603ffdd5f30afbc64fbba2378214a2c3a2fb83abf3d33126df17"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"hashbrown 0.13.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-04-09 06:31:10 +00:00
|
|
|
[[package]]
|
|
|
|
name = "lru"
|
2023-07-02 00:27:03 +00:00
|
|
|
version = "0.10.1"
|
2023-04-09 06:31:10 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-07-02 00:27:03 +00:00
|
|
|
checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670"
|
2023-04-09 06:31:10 +00:00
|
|
|
dependencies = [
|
|
|
|
"hashbrown 0.13.2",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "lru-cache"
|
|
|
|
version = "0.1.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c"
|
|
|
|
dependencies = [
|
|
|
|
"linked-hash-map",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "lz4"
|
2022-09-18 19:30:38 +00:00
|
|
|
version = "1.24.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-09-18 19:30:38 +00:00
|
|
|
checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"lz4-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "lz4-sys"
|
2022-09-18 19:30:38 +00:00
|
|
|
version = "1.9.4"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-09-18 19:30:38 +00:00
|
|
|
checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "mach"
|
|
|
|
version = "0.3.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "match_cfg"
|
|
|
|
version = "0.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "matchers"
|
|
|
|
version = "0.0.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1"
|
|
|
|
dependencies = [
|
|
|
|
"regex-automata",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "matches"
|
2023-01-28 06:47:13 +00:00
|
|
|
version = "0.1.10"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-28 06:47:13 +00:00
|
|
|
checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "matrixmultiply"
|
2023-05-10 11:34:07 +00:00
|
|
|
version = "0.3.7"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-10 11:34:07 +00:00
|
|
|
checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-05-01 07:17:37 +00:00
|
|
|
"autocfg",
|
2022-07-16 21:49:35 +00:00
|
|
|
"rawpointer",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "md-5"
|
2022-09-29 18:33:09 +00:00
|
|
|
version = "0.10.5"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-09-29 18:33:09 +00:00
|
|
|
checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "memchr"
|
|
|
|
version = "2.5.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "memfd"
|
2023-03-31 06:34:52 +00:00
|
|
|
version = "0.6.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-31 06:34:52 +00:00
|
|
|
checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-07-02 00:27:03 +00:00
|
|
|
"rustix 0.37.21",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "memmap2"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.5.10"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "memoffset"
|
|
|
|
version = "0.6.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
|
|
|
|
dependencies = [
|
|
|
|
"autocfg",
|
|
|
|
]
|
|
|
|
|
2023-06-28 18:57:58 +00:00
|
|
|
[[package]]
|
|
|
|
name = "memoffset"
|
|
|
|
version = "0.8.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1"
|
|
|
|
dependencies = [
|
|
|
|
"autocfg",
|
|
|
|
]
|
|
|
|
|
2023-03-06 12:39:43 +00:00
|
|
|
[[package]]
|
|
|
|
name = "memoffset"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.9.0"
|
2023-03-06 12:39:43 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
|
2023-03-06 12:39:43 +00:00
|
|
|
dependencies = [
|
|
|
|
"autocfg",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "memory-db"
|
2023-03-26 12:43:01 +00:00
|
|
|
version = "0.32.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-26 12:43:01 +00:00
|
|
|
checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"hash-db",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "memory_units"
|
2022-09-29 18:33:09 +00:00
|
|
|
version = "0.4.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-09-29 18:33:09 +00:00
|
|
|
checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "merlin"
|
|
|
|
version = "3.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d"
|
|
|
|
dependencies = [
|
|
|
|
"byteorder",
|
|
|
|
"keccak",
|
2022-09-18 19:30:38 +00:00
|
|
|
"rand_core 0.6.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "mime"
|
2023-03-25 04:45:33 +00:00
|
|
|
version = "0.3.17"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-25 04:45:33 +00:00
|
|
|
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
2022-08-29 07:32:59 +00:00
|
|
|
[[package]]
|
|
|
|
name = "minimal-ed448"
|
2023-04-19 06:25:19 +00:00
|
|
|
version = "0.3.1"
|
2022-08-29 07:32:59 +00:00
|
|
|
dependencies = [
|
2023-05-01 07:17:37 +00:00
|
|
|
"crypto-bigint 0.5.2",
|
2023-03-28 08:38:01 +00:00
|
|
|
"ff 0.13.0",
|
2022-12-24 20:09:09 +00:00
|
|
|
"ff-group-tests",
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2023-03-28 08:38:01 +00:00
|
|
|
"group 0.13.0",
|
2022-08-29 07:32:59 +00:00
|
|
|
"hex",
|
2022-09-18 19:30:38 +00:00
|
|
|
"rand_core 0.6.4",
|
2023-03-28 08:43:10 +00:00
|
|
|
"rustversion",
|
2022-08-29 07:32:59 +00:00
|
|
|
"subtle",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "minimal-lexical"
|
|
|
|
version = "0.2.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
|
|
|
|
2023-05-01 07:17:37 +00:00
|
|
|
[[package]]
|
|
|
|
name = "miniz_oxide"
|
|
|
|
version = "0.7.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7"
|
|
|
|
dependencies = [
|
|
|
|
"adler",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "mio"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.8.8"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"wasi 0.11.0+wasi-snapshot-preview1",
|
2023-06-22 10:25:30 +00:00
|
|
|
"windows-sys 0.48.0",
|
2022-10-20 05:05:36 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "mockall"
|
2023-03-26 12:43:01 +00:00
|
|
|
version = "0.11.4"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-26 12:43:01 +00:00
|
|
|
checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96"
|
2022-10-20 05:05:36 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"downcast",
|
|
|
|
"fragile",
|
|
|
|
"lazy_static",
|
|
|
|
"mockall_derive",
|
|
|
|
"predicates",
|
|
|
|
"predicates-tree",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "mockall_derive"
|
2023-03-26 12:43:01 +00:00
|
|
|
version = "0.11.4"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-26 12:43:01 +00:00
|
|
|
checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb"
|
2022-10-20 05:05:36 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "modular-frost"
|
2023-03-21 00:28:41 +00:00
|
|
|
version = "0.7.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-10-29 08:54:42 +00:00
|
|
|
"ciphersuite",
|
2022-07-16 21:49:35 +00:00
|
|
|
"dalek-ff-group",
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2022-10-29 08:54:42 +00:00
|
|
|
"dkg",
|
2022-07-30 22:35:39 +00:00
|
|
|
"dleq",
|
2022-07-16 21:49:35 +00:00
|
|
|
"flexible-transcript",
|
|
|
|
"hex",
|
2022-08-29 07:32:59 +00:00
|
|
|
"minimal-ed448",
|
2022-07-16 21:49:35 +00:00
|
|
|
"multiexp",
|
2022-12-09 00:04:35 +00:00
|
|
|
"rand_chacha 0.3.1",
|
2022-12-14 01:25:32 +00:00
|
|
|
"rand_core 0.6.4",
|
2022-10-29 08:54:42 +00:00
|
|
|
"schnorr-signatures",
|
2022-10-13 04:38:36 +00:00
|
|
|
"serde_json",
|
|
|
|
"subtle",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
Utilize zeroize (#76)
* Apply Zeroize to nonces used in Bulletproofs
Also makes bit decomposition constant time for a given amount of
outputs.
* Fix nonce reuse for single-signer CLSAG
* Attach Zeroize to most structures in Monero, and ZOnDrop to anything with private data
* Zeroize private keys and nonces
* Merge prepare_outputs and prepare_transactions
* Ensure CLSAG is constant time
* Pass by borrow where needed, bug fixes
The past few commitments have been one in-progress chunk which I've
broken up as best read.
* Add Zeroize to FROST structs
Still needs to zeroize internally, yet next step. Not quite as
aggressive as Monero, partially due to the limitations of HashMaps,
partially due to less concern about metadata, yet does still delete a
few smaller items of metadata (group key, context string...).
* Remove Zeroize from most Monero multisig structs
These structs largely didn't have private data, just fields with private
data, yet those fields implemented ZeroizeOnDrop making them already
covered. While there is still traces of the transaction left in RAM,
fully purging that was never the intent.
* Use Zeroize within dleq
bitvec doesn't offer Zeroize, so a manual zeroing has been implemented.
* Use Zeroize for random_nonce
It isn't perfect, due to the inability to zeroize the digest, and due to
kp256 requiring a few transformations. It does the best it can though.
Does move the per-curve random_nonce to a provided one, which is allowed
as of https://github.com/cfrg/draft-irtf-cfrg-frost/pull/231.
* Use Zeroize on FROST keygen/signing
* Zeroize constant time multiexp.
* Correct when FROST keygen zeroizes
* Move the FROST keys Arc into FrostKeys
Reduces amount of instances in memory.
* Manually implement Debug for FrostCore to not leak the secret share
* Misc bug fixes
* clippy + multiexp test bug fixes
* Correct FROST key gen share summation
It leaked our own share for ourself.
* Fix cross-group DLEq tests
2022-08-03 08:25:18 +00:00
|
|
|
"zeroize",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-01-17 07:35:22 +00:00
|
|
|
[[package]]
|
|
|
|
name = "monero"
|
|
|
|
version = "0.17.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "403883d12972e916dd9754cdb90c25441a9abcf435f8e09c3146de100150eeb0"
|
|
|
|
dependencies = [
|
2023-06-29 08:14:29 +00:00
|
|
|
"base58-monero 1.0.0",
|
2023-01-17 07:35:22 +00:00
|
|
|
"curve25519-dalek 3.2.0",
|
|
|
|
"fixed-hash 0.7.0",
|
|
|
|
"hex",
|
2023-04-09 06:31:10 +00:00
|
|
|
"hex-literal 0.3.4",
|
2023-01-17 07:35:22 +00:00
|
|
|
"sealed",
|
|
|
|
"serde",
|
|
|
|
"serde-big-array",
|
|
|
|
"thiserror",
|
|
|
|
"tiny-keccak",
|
|
|
|
]
|
|
|
|
|
2022-08-21 10:36:53 +00:00
|
|
|
[[package]]
|
|
|
|
name = "monero-generators"
|
2023-03-23 02:45:41 +00:00
|
|
|
version = "0.3.0"
|
2022-08-21 10:36:53 +00:00
|
|
|
dependencies = [
|
|
|
|
"curve25519-dalek 3.2.0",
|
|
|
|
"dalek-ff-group",
|
2023-03-28 08:38:01 +00:00
|
|
|
"group 0.13.0",
|
2022-10-20 05:05:36 +00:00
|
|
|
"sha3",
|
2023-04-22 08:38:47 +00:00
|
|
|
"std-shims",
|
2022-08-21 10:36:53 +00:00
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
2023-01-17 07:35:22 +00:00
|
|
|
[[package]]
|
|
|
|
name = "monero-rpc"
|
|
|
|
version = "0.3.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e016b5ed7dbf76e123516b22f35653a95d8c4b784d2ce2113395863dfd9f482f"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"chrono",
|
|
|
|
"fixed-hash 0.8.0",
|
|
|
|
"hex",
|
|
|
|
"http",
|
|
|
|
"jsonrpc-core",
|
|
|
|
"monero",
|
|
|
|
"reqwest",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"tracing",
|
2023-06-28 18:57:58 +00:00
|
|
|
"uuid 1.4.0",
|
2023-01-17 07:35:22 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "monero-serai"
|
2023-03-21 00:28:41 +00:00
|
|
|
version = "0.1.4-alpha"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-05-02 06:39:08 +00:00
|
|
|
"async-trait",
|
2023-06-29 08:14:29 +00:00
|
|
|
"base58-monero 1.1.0",
|
2023-03-10 19:16:00 +00:00
|
|
|
"crc",
|
2022-07-16 21:49:35 +00:00
|
|
|
"curve25519-dalek 3.2.0",
|
|
|
|
"dalek-ff-group",
|
2022-11-15 04:24:35 +00:00
|
|
|
"digest_auth",
|
2022-07-30 22:35:39 +00:00
|
|
|
"dleq",
|
2022-07-16 21:49:35 +00:00
|
|
|
"flexible-transcript",
|
2023-03-12 08:13:43 +00:00
|
|
|
"futures",
|
2023-03-28 08:38:01 +00:00
|
|
|
"group 0.13.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"hex",
|
2023-04-09 06:31:10 +00:00
|
|
|
"hex-literal 0.4.1",
|
2022-07-16 21:49:35 +00:00
|
|
|
"modular-frost",
|
2022-08-21 10:36:53 +00:00
|
|
|
"monero-generators",
|
2023-01-17 07:35:22 +00:00
|
|
|
"monero-rpc",
|
2022-07-26 07:05:15 +00:00
|
|
|
"multiexp",
|
2022-07-16 21:49:35 +00:00
|
|
|
"rand 0.8.5",
|
|
|
|
"rand_chacha 0.3.1",
|
2022-09-18 19:30:38 +00:00
|
|
|
"rand_core 0.6.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
"rand_distr",
|
|
|
|
"reqwest",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
2022-10-20 05:05:36 +00:00
|
|
|
"sha3",
|
2023-06-29 01:16:33 +00:00
|
|
|
"std-shims",
|
2022-07-16 21:49:35 +00:00
|
|
|
"subtle",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
Utilize zeroize (#76)
* Apply Zeroize to nonces used in Bulletproofs
Also makes bit decomposition constant time for a given amount of
outputs.
* Fix nonce reuse for single-signer CLSAG
* Attach Zeroize to most structures in Monero, and ZOnDrop to anything with private data
* Zeroize private keys and nonces
* Merge prepare_outputs and prepare_transactions
* Ensure CLSAG is constant time
* Pass by borrow where needed, bug fixes
The past few commitments have been one in-progress chunk which I've
broken up as best read.
* Add Zeroize to FROST structs
Still needs to zeroize internally, yet next step. Not quite as
aggressive as Monero, partially due to the limitations of HashMaps,
partially due to less concern about metadata, yet does still delete a
few smaller items of metadata (group key, context string...).
* Remove Zeroize from most Monero multisig structs
These structs largely didn't have private data, just fields with private
data, yet those fields implemented ZeroizeOnDrop making them already
covered. While there is still traces of the transaction left in RAM,
fully purging that was never the intent.
* Use Zeroize within dleq
bitvec doesn't offer Zeroize, so a manual zeroing has been implemented.
* Use Zeroize for random_nonce
It isn't perfect, due to the inability to zeroize the digest, and due to
kp256 requiring a few transformations. It does the best it can though.
Does move the per-curve random_nonce to a provided one, which is allowed
as of https://github.com/cfrg/draft-irtf-cfrg-frost/pull/231.
* Use Zeroize on FROST keygen/signing
* Zeroize constant time multiexp.
* Correct when FROST keygen zeroizes
* Move the FROST keys Arc into FrostKeys
Reduces amount of instances in memory.
* Manually implement Debug for FrostCore to not leak the secret share
* Misc bug fixes
* clippy + multiexp test bug fixes
* Correct FROST key gen share summation
It leaked our own share for ourself.
* Fix cross-group DLEq tests
2022-08-03 08:25:18 +00:00
|
|
|
"zeroize",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-03-06 12:39:43 +00:00
|
|
|
[[package]]
|
|
|
|
name = "multiaddr"
|
2023-03-25 04:45:33 +00:00
|
|
|
version = "0.17.1"
|
2023-03-06 12:39:43 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-25 04:45:33 +00:00
|
|
|
checksum = "2b36f567c7099511fa8612bbbb52dda2419ce0bdbacf31714e3a5ffdb766d3bd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"arrayref",
|
|
|
|
"byteorder",
|
|
|
|
"data-encoding",
|
2023-03-25 04:45:33 +00:00
|
|
|
"log",
|
2023-03-06 12:39:43 +00:00
|
|
|
"multibase",
|
|
|
|
"multihash 0.17.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"percent-encoding",
|
|
|
|
"serde",
|
|
|
|
"static_assertions",
|
|
|
|
"unsigned-varint",
|
|
|
|
"url",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "multibase"
|
|
|
|
version = "0.9.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404"
|
|
|
|
dependencies = [
|
|
|
|
"base-x",
|
|
|
|
"data-encoding",
|
|
|
|
"data-encoding-macro",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "multiexp"
|
2023-03-21 00:28:41 +00:00
|
|
|
version = "0.3.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"dalek-ff-group",
|
2023-03-28 08:38:01 +00:00
|
|
|
"ff 0.13.0",
|
|
|
|
"group 0.13.0",
|
|
|
|
"k256",
|
2022-09-18 19:30:38 +00:00
|
|
|
"rand_core 0.6.4",
|
2023-03-28 08:43:10 +00:00
|
|
|
"rustversion",
|
2023-04-22 08:38:47 +00:00
|
|
|
"std-shims",
|
Utilize zeroize (#76)
* Apply Zeroize to nonces used in Bulletproofs
Also makes bit decomposition constant time for a given amount of
outputs.
* Fix nonce reuse for single-signer CLSAG
* Attach Zeroize to most structures in Monero, and ZOnDrop to anything with private data
* Zeroize private keys and nonces
* Merge prepare_outputs and prepare_transactions
* Ensure CLSAG is constant time
* Pass by borrow where needed, bug fixes
The past few commitments have been one in-progress chunk which I've
broken up as best read.
* Add Zeroize to FROST structs
Still needs to zeroize internally, yet next step. Not quite as
aggressive as Monero, partially due to the limitations of HashMaps,
partially due to less concern about metadata, yet does still delete a
few smaller items of metadata (group key, context string...).
* Remove Zeroize from most Monero multisig structs
These structs largely didn't have private data, just fields with private
data, yet those fields implemented ZeroizeOnDrop making them already
covered. While there is still traces of the transaction left in RAM,
fully purging that was never the intent.
* Use Zeroize within dleq
bitvec doesn't offer Zeroize, so a manual zeroing has been implemented.
* Use Zeroize for random_nonce
It isn't perfect, due to the inability to zeroize the digest, and due to
kp256 requiring a few transformations. It does the best it can though.
Does move the per-curve random_nonce to a provided one, which is allowed
as of https://github.com/cfrg/draft-irtf-cfrg-frost/pull/231.
* Use Zeroize on FROST keygen/signing
* Zeroize constant time multiexp.
* Correct when FROST keygen zeroizes
* Move the FROST keys Arc into FrostKeys
Reduces amount of instances in memory.
* Manually implement Debug for FrostCore to not leak the secret share
* Misc bug fixes
* clippy + multiexp test bug fixes
* Correct FROST key gen share summation
It leaked our own share for ourself.
* Fix cross-group DLEq tests
2022-08-03 08:25:18 +00:00
|
|
|
"zeroize",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "multihash"
|
2022-08-16 07:44:32 +00:00
|
|
|
version = "0.16.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-08-16 07:44:32 +00:00
|
|
|
checksum = "1c346cf9999c631f002d8f977c4eaeaa0e6386f16007202308d0b3757522c2cc"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"blake2b_simd",
|
|
|
|
"blake2s_simd",
|
|
|
|
"blake3",
|
|
|
|
"core2",
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
"multihash-derive",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2022-10-20 05:05:36 +00:00
|
|
|
"sha3",
|
2022-07-16 21:49:35 +00:00
|
|
|
"unsigned-varint",
|
|
|
|
]
|
|
|
|
|
2023-03-06 12:39:43 +00:00
|
|
|
[[package]]
|
|
|
|
name = "multihash"
|
|
|
|
version = "0.17.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40"
|
|
|
|
dependencies = [
|
|
|
|
"core2",
|
2023-06-28 18:57:58 +00:00
|
|
|
"digest 0.10.7",
|
2023-03-06 12:39:43 +00:00
|
|
|
"multihash-derive",
|
2023-06-28 18:57:58 +00:00
|
|
|
"sha2 0.10.7",
|
2023-03-06 12:39:43 +00:00
|
|
|
"unsigned-varint",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "multihash-derive"
|
2023-05-01 07:17:37 +00:00
|
|
|
version = "0.8.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-01 07:17:37 +00:00
|
|
|
checksum = "1d6d4752e6230d8ef7adf7bd5d8c4b1f6561c1014c5ba9a37445ccefe18aa1db"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-12-07 23:05:06 +00:00
|
|
|
"proc-macro-crate",
|
2022-07-16 21:49:35 +00:00
|
|
|
"proc-macro-error",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-07-16 21:49:35 +00:00
|
|
|
"synstructure",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "multimap"
|
|
|
|
version = "0.8.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "multistream-select"
|
2022-12-07 22:56:53 +00:00
|
|
|
version = "0.12.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-07 22:56:53 +00:00
|
|
|
checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"futures",
|
|
|
|
"log",
|
|
|
|
"pin-project",
|
|
|
|
"smallvec",
|
|
|
|
"unsigned-varint",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "nalgebra"
|
2023-03-11 09:49:05 +00:00
|
|
|
version = "0.32.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-11 09:49:05 +00:00
|
|
|
checksum = "d68d47bba83f9e2006d117a9a33af1524e655516b8919caac694427a6fb1e511"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"approx",
|
|
|
|
"matrixmultiply",
|
|
|
|
"nalgebra-macros",
|
|
|
|
"num-complex",
|
2022-09-29 18:33:09 +00:00
|
|
|
"num-rational",
|
2022-07-16 21:49:35 +00:00
|
|
|
"num-traits",
|
|
|
|
"simba",
|
|
|
|
"typenum",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "nalgebra-macros"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.2.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "d232c68884c0c99810a5a4d333ef7e47689cfd0edc85efc9e54e1e6bf5212766"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "names"
|
2023-04-09 06:31:10 +00:00
|
|
|
version = "0.14.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 06:31:10 +00:00
|
|
|
checksum = "7bddcd3bf5144b6392de80e04c347cd7fab2508f6df16a85fc496ecd5cec39bc"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"rand 0.8.5",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "native-tls"
|
2022-11-04 12:07:37 +00:00
|
|
|
version = "0.2.11"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-11-04 12:07:37 +00:00
|
|
|
checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"lazy_static",
|
|
|
|
"libc",
|
|
|
|
"log",
|
|
|
|
"openssl",
|
|
|
|
"openssl-probe",
|
|
|
|
"openssl-sys",
|
|
|
|
"schannel",
|
|
|
|
"security-framework",
|
|
|
|
"security-framework-sys",
|
|
|
|
"tempfile",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "netlink-packet-core"
|
|
|
|
version = "0.4.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "345b8ab5bd4e71a2986663e88c56856699d060e78e152e6e9d7966fcd5491297"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"byteorder",
|
|
|
|
"libc",
|
|
|
|
"netlink-packet-utils",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "netlink-packet-route"
|
|
|
|
version = "0.12.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d9ea4302b9759a7a88242299225ea3688e63c85ea136371bb6cf94fd674efaab"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
2023-06-28 18:57:58 +00:00
|
|
|
"bitflags 1.3.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"byteorder",
|
|
|
|
"libc",
|
|
|
|
"netlink-packet-core",
|
|
|
|
"netlink-packet-utils",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "netlink-packet-utils"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.5.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "0ede8a08c71ad5a95cdd0e4e52facd37190977039a4704eb82a283f713747d34"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"byteorder",
|
|
|
|
"paste",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "netlink-proto"
|
|
|
|
version = "0.10.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6"
|
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"futures",
|
|
|
|
"log",
|
|
|
|
"netlink-packet-core",
|
|
|
|
"netlink-sys",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "netlink-sys"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.8.5"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"futures",
|
|
|
|
"libc",
|
|
|
|
"log",
|
2023-01-16 15:42:31 +00:00
|
|
|
"tokio",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "new_debug_unreachable"
|
|
|
|
version = "1.0.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "nix"
|
2022-12-07 22:56:53 +00:00
|
|
|
version = "0.24.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-07 22:56:53 +00:00
|
|
|
checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"bitflags 1.3.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"cfg-if",
|
|
|
|
"libc",
|
2023-01-16 15:42:31 +00:00
|
|
|
"memoffset 0.6.5",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "nohash-hasher"
|
|
|
|
version = "0.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "nom"
|
2023-01-16 15:42:31 +00:00
|
|
|
version = "7.1.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-16 15:42:31 +00:00
|
|
|
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"memchr",
|
|
|
|
"minimal-lexical",
|
|
|
|
]
|
|
|
|
|
2022-10-20 05:05:36 +00:00
|
|
|
[[package]]
|
|
|
|
name = "normalize-line-endings"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "num-bigint"
|
2022-09-29 18:33:09 +00:00
|
|
|
version = "0.4.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-09-29 18:33:09 +00:00
|
|
|
checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"autocfg",
|
|
|
|
"num-integer",
|
|
|
|
"num-traits",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "num-complex"
|
2023-01-28 06:47:13 +00:00
|
|
|
version = "0.4.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-28 06:47:13 +00:00
|
|
|
checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"num-traits",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "num-format"
|
2022-12-07 22:56:53 +00:00
|
|
|
version = "0.4.4"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-07 22:56:53 +00:00
|
|
|
checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"arrayvec",
|
2022-10-20 05:05:36 +00:00
|
|
|
"itoa",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "num-integer"
|
|
|
|
version = "0.1.45"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
|
|
|
|
dependencies = [
|
|
|
|
"autocfg",
|
|
|
|
"num-traits",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "num-rational"
|
|
|
|
version = "0.4.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
|
|
|
|
dependencies = [
|
|
|
|
"autocfg",
|
2022-09-29 18:33:09 +00:00
|
|
|
"num-bigint",
|
2022-07-16 21:49:35 +00:00
|
|
|
"num-integer",
|
|
|
|
"num-traits",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "num-traits"
|
|
|
|
version = "0.2.15"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
|
|
|
|
dependencies = [
|
|
|
|
"autocfg",
|
2023-06-22 10:25:30 +00:00
|
|
|
"libm 0.2.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "num_cpus"
|
2023-07-02 00:27:03 +00:00
|
|
|
version = "1.16.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-07-02 00:27:03 +00:00
|
|
|
checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-07-02 00:27:03 +00:00
|
|
|
"hermit-abi",
|
2022-07-16 21:49:35 +00:00
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
2023-03-17 00:16:57 +00:00
|
|
|
[[package]]
|
|
|
|
name = "num_enum"
|
2023-04-16 03:21:18 +00:00
|
|
|
version = "0.6.1"
|
2023-03-17 00:16:57 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-16 03:21:18 +00:00
|
|
|
checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1"
|
2023-03-17 00:16:57 +00:00
|
|
|
dependencies = [
|
|
|
|
"num_enum_derive",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "num_enum_derive"
|
2023-04-16 03:21:18 +00:00
|
|
|
version = "0.6.1"
|
2023-03-17 00:16:57 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-16 03:21:18 +00:00
|
|
|
checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6"
|
2023-03-17 00:16:57 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro-crate",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2022-12-21 04:12:26 +00:00
|
|
|
[[package]]
|
|
|
|
name = "object"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.30.4"
|
2022-12-21 04:12:26 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385"
|
2022-12-21 04:12:26 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"crc32fast",
|
|
|
|
"hashbrown 0.13.2",
|
|
|
|
"indexmap 1.9.3",
|
2022-12-21 04:12:26 +00:00
|
|
|
"memchr",
|
|
|
|
]
|
|
|
|
|
2023-07-02 00:27:03 +00:00
|
|
|
[[package]]
|
|
|
|
name = "object"
|
|
|
|
version = "0.31.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1"
|
|
|
|
dependencies = [
|
|
|
|
"memchr",
|
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "oid-registry"
|
|
|
|
version = "0.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "38e20717fa0541f39bd146692035c37bedfa532b3e5071b35761082407546b2a"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-01-16 15:42:31 +00:00
|
|
|
"asn1-rs 0.3.1",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2022-12-21 04:12:26 +00:00
|
|
|
[[package]]
|
2023-01-16 15:42:31 +00:00
|
|
|
name = "oid-registry"
|
|
|
|
version = "0.6.1"
|
2022-12-21 04:12:26 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-16 15:42:31 +00:00
|
|
|
checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff"
|
2022-12-21 04:12:26 +00:00
|
|
|
dependencies = [
|
2023-03-11 09:49:05 +00:00
|
|
|
"asn1-rs 0.5.2",
|
2022-12-21 04:12:26 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "once_cell"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "1.18.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "opaque-debug"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
|
|
|
|
|
2022-12-07 23:05:06 +00:00
|
|
|
[[package]]
|
|
|
|
name = "open-fastrlp"
|
|
|
|
version = "0.1.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce"
|
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"arrayvec",
|
2023-03-17 00:16:57 +00:00
|
|
|
"auto_impl",
|
2022-12-07 23:05:06 +00:00
|
|
|
"bytes",
|
|
|
|
"ethereum-types",
|
|
|
|
"open-fastrlp-derive",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "open-fastrlp-derive"
|
|
|
|
version = "0.1.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c"
|
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-12-07 23:05:06 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "openssl"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.10.55"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"bitflags 1.3.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"cfg-if",
|
|
|
|
"foreign-types",
|
|
|
|
"libc",
|
|
|
|
"once_cell",
|
|
|
|
"openssl-macros",
|
|
|
|
"openssl-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "openssl-macros"
|
2023-04-08 08:44:28 +00:00
|
|
|
version = "0.1.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-08 08:44:28 +00:00
|
|
|
checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "openssl-probe"
|
|
|
|
version = "0.1.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "openssl-sys"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.9.90"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
"libc",
|
|
|
|
"pkg-config",
|
|
|
|
"vcpkg",
|
|
|
|
]
|
|
|
|
|
2023-03-16 20:59:20 +00:00
|
|
|
[[package]]
|
|
|
|
name = "p256"
|
|
|
|
version = "0.11.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594"
|
|
|
|
dependencies = [
|
|
|
|
"ecdsa 0.14.8",
|
2023-03-25 04:45:33 +00:00
|
|
|
"elliptic-curve 0.12.3",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2023-03-16 20:59:20 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "p256"
|
2023-04-16 03:21:18 +00:00
|
|
|
version = "0.13.2"
|
2023-04-11 13:23:54 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-16 03:21:18 +00:00
|
|
|
checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"ecdsa 0.16.7",
|
|
|
|
"elliptic-curve 0.13.5",
|
2023-03-06 13:22:04 +00:00
|
|
|
"primeorder",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-03-16 20:59:20 +00:00
|
|
|
[[package]]
|
|
|
|
name = "p384"
|
|
|
|
version = "0.11.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa"
|
|
|
|
dependencies = [
|
|
|
|
"ecdsa 0.14.8",
|
2023-03-25 04:45:33 +00:00
|
|
|
"elliptic-curve 0.12.3",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2023-03-16 20:59:20 +00:00
|
|
|
]
|
|
|
|
|
2022-12-21 04:12:26 +00:00
|
|
|
[[package]]
|
|
|
|
name = "packed_simd_2"
|
|
|
|
version = "0.3.8"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a1914cd452d8fccd6f9db48147b29fd4ae05bea9dc5d9ad578509f72415de282"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"libm 0.1.4",
|
|
|
|
]
|
|
|
|
|
2023-03-28 08:38:01 +00:00
|
|
|
[[package]]
|
|
|
|
name = "pairing"
|
|
|
|
version = "0.23.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f"
|
|
|
|
dependencies = [
|
|
|
|
"group 0.13.0",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
2023-01-06 00:36:49 +00:00
|
|
|
name = "pallet-assets"
|
2022-07-16 21:49:35 +00:00
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"frame-benchmarking",
|
|
|
|
"frame-support",
|
|
|
|
"frame-system",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
2023-01-06 00:36:49 +00:00
|
|
|
"sp-core",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-runtime",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-03-26 12:43:01 +00:00
|
|
|
[[package]]
|
|
|
|
name = "pallet-authority-discovery"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2023-03-26 12:43:01 +00:00
|
|
|
dependencies = [
|
|
|
|
"frame-support",
|
|
|
|
"frame-system",
|
|
|
|
"pallet-session",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"sp-application-crypto",
|
|
|
|
"sp-authority-discovery",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-std 5.0.0",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pallet-authorship"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2023-03-26 12:43:01 +00:00
|
|
|
dependencies = [
|
|
|
|
"frame-support",
|
|
|
|
"frame-system",
|
|
|
|
"impl-trait-for-tuples",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-std 5.0.0",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pallet-babe"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2023-03-26 12:43:01 +00:00
|
|
|
dependencies = [
|
|
|
|
"frame-benchmarking",
|
|
|
|
"frame-support",
|
|
|
|
"frame-system",
|
|
|
|
"log",
|
|
|
|
"pallet-authorship",
|
|
|
|
"pallet-session",
|
|
|
|
"pallet-timestamp",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"sp-application-crypto",
|
|
|
|
"sp-consensus-babe",
|
2023-05-01 07:17:37 +00:00
|
|
|
"sp-core",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sp-io",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-session",
|
|
|
|
"sp-staking",
|
|
|
|
"sp-std 5.0.0",
|
|
|
|
]
|
|
|
|
|
2022-07-17 01:06:54 +00:00
|
|
|
[[package]]
|
2022-07-16 21:49:35 +00:00
|
|
|
name = "pallet-balances"
|
2022-07-17 01:06:54 +00:00
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-17 01:06:54 +00:00
|
|
|
dependencies = [
|
|
|
|
"frame-benchmarking",
|
|
|
|
"frame-support",
|
|
|
|
"frame-system",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"sp-runtime",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-17 01:06:54 +00:00
|
|
|
]
|
|
|
|
|
Initial Tendermint implementation (#145)
* Machine without timeouts
* Time code
* Move substrate/consensus/tendermint to substrate/tendermint
* Delete the old paper doc
* Refactor out external parts to generics
Also creates a dedicated file for the message log.
* Refactor <V, B> to type V, type B
* Successfully compiling
* Calculate timeouts
* Fix test
* Finish timeouts
* Misc cleanup
* Define a signature scheme trait
* Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde
doesn't natively support borsh, nor SCALE, and while there is a serde
SCALE crate, it's old. While it may be complete, it's not worth working
with.
While we could still grab bincode, and a variety of other formats, it
wasn't worth it to go custom and for Serai, we'll be using SCALE almost
everywhere anyways.
* Implement usage of the signature scheme
* Make the infinite test non-infinite
* Provide a dedicated signature in Precommit of just the block hash
Greatly simplifies verifying when syncing.
* Dedicated Commit object
Restores sig aggregation API.
* Tidy README
* Document tendermint
* Sign the ID directly instead of its SCALE encoding
For a hash, which is fixed-size, these should be the same yet this helps
move past the dependency on SCALE. It also, for any type where the two
values are different, smooths integration.
* Litany of bug fixes
Also attempts to make the code more readable while updating/correcting
documentation.
* Remove async recursion
Greatly increases safety as well by ensuring only one message is
processed at once.
* Correct timing issues
1) Commit didn't include the round, leaving the clock in question.
2) Machines started with a local time, instead of a proper start time.
3) Machines immediately started the next block instead of waiting for
the block time.
* Replace MultiSignature with sr25519::Signature
* Minor SignatureScheme API changes
* Map TM SignatureScheme to Substrate's sr25519
* Initial work on an import queue
* Properly use check_block
* Rename import to import_queue
* Implement tendermint_machine::Block for Substrate Blocks
Unfortunately, this immediately makes Tendermint machine capable of
deployment as crate since it uses a git reference. In the future, a
Cargo.toml patch section for serai/substrate should be investigated.
This is being done regardless as it's the quickest way forward and this
is for Serai.
* Dummy Weights
* Move documentation to the top of the file
* Move logic into TendermintImport itself
Multiple traits exist to verify/handle blocks. I'm unsure exactly when
each will be called in the pipeline, so the easiest solution is to have
every step run every check.
That would be extremely computationally expensive if we ran EVERY check,
yet we rely on Substrate for execution (and according checks), which are
limited to just the actual import function.
Since we're calling this code from many places, it makes sense for it to
be consolidated under TendermintImport.
* BlockImport, JustificationImport, Verifier, and import_queue function
* Update consensus/lib.rs from PoW to Tendermint
Not possible to be used as the previous consensus could. It will not
produce blocks nor does it currenly even instantiate a machine. This is
just he next step.
* Update Cargo.tomls for substrate packages
* Tendermint SelectChain
This is incompatible with Substrate's expectations, yet should be valid
for ours
* Move the node over to the new SelectChain
* Minor tweaks
* Update SelectChain documentation
* Remove substrate/node lib.rs
This shouldn't be used as a library AFAIK. While runtime should be, and
arguably should even be published, I have yet to see node in the same
way. Helps tighten API boundaries.
* Remove unused macro_use
* Replace panicking todos with stubs and // TODO
Enables progress.
* Reduce chain_spec and use more accurate naming
* Implement block proposal logic
* Modularize to get_proposal
* Trigger block importing
Doesn't wait for the response yet, which it needs to.
* Get the result of block importing
* Split import_queue into a series of files
* Provide a way to create the machine
The BasicQueue returned obscures the TendermintImport struct.
Accordingly, a Future scoped with access is returned upwards, which when
awaited will create the machine. This makes creating the machine
optional while maintaining scope boundaries.
Is sufficient to create a 1-node net which produces and finalizes
blocks.
* Don't import justifications multiple times
Also don't broadcast blocks which were solely proposed.
* Correct justication import pipeline
Removes JustificationImport as it should never be used.
* Announce blocks
By claiming File, they're not sent ovber the P2P network before they
have a justification, as desired. Unfortunately, they never were. This
works around that.
* Add an assert to verify proposed children aren't best
* Consolidate C and I generics into a TendermintClient trait alias
* Expand sanity checks
Substrate doesn't expect nor officially support children with less work
than their parents. It's a trick used here. Accordingly, ensure the
trick's validity.
* When resetting, use the end time of the round which was committed to
The machine reset to the end time of the current round. For a delayed
network connection, a machine may move ahead in rounds and only later
realize a prior round succeeded. Despite acknowledging that round's
success, it would maintain its delay when moving to the next block,
bricking it.
Done by tracking the end time for each round as they occur.
* Move Commit from including the round to including the round's end_time
The round was usable to build the current clock in an accumulated
fashion, relative to the previous round. The end time is the absolute
metric of it, which can be used to calculate the round number (with all
previous end times).
Substrate now builds off the best block, not genesis, using the end time
included in the justification to start its machine in a synchronized
state.
Knowing the end time of a round, or the round in which block was
committed to, is necessary for nodes to sync up with Tendermint.
Encoding it in the commit ensures it's long lasting and makes it readily
available, without the load of an entire transaction.
* Add a TODO on Tendermint
* Misc bug fixes
* More misc bug fixes
* Clean up lock acquisition
* Merge weights and signing scheme into validators, documenting needed changes
* Add pallet sessions to runtime, create pallet-tendermint
* Update node to use pallet sessions
* Update support URL
* Partial work on correcting pallet calls
* Redo Tendermint folder structure
* TendermintApi, compilation fixes
* Fix the stub round robin
At some point, the modulus was removed causing it to exceed the
validators list and stop proposing.
* Use the validators list from the session pallet
* Basic Gossip Validator
* Correct Substrate Tendermint start block
The Tendermint machine uses the passed in number as the block's being
worked on number. Substrate passed in the already finalized block's
number.
Also updates misc comments.
* Clean generics in Tendermint with a monolith with associated types
* Remove the Future triggering the machine for an async fn
Enables passing data in, such as the network.
* Move TendermintMachine from start_num, time to last_num, time
Provides an explicitly clear API clearer to program around.
Also adds additional time code to handle an edge case.
* Connect the Tendermint machine to a GossipEngine
* Connect broadcast
* Remove machine from TendermintImport
It's not used there at all.
* Merge Verifier into block_import.rs
These two files were largely the same, just hooking into sync structs
with almost identical imports. As this project shapes up, removing dead
weight is appreciated.
* Create a dedicated file for being a Tendermint authority
* Deleted comment code related to PoW
* Move serai_runtime specific code from tendermint/client to node
Renames serai-consensus to sc_tendermint
* Consolidate file structure in sc_tendermint
* Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in
general.
* Consolidate references to sr25519 in sc_tendermint
* Add documentation to public structs/functions in sc_tendermint
* Add another missing comment
* Make sign asynchronous
Some relation to https://github.com/serai-dex/serai/issues/95.
* Move sc_tendermint to async sign
* Implement proper checking of inherents
* Take in a Keystore and validator ID
* Remove unnecessary PhantomDatas
* Update node to latest sc_tendermint
* Configure node for a multi-node testnet
* Fix handling of the GossipEngine
* Use a rounded genesis to obtain sufficient synchrony within the Docker env
* Correct Serai d-f names in Docker
* Remove an attempt at caching I don't believe would ever hit
* Add an already in chain check to block import
While the inner should do this for us, we call verify_order on our end
*before* inner to ensure sequential import. Accordingly, we need to
provide our own check.
Removes errors of "non-sequential import" when trying to re-import an
existing block.
* Update the consensus documentation
It was incredibly out of date.
* Add a _ to the validator arg in slash
* Make the dev profile a local testnet profile
Restores a dev profile which only has one validator, locally running.
* Reduce Arcs in TendermintMachine, split Signer from SignatureScheme
* Update sc_tendermint per previous commit
* Restore cache
* Remove error case which shouldn't be an error
* Stop returning errors on already existing blocks entirely
* Correct Dave, Eve, and Ferdie to not run as validators
* Rename dev to devnet
--dev still works thanks to the |. Acheieves a personal preference of
mine with some historical meaning.
* Add message expiry to the Tendermint gossip
* Localize the LibP2P protocol to the blockchain
Follows convention by doing so. Theoretically enables running multiple
blockchains over a single LibP2P connection.
* Add a version to sp-runtime in tendermint-machine
* Add missing trait
* Bump Substrate dependency
Fixes #147.
* Implement Schnorr half-aggregation from https://eprint.iacr.org/2021/350.pdf
Relevant to https://github.com/serai-dex/serai/issues/99.
* cargo update (tendermint)
* Move from polling loops to a pure IO model for sc_tendermint's gossip
* Correct protocol name handling
* Use futures mpsc instead of tokio
* Timeout futures
* Move from a yielding loop to select in tendermint-machine
* Update Substrate to the new TendermintHandle
* Use futures pin instead of tokio
* Only recheck blocks with non-fatal inherent transaction errors
* Update to the latest substrate
* Separate the block processing time from the latency
* Add notes to the runtime
* Don't spam slash
Also adds a slash condition of failing to propose.
* Support running TendermintMachine when not a validator
This supports validators who leave the current set, without crashing
their nodes, along with nodes trying to become validators (who will now
seamlessly transition in).
* Properly define and pass around the block size
* Correct the Duration timing
The proposer will build it, send it, then process it (on the first
round). Accordingly, it's / 3, not / 2, as / 2 only accounted for the
latter events.
* Correct time-adjustment code on round skip
* Have the machine respond to advances made by an external sync loop
* Clean up time code in tendermint-machine
* BlockData and RoundData structs
* Rename Round to RoundNumber
* Move BlockData to a new file
* Move Round to an Option due to the pseudo-uninitialized state we create
Before the addition of RoundData, we always created the round, and on
.round(0), simply created it again. With RoundData, and the changes to
the time code, we used round 0, time 0, the latter being incorrect yet
not an issue due to lack of misuse.
Now, if we do misuse it, it'll panic.
* Clear the Queue instead of draining and filtering
There shouldn't ever be a message which passes the filter under the
current design.
* BlockData::new
* Move more code into block.rs
Introduces type-aliases to obtain Data/Message/SignedMessage solely from
a Network object.
Fixes a bug regarding stepping when you're not an active validator.
* Have verify_precommit_signature return if it verified the signature
Also fixes a bug where invalid precommit signatures were left standing
and therefore contributing to commits.
* Remove the precommit signature hash
It cached signatures per-block. Precommit signatures are bound to each
round. This would lead to forming invalid commits when a commit should
be formed. Under debug, the machine would catch that and panic. On
release, it'd have everyone who wasn't a validator fail to continue
syncing.
* Slight doc changes
Also flattens the message handling function by replacing an if
containing all following code in the function with an early return for
the else case.
* Always produce notifications for finalized blocks via origin overrides
* Correct weird formatting
* Update to the latest tendermint-machine
* Manually step the Tendermint machine when we synced a block over the network
* Ignore finality notifications for old blocks
* Remove a TODO resolved in 8c51bc011d03c8d54ded05011e7f4d1a01e9f873
* Add a TODO comment to slash
Enables searching for the case-sensitive phrase and finding it.
* cargo fmt
* Use a tmp DB for Serai in Docker
* Remove panic on slash
As we move towards protonet, this can happen (if a node goes offline),
yet it happening brings down the entire net right now.
* Add log::error on slash
* created shared volume between containers
* Complete the sh scripts
* Pass in the genesis time to Substrate
* Correct block announcements
They were announced, yet not marked best.
* Correct pupulate_end_time
It was used as inclusive yet didn't work inclusively.
* Correct gossip channel jumping when a block is synced via Substrate
* Use a looser check in import_future
This triggered so it needs to be accordingly relaxed.
* Correct race conditions between add_block and step
Also corrects a <= to <.
* Update cargo deny
* rename genesis-service to genesis
* Update Cargo.lock
* Correct runtime Cargo.toml whitespace
* Correct typo
* Document recheck
* Misc lints
* Fix prev commit
* Resolve low-hanging review comments
* Mark genesis/entry-dev.sh as executable
* Prevent a commit from including the same signature multiple times
Yanks tendermint-machine 0.1.0 accordingly.
* Update to latest nightly clippy
* Improve documentation
* Use clearer variable names
* Add log statements
* Pair more log statements
* Clean TendermintAuthority::authority as possible
Merges it into new. It has way too many arguments, yet there's no clear path at
consolidation there, unfortunately.
Additionally provides better scoping within itself.
* Fix #158
Doesn't use lock_import_and_run for reasons commented (lack of async).
* Rename guard to lock
* Have the devnet use the current time as the genesis
Possible since it's only a single node, not requiring synchronization.
* Fix gossiping
I really don't know what side effect this avoids and I can't say I care at this
point.
* Misc lints
Co-authored-by: vrx00 <vrx00@proton.me>
Co-authored-by: TheArchitect108 <TheArchitect108@protonmail.com>
2022-12-03 23:38:02 +00:00
|
|
|
[[package]]
|
2023-03-26 12:43:01 +00:00
|
|
|
name = "pallet-grandpa"
|
Initial Tendermint implementation (#145)
* Machine without timeouts
* Time code
* Move substrate/consensus/tendermint to substrate/tendermint
* Delete the old paper doc
* Refactor out external parts to generics
Also creates a dedicated file for the message log.
* Refactor <V, B> to type V, type B
* Successfully compiling
* Calculate timeouts
* Fix test
* Finish timeouts
* Misc cleanup
* Define a signature scheme trait
* Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde
doesn't natively support borsh, nor SCALE, and while there is a serde
SCALE crate, it's old. While it may be complete, it's not worth working
with.
While we could still grab bincode, and a variety of other formats, it
wasn't worth it to go custom and for Serai, we'll be using SCALE almost
everywhere anyways.
* Implement usage of the signature scheme
* Make the infinite test non-infinite
* Provide a dedicated signature in Precommit of just the block hash
Greatly simplifies verifying when syncing.
* Dedicated Commit object
Restores sig aggregation API.
* Tidy README
* Document tendermint
* Sign the ID directly instead of its SCALE encoding
For a hash, which is fixed-size, these should be the same yet this helps
move past the dependency on SCALE. It also, for any type where the two
values are different, smooths integration.
* Litany of bug fixes
Also attempts to make the code more readable while updating/correcting
documentation.
* Remove async recursion
Greatly increases safety as well by ensuring only one message is
processed at once.
* Correct timing issues
1) Commit didn't include the round, leaving the clock in question.
2) Machines started with a local time, instead of a proper start time.
3) Machines immediately started the next block instead of waiting for
the block time.
* Replace MultiSignature with sr25519::Signature
* Minor SignatureScheme API changes
* Map TM SignatureScheme to Substrate's sr25519
* Initial work on an import queue
* Properly use check_block
* Rename import to import_queue
* Implement tendermint_machine::Block for Substrate Blocks
Unfortunately, this immediately makes Tendermint machine capable of
deployment as crate since it uses a git reference. In the future, a
Cargo.toml patch section for serai/substrate should be investigated.
This is being done regardless as it's the quickest way forward and this
is for Serai.
* Dummy Weights
* Move documentation to the top of the file
* Move logic into TendermintImport itself
Multiple traits exist to verify/handle blocks. I'm unsure exactly when
each will be called in the pipeline, so the easiest solution is to have
every step run every check.
That would be extremely computationally expensive if we ran EVERY check,
yet we rely on Substrate for execution (and according checks), which are
limited to just the actual import function.
Since we're calling this code from many places, it makes sense for it to
be consolidated under TendermintImport.
* BlockImport, JustificationImport, Verifier, and import_queue function
* Update consensus/lib.rs from PoW to Tendermint
Not possible to be used as the previous consensus could. It will not
produce blocks nor does it currenly even instantiate a machine. This is
just he next step.
* Update Cargo.tomls for substrate packages
* Tendermint SelectChain
This is incompatible with Substrate's expectations, yet should be valid
for ours
* Move the node over to the new SelectChain
* Minor tweaks
* Update SelectChain documentation
* Remove substrate/node lib.rs
This shouldn't be used as a library AFAIK. While runtime should be, and
arguably should even be published, I have yet to see node in the same
way. Helps tighten API boundaries.
* Remove unused macro_use
* Replace panicking todos with stubs and // TODO
Enables progress.
* Reduce chain_spec and use more accurate naming
* Implement block proposal logic
* Modularize to get_proposal
* Trigger block importing
Doesn't wait for the response yet, which it needs to.
* Get the result of block importing
* Split import_queue into a series of files
* Provide a way to create the machine
The BasicQueue returned obscures the TendermintImport struct.
Accordingly, a Future scoped with access is returned upwards, which when
awaited will create the machine. This makes creating the machine
optional while maintaining scope boundaries.
Is sufficient to create a 1-node net which produces and finalizes
blocks.
* Don't import justifications multiple times
Also don't broadcast blocks which were solely proposed.
* Correct justication import pipeline
Removes JustificationImport as it should never be used.
* Announce blocks
By claiming File, they're not sent ovber the P2P network before they
have a justification, as desired. Unfortunately, they never were. This
works around that.
* Add an assert to verify proposed children aren't best
* Consolidate C and I generics into a TendermintClient trait alias
* Expand sanity checks
Substrate doesn't expect nor officially support children with less work
than their parents. It's a trick used here. Accordingly, ensure the
trick's validity.
* When resetting, use the end time of the round which was committed to
The machine reset to the end time of the current round. For a delayed
network connection, a machine may move ahead in rounds and only later
realize a prior round succeeded. Despite acknowledging that round's
success, it would maintain its delay when moving to the next block,
bricking it.
Done by tracking the end time for each round as they occur.
* Move Commit from including the round to including the round's end_time
The round was usable to build the current clock in an accumulated
fashion, relative to the previous round. The end time is the absolute
metric of it, which can be used to calculate the round number (with all
previous end times).
Substrate now builds off the best block, not genesis, using the end time
included in the justification to start its machine in a synchronized
state.
Knowing the end time of a round, or the round in which block was
committed to, is necessary for nodes to sync up with Tendermint.
Encoding it in the commit ensures it's long lasting and makes it readily
available, without the load of an entire transaction.
* Add a TODO on Tendermint
* Misc bug fixes
* More misc bug fixes
* Clean up lock acquisition
* Merge weights and signing scheme into validators, documenting needed changes
* Add pallet sessions to runtime, create pallet-tendermint
* Update node to use pallet sessions
* Update support URL
* Partial work on correcting pallet calls
* Redo Tendermint folder structure
* TendermintApi, compilation fixes
* Fix the stub round robin
At some point, the modulus was removed causing it to exceed the
validators list and stop proposing.
* Use the validators list from the session pallet
* Basic Gossip Validator
* Correct Substrate Tendermint start block
The Tendermint machine uses the passed in number as the block's being
worked on number. Substrate passed in the already finalized block's
number.
Also updates misc comments.
* Clean generics in Tendermint with a monolith with associated types
* Remove the Future triggering the machine for an async fn
Enables passing data in, such as the network.
* Move TendermintMachine from start_num, time to last_num, time
Provides an explicitly clear API clearer to program around.
Also adds additional time code to handle an edge case.
* Connect the Tendermint machine to a GossipEngine
* Connect broadcast
* Remove machine from TendermintImport
It's not used there at all.
* Merge Verifier into block_import.rs
These two files were largely the same, just hooking into sync structs
with almost identical imports. As this project shapes up, removing dead
weight is appreciated.
* Create a dedicated file for being a Tendermint authority
* Deleted comment code related to PoW
* Move serai_runtime specific code from tendermint/client to node
Renames serai-consensus to sc_tendermint
* Consolidate file structure in sc_tendermint
* Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in
general.
* Consolidate references to sr25519 in sc_tendermint
* Add documentation to public structs/functions in sc_tendermint
* Add another missing comment
* Make sign asynchronous
Some relation to https://github.com/serai-dex/serai/issues/95.
* Move sc_tendermint to async sign
* Implement proper checking of inherents
* Take in a Keystore and validator ID
* Remove unnecessary PhantomDatas
* Update node to latest sc_tendermint
* Configure node for a multi-node testnet
* Fix handling of the GossipEngine
* Use a rounded genesis to obtain sufficient synchrony within the Docker env
* Correct Serai d-f names in Docker
* Remove an attempt at caching I don't believe would ever hit
* Add an already in chain check to block import
While the inner should do this for us, we call verify_order on our end
*before* inner to ensure sequential import. Accordingly, we need to
provide our own check.
Removes errors of "non-sequential import" when trying to re-import an
existing block.
* Update the consensus documentation
It was incredibly out of date.
* Add a _ to the validator arg in slash
* Make the dev profile a local testnet profile
Restores a dev profile which only has one validator, locally running.
* Reduce Arcs in TendermintMachine, split Signer from SignatureScheme
* Update sc_tendermint per previous commit
* Restore cache
* Remove error case which shouldn't be an error
* Stop returning errors on already existing blocks entirely
* Correct Dave, Eve, and Ferdie to not run as validators
* Rename dev to devnet
--dev still works thanks to the |. Acheieves a personal preference of
mine with some historical meaning.
* Add message expiry to the Tendermint gossip
* Localize the LibP2P protocol to the blockchain
Follows convention by doing so. Theoretically enables running multiple
blockchains over a single LibP2P connection.
* Add a version to sp-runtime in tendermint-machine
* Add missing trait
* Bump Substrate dependency
Fixes #147.
* Implement Schnorr half-aggregation from https://eprint.iacr.org/2021/350.pdf
Relevant to https://github.com/serai-dex/serai/issues/99.
* cargo update (tendermint)
* Move from polling loops to a pure IO model for sc_tendermint's gossip
* Correct protocol name handling
* Use futures mpsc instead of tokio
* Timeout futures
* Move from a yielding loop to select in tendermint-machine
* Update Substrate to the new TendermintHandle
* Use futures pin instead of tokio
* Only recheck blocks with non-fatal inherent transaction errors
* Update to the latest substrate
* Separate the block processing time from the latency
* Add notes to the runtime
* Don't spam slash
Also adds a slash condition of failing to propose.
* Support running TendermintMachine when not a validator
This supports validators who leave the current set, without crashing
their nodes, along with nodes trying to become validators (who will now
seamlessly transition in).
* Properly define and pass around the block size
* Correct the Duration timing
The proposer will build it, send it, then process it (on the first
round). Accordingly, it's / 3, not / 2, as / 2 only accounted for the
latter events.
* Correct time-adjustment code on round skip
* Have the machine respond to advances made by an external sync loop
* Clean up time code in tendermint-machine
* BlockData and RoundData structs
* Rename Round to RoundNumber
* Move BlockData to a new file
* Move Round to an Option due to the pseudo-uninitialized state we create
Before the addition of RoundData, we always created the round, and on
.round(0), simply created it again. With RoundData, and the changes to
the time code, we used round 0, time 0, the latter being incorrect yet
not an issue due to lack of misuse.
Now, if we do misuse it, it'll panic.
* Clear the Queue instead of draining and filtering
There shouldn't ever be a message which passes the filter under the
current design.
* BlockData::new
* Move more code into block.rs
Introduces type-aliases to obtain Data/Message/SignedMessage solely from
a Network object.
Fixes a bug regarding stepping when you're not an active validator.
* Have verify_precommit_signature return if it verified the signature
Also fixes a bug where invalid precommit signatures were left standing
and therefore contributing to commits.
* Remove the precommit signature hash
It cached signatures per-block. Precommit signatures are bound to each
round. This would lead to forming invalid commits when a commit should
be formed. Under debug, the machine would catch that and panic. On
release, it'd have everyone who wasn't a validator fail to continue
syncing.
* Slight doc changes
Also flattens the message handling function by replacing an if
containing all following code in the function with an early return for
the else case.
* Always produce notifications for finalized blocks via origin overrides
* Correct weird formatting
* Update to the latest tendermint-machine
* Manually step the Tendermint machine when we synced a block over the network
* Ignore finality notifications for old blocks
* Remove a TODO resolved in 8c51bc011d03c8d54ded05011e7f4d1a01e9f873
* Add a TODO comment to slash
Enables searching for the case-sensitive phrase and finding it.
* cargo fmt
* Use a tmp DB for Serai in Docker
* Remove panic on slash
As we move towards protonet, this can happen (if a node goes offline),
yet it happening brings down the entire net right now.
* Add log::error on slash
* created shared volume between containers
* Complete the sh scripts
* Pass in the genesis time to Substrate
* Correct block announcements
They were announced, yet not marked best.
* Correct pupulate_end_time
It was used as inclusive yet didn't work inclusively.
* Correct gossip channel jumping when a block is synced via Substrate
* Use a looser check in import_future
This triggered so it needs to be accordingly relaxed.
* Correct race conditions between add_block and step
Also corrects a <= to <.
* Update cargo deny
* rename genesis-service to genesis
* Update Cargo.lock
* Correct runtime Cargo.toml whitespace
* Correct typo
* Document recheck
* Misc lints
* Fix prev commit
* Resolve low-hanging review comments
* Mark genesis/entry-dev.sh as executable
* Prevent a commit from including the same signature multiple times
Yanks tendermint-machine 0.1.0 accordingly.
* Update to latest nightly clippy
* Improve documentation
* Use clearer variable names
* Add log statements
* Pair more log statements
* Clean TendermintAuthority::authority as possible
Merges it into new. It has way too many arguments, yet there's no clear path at
consolidation there, unfortunately.
Additionally provides better scoping within itself.
* Fix #158
Doesn't use lock_import_and_run for reasons commented (lack of async).
* Rename guard to lock
* Have the devnet use the current time as the genesis
Possible since it's only a single node, not requiring synchronization.
* Fix gossiping
I really don't know what side effect this avoids and I can't say I care at this
point.
* Misc lints
Co-authored-by: vrx00 <vrx00@proton.me>
Co-authored-by: TheArchitect108 <TheArchitect108@protonmail.com>
2022-12-03 23:38:02 +00:00
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
Initial Tendermint implementation (#145)
* Machine without timeouts
* Time code
* Move substrate/consensus/tendermint to substrate/tendermint
* Delete the old paper doc
* Refactor out external parts to generics
Also creates a dedicated file for the message log.
* Refactor <V, B> to type V, type B
* Successfully compiling
* Calculate timeouts
* Fix test
* Finish timeouts
* Misc cleanup
* Define a signature scheme trait
* Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde
doesn't natively support borsh, nor SCALE, and while there is a serde
SCALE crate, it's old. While it may be complete, it's not worth working
with.
While we could still grab bincode, and a variety of other formats, it
wasn't worth it to go custom and for Serai, we'll be using SCALE almost
everywhere anyways.
* Implement usage of the signature scheme
* Make the infinite test non-infinite
* Provide a dedicated signature in Precommit of just the block hash
Greatly simplifies verifying when syncing.
* Dedicated Commit object
Restores sig aggregation API.
* Tidy README
* Document tendermint
* Sign the ID directly instead of its SCALE encoding
For a hash, which is fixed-size, these should be the same yet this helps
move past the dependency on SCALE. It also, for any type where the two
values are different, smooths integration.
* Litany of bug fixes
Also attempts to make the code more readable while updating/correcting
documentation.
* Remove async recursion
Greatly increases safety as well by ensuring only one message is
processed at once.
* Correct timing issues
1) Commit didn't include the round, leaving the clock in question.
2) Machines started with a local time, instead of a proper start time.
3) Machines immediately started the next block instead of waiting for
the block time.
* Replace MultiSignature with sr25519::Signature
* Minor SignatureScheme API changes
* Map TM SignatureScheme to Substrate's sr25519
* Initial work on an import queue
* Properly use check_block
* Rename import to import_queue
* Implement tendermint_machine::Block for Substrate Blocks
Unfortunately, this immediately makes Tendermint machine capable of
deployment as crate since it uses a git reference. In the future, a
Cargo.toml patch section for serai/substrate should be investigated.
This is being done regardless as it's the quickest way forward and this
is for Serai.
* Dummy Weights
* Move documentation to the top of the file
* Move logic into TendermintImport itself
Multiple traits exist to verify/handle blocks. I'm unsure exactly when
each will be called in the pipeline, so the easiest solution is to have
every step run every check.
That would be extremely computationally expensive if we ran EVERY check,
yet we rely on Substrate for execution (and according checks), which are
limited to just the actual import function.
Since we're calling this code from many places, it makes sense for it to
be consolidated under TendermintImport.
* BlockImport, JustificationImport, Verifier, and import_queue function
* Update consensus/lib.rs from PoW to Tendermint
Not possible to be used as the previous consensus could. It will not
produce blocks nor does it currenly even instantiate a machine. This is
just he next step.
* Update Cargo.tomls for substrate packages
* Tendermint SelectChain
This is incompatible with Substrate's expectations, yet should be valid
for ours
* Move the node over to the new SelectChain
* Minor tweaks
* Update SelectChain documentation
* Remove substrate/node lib.rs
This shouldn't be used as a library AFAIK. While runtime should be, and
arguably should even be published, I have yet to see node in the same
way. Helps tighten API boundaries.
* Remove unused macro_use
* Replace panicking todos with stubs and // TODO
Enables progress.
* Reduce chain_spec and use more accurate naming
* Implement block proposal logic
* Modularize to get_proposal
* Trigger block importing
Doesn't wait for the response yet, which it needs to.
* Get the result of block importing
* Split import_queue into a series of files
* Provide a way to create the machine
The BasicQueue returned obscures the TendermintImport struct.
Accordingly, a Future scoped with access is returned upwards, which when
awaited will create the machine. This makes creating the machine
optional while maintaining scope boundaries.
Is sufficient to create a 1-node net which produces and finalizes
blocks.
* Don't import justifications multiple times
Also don't broadcast blocks which were solely proposed.
* Correct justication import pipeline
Removes JustificationImport as it should never be used.
* Announce blocks
By claiming File, they're not sent ovber the P2P network before they
have a justification, as desired. Unfortunately, they never were. This
works around that.
* Add an assert to verify proposed children aren't best
* Consolidate C and I generics into a TendermintClient trait alias
* Expand sanity checks
Substrate doesn't expect nor officially support children with less work
than their parents. It's a trick used here. Accordingly, ensure the
trick's validity.
* When resetting, use the end time of the round which was committed to
The machine reset to the end time of the current round. For a delayed
network connection, a machine may move ahead in rounds and only later
realize a prior round succeeded. Despite acknowledging that round's
success, it would maintain its delay when moving to the next block,
bricking it.
Done by tracking the end time for each round as they occur.
* Move Commit from including the round to including the round's end_time
The round was usable to build the current clock in an accumulated
fashion, relative to the previous round. The end time is the absolute
metric of it, which can be used to calculate the round number (with all
previous end times).
Substrate now builds off the best block, not genesis, using the end time
included in the justification to start its machine in a synchronized
state.
Knowing the end time of a round, or the round in which block was
committed to, is necessary for nodes to sync up with Tendermint.
Encoding it in the commit ensures it's long lasting and makes it readily
available, without the load of an entire transaction.
* Add a TODO on Tendermint
* Misc bug fixes
* More misc bug fixes
* Clean up lock acquisition
* Merge weights and signing scheme into validators, documenting needed changes
* Add pallet sessions to runtime, create pallet-tendermint
* Update node to use pallet sessions
* Update support URL
* Partial work on correcting pallet calls
* Redo Tendermint folder structure
* TendermintApi, compilation fixes
* Fix the stub round robin
At some point, the modulus was removed causing it to exceed the
validators list and stop proposing.
* Use the validators list from the session pallet
* Basic Gossip Validator
* Correct Substrate Tendermint start block
The Tendermint machine uses the passed in number as the block's being
worked on number. Substrate passed in the already finalized block's
number.
Also updates misc comments.
* Clean generics in Tendermint with a monolith with associated types
* Remove the Future triggering the machine for an async fn
Enables passing data in, such as the network.
* Move TendermintMachine from start_num, time to last_num, time
Provides an explicitly clear API clearer to program around.
Also adds additional time code to handle an edge case.
* Connect the Tendermint machine to a GossipEngine
* Connect broadcast
* Remove machine from TendermintImport
It's not used there at all.
* Merge Verifier into block_import.rs
These two files were largely the same, just hooking into sync structs
with almost identical imports. As this project shapes up, removing dead
weight is appreciated.
* Create a dedicated file for being a Tendermint authority
* Deleted comment code related to PoW
* Move serai_runtime specific code from tendermint/client to node
Renames serai-consensus to sc_tendermint
* Consolidate file structure in sc_tendermint
* Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in
general.
* Consolidate references to sr25519 in sc_tendermint
* Add documentation to public structs/functions in sc_tendermint
* Add another missing comment
* Make sign asynchronous
Some relation to https://github.com/serai-dex/serai/issues/95.
* Move sc_tendermint to async sign
* Implement proper checking of inherents
* Take in a Keystore and validator ID
* Remove unnecessary PhantomDatas
* Update node to latest sc_tendermint
* Configure node for a multi-node testnet
* Fix handling of the GossipEngine
* Use a rounded genesis to obtain sufficient synchrony within the Docker env
* Correct Serai d-f names in Docker
* Remove an attempt at caching I don't believe would ever hit
* Add an already in chain check to block import
While the inner should do this for us, we call verify_order on our end
*before* inner to ensure sequential import. Accordingly, we need to
provide our own check.
Removes errors of "non-sequential import" when trying to re-import an
existing block.
* Update the consensus documentation
It was incredibly out of date.
* Add a _ to the validator arg in slash
* Make the dev profile a local testnet profile
Restores a dev profile which only has one validator, locally running.
* Reduce Arcs in TendermintMachine, split Signer from SignatureScheme
* Update sc_tendermint per previous commit
* Restore cache
* Remove error case which shouldn't be an error
* Stop returning errors on already existing blocks entirely
* Correct Dave, Eve, and Ferdie to not run as validators
* Rename dev to devnet
--dev still works thanks to the |. Acheieves a personal preference of
mine with some historical meaning.
* Add message expiry to the Tendermint gossip
* Localize the LibP2P protocol to the blockchain
Follows convention by doing so. Theoretically enables running multiple
blockchains over a single LibP2P connection.
* Add a version to sp-runtime in tendermint-machine
* Add missing trait
* Bump Substrate dependency
Fixes #147.
* Implement Schnorr half-aggregation from https://eprint.iacr.org/2021/350.pdf
Relevant to https://github.com/serai-dex/serai/issues/99.
* cargo update (tendermint)
* Move from polling loops to a pure IO model for sc_tendermint's gossip
* Correct protocol name handling
* Use futures mpsc instead of tokio
* Timeout futures
* Move from a yielding loop to select in tendermint-machine
* Update Substrate to the new TendermintHandle
* Use futures pin instead of tokio
* Only recheck blocks with non-fatal inherent transaction errors
* Update to the latest substrate
* Separate the block processing time from the latency
* Add notes to the runtime
* Don't spam slash
Also adds a slash condition of failing to propose.
* Support running TendermintMachine when not a validator
This supports validators who leave the current set, without crashing
their nodes, along with nodes trying to become validators (who will now
seamlessly transition in).
* Properly define and pass around the block size
* Correct the Duration timing
The proposer will build it, send it, then process it (on the first
round). Accordingly, it's / 3, not / 2, as / 2 only accounted for the
latter events.
* Correct time-adjustment code on round skip
* Have the machine respond to advances made by an external sync loop
* Clean up time code in tendermint-machine
* BlockData and RoundData structs
* Rename Round to RoundNumber
* Move BlockData to a new file
* Move Round to an Option due to the pseudo-uninitialized state we create
Before the addition of RoundData, we always created the round, and on
.round(0), simply created it again. With RoundData, and the changes to
the time code, we used round 0, time 0, the latter being incorrect yet
not an issue due to lack of misuse.
Now, if we do misuse it, it'll panic.
* Clear the Queue instead of draining and filtering
There shouldn't ever be a message which passes the filter under the
current design.
* BlockData::new
* Move more code into block.rs
Introduces type-aliases to obtain Data/Message/SignedMessage solely from
a Network object.
Fixes a bug regarding stepping when you're not an active validator.
* Have verify_precommit_signature return if it verified the signature
Also fixes a bug where invalid precommit signatures were left standing
and therefore contributing to commits.
* Remove the precommit signature hash
It cached signatures per-block. Precommit signatures are bound to each
round. This would lead to forming invalid commits when a commit should
be formed. Under debug, the machine would catch that and panic. On
release, it'd have everyone who wasn't a validator fail to continue
syncing.
* Slight doc changes
Also flattens the message handling function by replacing an if
containing all following code in the function with an early return for
the else case.
* Always produce notifications for finalized blocks via origin overrides
* Correct weird formatting
* Update to the latest tendermint-machine
* Manually step the Tendermint machine when we synced a block over the network
* Ignore finality notifications for old blocks
* Remove a TODO resolved in 8c51bc011d03c8d54ded05011e7f4d1a01e9f873
* Add a TODO comment to slash
Enables searching for the case-sensitive phrase and finding it.
* cargo fmt
* Use a tmp DB for Serai in Docker
* Remove panic on slash
As we move towards protonet, this can happen (if a node goes offline),
yet it happening brings down the entire net right now.
* Add log::error on slash
* created shared volume between containers
* Complete the sh scripts
* Pass in the genesis time to Substrate
* Correct block announcements
They were announced, yet not marked best.
* Correct pupulate_end_time
It was used as inclusive yet didn't work inclusively.
* Correct gossip channel jumping when a block is synced via Substrate
* Use a looser check in import_future
This triggered so it needs to be accordingly relaxed.
* Correct race conditions between add_block and step
Also corrects a <= to <.
* Update cargo deny
* rename genesis-service to genesis
* Update Cargo.lock
* Correct runtime Cargo.toml whitespace
* Correct typo
* Document recheck
* Misc lints
* Fix prev commit
* Resolve low-hanging review comments
* Mark genesis/entry-dev.sh as executable
* Prevent a commit from including the same signature multiple times
Yanks tendermint-machine 0.1.0 accordingly.
* Update to latest nightly clippy
* Improve documentation
* Use clearer variable names
* Add log statements
* Pair more log statements
* Clean TendermintAuthority::authority as possible
Merges it into new. It has way too many arguments, yet there's no clear path at
consolidation there, unfortunately.
Additionally provides better scoping within itself.
* Fix #158
Doesn't use lock_import_and_run for reasons commented (lack of async).
* Rename guard to lock
* Have the devnet use the current time as the genesis
Possible since it's only a single node, not requiring synchronization.
* Fix gossiping
I really don't know what side effect this avoids and I can't say I care at this
point.
* Misc lints
Co-authored-by: vrx00 <vrx00@proton.me>
Co-authored-by: TheArchitect108 <TheArchitect108@protonmail.com>
2022-12-03 23:38:02 +00:00
|
|
|
dependencies = [
|
2023-03-26 12:43:01 +00:00
|
|
|
"frame-benchmarking",
|
Initial Tendermint implementation (#145)
* Machine without timeouts
* Time code
* Move substrate/consensus/tendermint to substrate/tendermint
* Delete the old paper doc
* Refactor out external parts to generics
Also creates a dedicated file for the message log.
* Refactor <V, B> to type V, type B
* Successfully compiling
* Calculate timeouts
* Fix test
* Finish timeouts
* Misc cleanup
* Define a signature scheme trait
* Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde
doesn't natively support borsh, nor SCALE, and while there is a serde
SCALE crate, it's old. While it may be complete, it's not worth working
with.
While we could still grab bincode, and a variety of other formats, it
wasn't worth it to go custom and for Serai, we'll be using SCALE almost
everywhere anyways.
* Implement usage of the signature scheme
* Make the infinite test non-infinite
* Provide a dedicated signature in Precommit of just the block hash
Greatly simplifies verifying when syncing.
* Dedicated Commit object
Restores sig aggregation API.
* Tidy README
* Document tendermint
* Sign the ID directly instead of its SCALE encoding
For a hash, which is fixed-size, these should be the same yet this helps
move past the dependency on SCALE. It also, for any type where the two
values are different, smooths integration.
* Litany of bug fixes
Also attempts to make the code more readable while updating/correcting
documentation.
* Remove async recursion
Greatly increases safety as well by ensuring only one message is
processed at once.
* Correct timing issues
1) Commit didn't include the round, leaving the clock in question.
2) Machines started with a local time, instead of a proper start time.
3) Machines immediately started the next block instead of waiting for
the block time.
* Replace MultiSignature with sr25519::Signature
* Minor SignatureScheme API changes
* Map TM SignatureScheme to Substrate's sr25519
* Initial work on an import queue
* Properly use check_block
* Rename import to import_queue
* Implement tendermint_machine::Block for Substrate Blocks
Unfortunately, this immediately makes Tendermint machine capable of
deployment as crate since it uses a git reference. In the future, a
Cargo.toml patch section for serai/substrate should be investigated.
This is being done regardless as it's the quickest way forward and this
is for Serai.
* Dummy Weights
* Move documentation to the top of the file
* Move logic into TendermintImport itself
Multiple traits exist to verify/handle blocks. I'm unsure exactly when
each will be called in the pipeline, so the easiest solution is to have
every step run every check.
That would be extremely computationally expensive if we ran EVERY check,
yet we rely on Substrate for execution (and according checks), which are
limited to just the actual import function.
Since we're calling this code from many places, it makes sense for it to
be consolidated under TendermintImport.
* BlockImport, JustificationImport, Verifier, and import_queue function
* Update consensus/lib.rs from PoW to Tendermint
Not possible to be used as the previous consensus could. It will not
produce blocks nor does it currenly even instantiate a machine. This is
just he next step.
* Update Cargo.tomls for substrate packages
* Tendermint SelectChain
This is incompatible with Substrate's expectations, yet should be valid
for ours
* Move the node over to the new SelectChain
* Minor tweaks
* Update SelectChain documentation
* Remove substrate/node lib.rs
This shouldn't be used as a library AFAIK. While runtime should be, and
arguably should even be published, I have yet to see node in the same
way. Helps tighten API boundaries.
* Remove unused macro_use
* Replace panicking todos with stubs and // TODO
Enables progress.
* Reduce chain_spec and use more accurate naming
* Implement block proposal logic
* Modularize to get_proposal
* Trigger block importing
Doesn't wait for the response yet, which it needs to.
* Get the result of block importing
* Split import_queue into a series of files
* Provide a way to create the machine
The BasicQueue returned obscures the TendermintImport struct.
Accordingly, a Future scoped with access is returned upwards, which when
awaited will create the machine. This makes creating the machine
optional while maintaining scope boundaries.
Is sufficient to create a 1-node net which produces and finalizes
blocks.
* Don't import justifications multiple times
Also don't broadcast blocks which were solely proposed.
* Correct justication import pipeline
Removes JustificationImport as it should never be used.
* Announce blocks
By claiming File, they're not sent ovber the P2P network before they
have a justification, as desired. Unfortunately, they never were. This
works around that.
* Add an assert to verify proposed children aren't best
* Consolidate C and I generics into a TendermintClient trait alias
* Expand sanity checks
Substrate doesn't expect nor officially support children with less work
than their parents. It's a trick used here. Accordingly, ensure the
trick's validity.
* When resetting, use the end time of the round which was committed to
The machine reset to the end time of the current round. For a delayed
network connection, a machine may move ahead in rounds and only later
realize a prior round succeeded. Despite acknowledging that round's
success, it would maintain its delay when moving to the next block,
bricking it.
Done by tracking the end time for each round as they occur.
* Move Commit from including the round to including the round's end_time
The round was usable to build the current clock in an accumulated
fashion, relative to the previous round. The end time is the absolute
metric of it, which can be used to calculate the round number (with all
previous end times).
Substrate now builds off the best block, not genesis, using the end time
included in the justification to start its machine in a synchronized
state.
Knowing the end time of a round, or the round in which block was
committed to, is necessary for nodes to sync up with Tendermint.
Encoding it in the commit ensures it's long lasting and makes it readily
available, without the load of an entire transaction.
* Add a TODO on Tendermint
* Misc bug fixes
* More misc bug fixes
* Clean up lock acquisition
* Merge weights and signing scheme into validators, documenting needed changes
* Add pallet sessions to runtime, create pallet-tendermint
* Update node to use pallet sessions
* Update support URL
* Partial work on correcting pallet calls
* Redo Tendermint folder structure
* TendermintApi, compilation fixes
* Fix the stub round robin
At some point, the modulus was removed causing it to exceed the
validators list and stop proposing.
* Use the validators list from the session pallet
* Basic Gossip Validator
* Correct Substrate Tendermint start block
The Tendermint machine uses the passed in number as the block's being
worked on number. Substrate passed in the already finalized block's
number.
Also updates misc comments.
* Clean generics in Tendermint with a monolith with associated types
* Remove the Future triggering the machine for an async fn
Enables passing data in, such as the network.
* Move TendermintMachine from start_num, time to last_num, time
Provides an explicitly clear API clearer to program around.
Also adds additional time code to handle an edge case.
* Connect the Tendermint machine to a GossipEngine
* Connect broadcast
* Remove machine from TendermintImport
It's not used there at all.
* Merge Verifier into block_import.rs
These two files were largely the same, just hooking into sync structs
with almost identical imports. As this project shapes up, removing dead
weight is appreciated.
* Create a dedicated file for being a Tendermint authority
* Deleted comment code related to PoW
* Move serai_runtime specific code from tendermint/client to node
Renames serai-consensus to sc_tendermint
* Consolidate file structure in sc_tendermint
* Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in
general.
* Consolidate references to sr25519 in sc_tendermint
* Add documentation to public structs/functions in sc_tendermint
* Add another missing comment
* Make sign asynchronous
Some relation to https://github.com/serai-dex/serai/issues/95.
* Move sc_tendermint to async sign
* Implement proper checking of inherents
* Take in a Keystore and validator ID
* Remove unnecessary PhantomDatas
* Update node to latest sc_tendermint
* Configure node for a multi-node testnet
* Fix handling of the GossipEngine
* Use a rounded genesis to obtain sufficient synchrony within the Docker env
* Correct Serai d-f names in Docker
* Remove an attempt at caching I don't believe would ever hit
* Add an already in chain check to block import
While the inner should do this for us, we call verify_order on our end
*before* inner to ensure sequential import. Accordingly, we need to
provide our own check.
Removes errors of "non-sequential import" when trying to re-import an
existing block.
* Update the consensus documentation
It was incredibly out of date.
* Add a _ to the validator arg in slash
* Make the dev profile a local testnet profile
Restores a dev profile which only has one validator, locally running.
* Reduce Arcs in TendermintMachine, split Signer from SignatureScheme
* Update sc_tendermint per previous commit
* Restore cache
* Remove error case which shouldn't be an error
* Stop returning errors on already existing blocks entirely
* Correct Dave, Eve, and Ferdie to not run as validators
* Rename dev to devnet
--dev still works thanks to the |. Acheieves a personal preference of
mine with some historical meaning.
* Add message expiry to the Tendermint gossip
* Localize the LibP2P protocol to the blockchain
Follows convention by doing so. Theoretically enables running multiple
blockchains over a single LibP2P connection.
* Add a version to sp-runtime in tendermint-machine
* Add missing trait
* Bump Substrate dependency
Fixes #147.
* Implement Schnorr half-aggregation from https://eprint.iacr.org/2021/350.pdf
Relevant to https://github.com/serai-dex/serai/issues/99.
* cargo update (tendermint)
* Move from polling loops to a pure IO model for sc_tendermint's gossip
* Correct protocol name handling
* Use futures mpsc instead of tokio
* Timeout futures
* Move from a yielding loop to select in tendermint-machine
* Update Substrate to the new TendermintHandle
* Use futures pin instead of tokio
* Only recheck blocks with non-fatal inherent transaction errors
* Update to the latest substrate
* Separate the block processing time from the latency
* Add notes to the runtime
* Don't spam slash
Also adds a slash condition of failing to propose.
* Support running TendermintMachine when not a validator
This supports validators who leave the current set, without crashing
their nodes, along with nodes trying to become validators (who will now
seamlessly transition in).
* Properly define and pass around the block size
* Correct the Duration timing
The proposer will build it, send it, then process it (on the first
round). Accordingly, it's / 3, not / 2, as / 2 only accounted for the
latter events.
* Correct time-adjustment code on round skip
* Have the machine respond to advances made by an external sync loop
* Clean up time code in tendermint-machine
* BlockData and RoundData structs
* Rename Round to RoundNumber
* Move BlockData to a new file
* Move Round to an Option due to the pseudo-uninitialized state we create
Before the addition of RoundData, we always created the round, and on
.round(0), simply created it again. With RoundData, and the changes to
the time code, we used round 0, time 0, the latter being incorrect yet
not an issue due to lack of misuse.
Now, if we do misuse it, it'll panic.
* Clear the Queue instead of draining and filtering
There shouldn't ever be a message which passes the filter under the
current design.
* BlockData::new
* Move more code into block.rs
Introduces type-aliases to obtain Data/Message/SignedMessage solely from
a Network object.
Fixes a bug regarding stepping when you're not an active validator.
* Have verify_precommit_signature return if it verified the signature
Also fixes a bug where invalid precommit signatures were left standing
and therefore contributing to commits.
* Remove the precommit signature hash
It cached signatures per-block. Precommit signatures are bound to each
round. This would lead to forming invalid commits when a commit should
be formed. Under debug, the machine would catch that and panic. On
release, it'd have everyone who wasn't a validator fail to continue
syncing.
* Slight doc changes
Also flattens the message handling function by replacing an if
containing all following code in the function with an early return for
the else case.
* Always produce notifications for finalized blocks via origin overrides
* Correct weird formatting
* Update to the latest tendermint-machine
* Manually step the Tendermint machine when we synced a block over the network
* Ignore finality notifications for old blocks
* Remove a TODO resolved in 8c51bc011d03c8d54ded05011e7f4d1a01e9f873
* Add a TODO comment to slash
Enables searching for the case-sensitive phrase and finding it.
* cargo fmt
* Use a tmp DB for Serai in Docker
* Remove panic on slash
As we move towards protonet, this can happen (if a node goes offline),
yet it happening brings down the entire net right now.
* Add log::error on slash
* created shared volume between containers
* Complete the sh scripts
* Pass in the genesis time to Substrate
* Correct block announcements
They were announced, yet not marked best.
* Correct pupulate_end_time
It was used as inclusive yet didn't work inclusively.
* Correct gossip channel jumping when a block is synced via Substrate
* Use a looser check in import_future
This triggered so it needs to be accordingly relaxed.
* Correct race conditions between add_block and step
Also corrects a <= to <.
* Update cargo deny
* rename genesis-service to genesis
* Update Cargo.lock
* Correct runtime Cargo.toml whitespace
* Correct typo
* Document recheck
* Misc lints
* Fix prev commit
* Resolve low-hanging review comments
* Mark genesis/entry-dev.sh as executable
* Prevent a commit from including the same signature multiple times
Yanks tendermint-machine 0.1.0 accordingly.
* Update to latest nightly clippy
* Improve documentation
* Use clearer variable names
* Add log statements
* Pair more log statements
* Clean TendermintAuthority::authority as possible
Merges it into new. It has way too many arguments, yet there's no clear path at
consolidation there, unfortunately.
Additionally provides better scoping within itself.
* Fix #158
Doesn't use lock_import_and_run for reasons commented (lack of async).
* Rename guard to lock
* Have the devnet use the current time as the genesis
Possible since it's only a single node, not requiring synchronization.
* Fix gossiping
I really don't know what side effect this avoids and I can't say I care at this
point.
* Misc lints
Co-authored-by: vrx00 <vrx00@proton.me>
Co-authored-by: TheArchitect108 <TheArchitect108@protonmail.com>
2022-12-03 23:38:02 +00:00
|
|
|
"frame-support",
|
|
|
|
"frame-system",
|
|
|
|
"log",
|
2023-03-26 12:43:01 +00:00
|
|
|
"pallet-authorship",
|
|
|
|
"pallet-session",
|
Initial Tendermint implementation (#145)
* Machine without timeouts
* Time code
* Move substrate/consensus/tendermint to substrate/tendermint
* Delete the old paper doc
* Refactor out external parts to generics
Also creates a dedicated file for the message log.
* Refactor <V, B> to type V, type B
* Successfully compiling
* Calculate timeouts
* Fix test
* Finish timeouts
* Misc cleanup
* Define a signature scheme trait
* Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde
doesn't natively support borsh, nor SCALE, and while there is a serde
SCALE crate, it's old. While it may be complete, it's not worth working
with.
While we could still grab bincode, and a variety of other formats, it
wasn't worth it to go custom and for Serai, we'll be using SCALE almost
everywhere anyways.
* Implement usage of the signature scheme
* Make the infinite test non-infinite
* Provide a dedicated signature in Precommit of just the block hash
Greatly simplifies verifying when syncing.
* Dedicated Commit object
Restores sig aggregation API.
* Tidy README
* Document tendermint
* Sign the ID directly instead of its SCALE encoding
For a hash, which is fixed-size, these should be the same yet this helps
move past the dependency on SCALE. It also, for any type where the two
values are different, smooths integration.
* Litany of bug fixes
Also attempts to make the code more readable while updating/correcting
documentation.
* Remove async recursion
Greatly increases safety as well by ensuring only one message is
processed at once.
* Correct timing issues
1) Commit didn't include the round, leaving the clock in question.
2) Machines started with a local time, instead of a proper start time.
3) Machines immediately started the next block instead of waiting for
the block time.
* Replace MultiSignature with sr25519::Signature
* Minor SignatureScheme API changes
* Map TM SignatureScheme to Substrate's sr25519
* Initial work on an import queue
* Properly use check_block
* Rename import to import_queue
* Implement tendermint_machine::Block for Substrate Blocks
Unfortunately, this immediately makes Tendermint machine capable of
deployment as crate since it uses a git reference. In the future, a
Cargo.toml patch section for serai/substrate should be investigated.
This is being done regardless as it's the quickest way forward and this
is for Serai.
* Dummy Weights
* Move documentation to the top of the file
* Move logic into TendermintImport itself
Multiple traits exist to verify/handle blocks. I'm unsure exactly when
each will be called in the pipeline, so the easiest solution is to have
every step run every check.
That would be extremely computationally expensive if we ran EVERY check,
yet we rely on Substrate for execution (and according checks), which are
limited to just the actual import function.
Since we're calling this code from many places, it makes sense for it to
be consolidated under TendermintImport.
* BlockImport, JustificationImport, Verifier, and import_queue function
* Update consensus/lib.rs from PoW to Tendermint
Not possible to be used as the previous consensus could. It will not
produce blocks nor does it currenly even instantiate a machine. This is
just he next step.
* Update Cargo.tomls for substrate packages
* Tendermint SelectChain
This is incompatible with Substrate's expectations, yet should be valid
for ours
* Move the node over to the new SelectChain
* Minor tweaks
* Update SelectChain documentation
* Remove substrate/node lib.rs
This shouldn't be used as a library AFAIK. While runtime should be, and
arguably should even be published, I have yet to see node in the same
way. Helps tighten API boundaries.
* Remove unused macro_use
* Replace panicking todos with stubs and // TODO
Enables progress.
* Reduce chain_spec and use more accurate naming
* Implement block proposal logic
* Modularize to get_proposal
* Trigger block importing
Doesn't wait for the response yet, which it needs to.
* Get the result of block importing
* Split import_queue into a series of files
* Provide a way to create the machine
The BasicQueue returned obscures the TendermintImport struct.
Accordingly, a Future scoped with access is returned upwards, which when
awaited will create the machine. This makes creating the machine
optional while maintaining scope boundaries.
Is sufficient to create a 1-node net which produces and finalizes
blocks.
* Don't import justifications multiple times
Also don't broadcast blocks which were solely proposed.
* Correct justication import pipeline
Removes JustificationImport as it should never be used.
* Announce blocks
By claiming File, they're not sent ovber the P2P network before they
have a justification, as desired. Unfortunately, they never were. This
works around that.
* Add an assert to verify proposed children aren't best
* Consolidate C and I generics into a TendermintClient trait alias
* Expand sanity checks
Substrate doesn't expect nor officially support children with less work
than their parents. It's a trick used here. Accordingly, ensure the
trick's validity.
* When resetting, use the end time of the round which was committed to
The machine reset to the end time of the current round. For a delayed
network connection, a machine may move ahead in rounds and only later
realize a prior round succeeded. Despite acknowledging that round's
success, it would maintain its delay when moving to the next block,
bricking it.
Done by tracking the end time for each round as they occur.
* Move Commit from including the round to including the round's end_time
The round was usable to build the current clock in an accumulated
fashion, relative to the previous round. The end time is the absolute
metric of it, which can be used to calculate the round number (with all
previous end times).
Substrate now builds off the best block, not genesis, using the end time
included in the justification to start its machine in a synchronized
state.
Knowing the end time of a round, or the round in which block was
committed to, is necessary for nodes to sync up with Tendermint.
Encoding it in the commit ensures it's long lasting and makes it readily
available, without the load of an entire transaction.
* Add a TODO on Tendermint
* Misc bug fixes
* More misc bug fixes
* Clean up lock acquisition
* Merge weights and signing scheme into validators, documenting needed changes
* Add pallet sessions to runtime, create pallet-tendermint
* Update node to use pallet sessions
* Update support URL
* Partial work on correcting pallet calls
* Redo Tendermint folder structure
* TendermintApi, compilation fixes
* Fix the stub round robin
At some point, the modulus was removed causing it to exceed the
validators list and stop proposing.
* Use the validators list from the session pallet
* Basic Gossip Validator
* Correct Substrate Tendermint start block
The Tendermint machine uses the passed in number as the block's being
worked on number. Substrate passed in the already finalized block's
number.
Also updates misc comments.
* Clean generics in Tendermint with a monolith with associated types
* Remove the Future triggering the machine for an async fn
Enables passing data in, such as the network.
* Move TendermintMachine from start_num, time to last_num, time
Provides an explicitly clear API clearer to program around.
Also adds additional time code to handle an edge case.
* Connect the Tendermint machine to a GossipEngine
* Connect broadcast
* Remove machine from TendermintImport
It's not used there at all.
* Merge Verifier into block_import.rs
These two files were largely the same, just hooking into sync structs
with almost identical imports. As this project shapes up, removing dead
weight is appreciated.
* Create a dedicated file for being a Tendermint authority
* Deleted comment code related to PoW
* Move serai_runtime specific code from tendermint/client to node
Renames serai-consensus to sc_tendermint
* Consolidate file structure in sc_tendermint
* Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in
general.
* Consolidate references to sr25519 in sc_tendermint
* Add documentation to public structs/functions in sc_tendermint
* Add another missing comment
* Make sign asynchronous
Some relation to https://github.com/serai-dex/serai/issues/95.
* Move sc_tendermint to async sign
* Implement proper checking of inherents
* Take in a Keystore and validator ID
* Remove unnecessary PhantomDatas
* Update node to latest sc_tendermint
* Configure node for a multi-node testnet
* Fix handling of the GossipEngine
* Use a rounded genesis to obtain sufficient synchrony within the Docker env
* Correct Serai d-f names in Docker
* Remove an attempt at caching I don't believe would ever hit
* Add an already in chain check to block import
While the inner should do this for us, we call verify_order on our end
*before* inner to ensure sequential import. Accordingly, we need to
provide our own check.
Removes errors of "non-sequential import" when trying to re-import an
existing block.
* Update the consensus documentation
It was incredibly out of date.
* Add a _ to the validator arg in slash
* Make the dev profile a local testnet profile
Restores a dev profile which only has one validator, locally running.
* Reduce Arcs in TendermintMachine, split Signer from SignatureScheme
* Update sc_tendermint per previous commit
* Restore cache
* Remove error case which shouldn't be an error
* Stop returning errors on already existing blocks entirely
* Correct Dave, Eve, and Ferdie to not run as validators
* Rename dev to devnet
--dev still works thanks to the |. Acheieves a personal preference of
mine with some historical meaning.
* Add message expiry to the Tendermint gossip
* Localize the LibP2P protocol to the blockchain
Follows convention by doing so. Theoretically enables running multiple
blockchains over a single LibP2P connection.
* Add a version to sp-runtime in tendermint-machine
* Add missing trait
* Bump Substrate dependency
Fixes #147.
* Implement Schnorr half-aggregation from https://eprint.iacr.org/2021/350.pdf
Relevant to https://github.com/serai-dex/serai/issues/99.
* cargo update (tendermint)
* Move from polling loops to a pure IO model for sc_tendermint's gossip
* Correct protocol name handling
* Use futures mpsc instead of tokio
* Timeout futures
* Move from a yielding loop to select in tendermint-machine
* Update Substrate to the new TendermintHandle
* Use futures pin instead of tokio
* Only recheck blocks with non-fatal inherent transaction errors
* Update to the latest substrate
* Separate the block processing time from the latency
* Add notes to the runtime
* Don't spam slash
Also adds a slash condition of failing to propose.
* Support running TendermintMachine when not a validator
This supports validators who leave the current set, without crashing
their nodes, along with nodes trying to become validators (who will now
seamlessly transition in).
* Properly define and pass around the block size
* Correct the Duration timing
The proposer will build it, send it, then process it (on the first
round). Accordingly, it's / 3, not / 2, as / 2 only accounted for the
latter events.
* Correct time-adjustment code on round skip
* Have the machine respond to advances made by an external sync loop
* Clean up time code in tendermint-machine
* BlockData and RoundData structs
* Rename Round to RoundNumber
* Move BlockData to a new file
* Move Round to an Option due to the pseudo-uninitialized state we create
Before the addition of RoundData, we always created the round, and on
.round(0), simply created it again. With RoundData, and the changes to
the time code, we used round 0, time 0, the latter being incorrect yet
not an issue due to lack of misuse.
Now, if we do misuse it, it'll panic.
* Clear the Queue instead of draining and filtering
There shouldn't ever be a message which passes the filter under the
current design.
* BlockData::new
* Move more code into block.rs
Introduces type-aliases to obtain Data/Message/SignedMessage solely from
a Network object.
Fixes a bug regarding stepping when you're not an active validator.
* Have verify_precommit_signature return if it verified the signature
Also fixes a bug where invalid precommit signatures were left standing
and therefore contributing to commits.
* Remove the precommit signature hash
It cached signatures per-block. Precommit signatures are bound to each
round. This would lead to forming invalid commits when a commit should
be formed. Under debug, the machine would catch that and panic. On
release, it'd have everyone who wasn't a validator fail to continue
syncing.
* Slight doc changes
Also flattens the message handling function by replacing an if
containing all following code in the function with an early return for
the else case.
* Always produce notifications for finalized blocks via origin overrides
* Correct weird formatting
* Update to the latest tendermint-machine
* Manually step the Tendermint machine when we synced a block over the network
* Ignore finality notifications for old blocks
* Remove a TODO resolved in 8c51bc011d03c8d54ded05011e7f4d1a01e9f873
* Add a TODO comment to slash
Enables searching for the case-sensitive phrase and finding it.
* cargo fmt
* Use a tmp DB for Serai in Docker
* Remove panic on slash
As we move towards protonet, this can happen (if a node goes offline),
yet it happening brings down the entire net right now.
* Add log::error on slash
* created shared volume between containers
* Complete the sh scripts
* Pass in the genesis time to Substrate
* Correct block announcements
They were announced, yet not marked best.
* Correct pupulate_end_time
It was used as inclusive yet didn't work inclusively.
* Correct gossip channel jumping when a block is synced via Substrate
* Use a looser check in import_future
This triggered so it needs to be accordingly relaxed.
* Correct race conditions between add_block and step
Also corrects a <= to <.
* Update cargo deny
* rename genesis-service to genesis
* Update Cargo.lock
* Correct runtime Cargo.toml whitespace
* Correct typo
* Document recheck
* Misc lints
* Fix prev commit
* Resolve low-hanging review comments
* Mark genesis/entry-dev.sh as executable
* Prevent a commit from including the same signature multiple times
Yanks tendermint-machine 0.1.0 accordingly.
* Update to latest nightly clippy
* Improve documentation
* Use clearer variable names
* Add log statements
* Pair more log statements
* Clean TendermintAuthority::authority as possible
Merges it into new. It has way too many arguments, yet there's no clear path at
consolidation there, unfortunately.
Additionally provides better scoping within itself.
* Fix #158
Doesn't use lock_import_and_run for reasons commented (lack of async).
* Rename guard to lock
* Have the devnet use the current time as the genesis
Possible since it's only a single node, not requiring synchronization.
* Fix gossiping
I really don't know what side effect this avoids and I can't say I care at this
point.
* Misc lints
Co-authored-by: vrx00 <vrx00@proton.me>
Co-authored-by: TheArchitect108 <TheArchitect108@protonmail.com>
2022-12-03 23:38:02 +00:00
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sp-application-crypto",
|
|
|
|
"sp-consensus-grandpa",
|
Initial Tendermint implementation (#145)
* Machine without timeouts
* Time code
* Move substrate/consensus/tendermint to substrate/tendermint
* Delete the old paper doc
* Refactor out external parts to generics
Also creates a dedicated file for the message log.
* Refactor <V, B> to type V, type B
* Successfully compiling
* Calculate timeouts
* Fix test
* Finish timeouts
* Misc cleanup
* Define a signature scheme trait
* Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde
doesn't natively support borsh, nor SCALE, and while there is a serde
SCALE crate, it's old. While it may be complete, it's not worth working
with.
While we could still grab bincode, and a variety of other formats, it
wasn't worth it to go custom and for Serai, we'll be using SCALE almost
everywhere anyways.
* Implement usage of the signature scheme
* Make the infinite test non-infinite
* Provide a dedicated signature in Precommit of just the block hash
Greatly simplifies verifying when syncing.
* Dedicated Commit object
Restores sig aggregation API.
* Tidy README
* Document tendermint
* Sign the ID directly instead of its SCALE encoding
For a hash, which is fixed-size, these should be the same yet this helps
move past the dependency on SCALE. It also, for any type where the two
values are different, smooths integration.
* Litany of bug fixes
Also attempts to make the code more readable while updating/correcting
documentation.
* Remove async recursion
Greatly increases safety as well by ensuring only one message is
processed at once.
* Correct timing issues
1) Commit didn't include the round, leaving the clock in question.
2) Machines started with a local time, instead of a proper start time.
3) Machines immediately started the next block instead of waiting for
the block time.
* Replace MultiSignature with sr25519::Signature
* Minor SignatureScheme API changes
* Map TM SignatureScheme to Substrate's sr25519
* Initial work on an import queue
* Properly use check_block
* Rename import to import_queue
* Implement tendermint_machine::Block for Substrate Blocks
Unfortunately, this immediately makes Tendermint machine capable of
deployment as crate since it uses a git reference. In the future, a
Cargo.toml patch section for serai/substrate should be investigated.
This is being done regardless as it's the quickest way forward and this
is for Serai.
* Dummy Weights
* Move documentation to the top of the file
* Move logic into TendermintImport itself
Multiple traits exist to verify/handle blocks. I'm unsure exactly when
each will be called in the pipeline, so the easiest solution is to have
every step run every check.
That would be extremely computationally expensive if we ran EVERY check,
yet we rely on Substrate for execution (and according checks), which are
limited to just the actual import function.
Since we're calling this code from many places, it makes sense for it to
be consolidated under TendermintImport.
* BlockImport, JustificationImport, Verifier, and import_queue function
* Update consensus/lib.rs from PoW to Tendermint
Not possible to be used as the previous consensus could. It will not
produce blocks nor does it currenly even instantiate a machine. This is
just he next step.
* Update Cargo.tomls for substrate packages
* Tendermint SelectChain
This is incompatible with Substrate's expectations, yet should be valid
for ours
* Move the node over to the new SelectChain
* Minor tweaks
* Update SelectChain documentation
* Remove substrate/node lib.rs
This shouldn't be used as a library AFAIK. While runtime should be, and
arguably should even be published, I have yet to see node in the same
way. Helps tighten API boundaries.
* Remove unused macro_use
* Replace panicking todos with stubs and // TODO
Enables progress.
* Reduce chain_spec and use more accurate naming
* Implement block proposal logic
* Modularize to get_proposal
* Trigger block importing
Doesn't wait for the response yet, which it needs to.
* Get the result of block importing
* Split import_queue into a series of files
* Provide a way to create the machine
The BasicQueue returned obscures the TendermintImport struct.
Accordingly, a Future scoped with access is returned upwards, which when
awaited will create the machine. This makes creating the machine
optional while maintaining scope boundaries.
Is sufficient to create a 1-node net which produces and finalizes
blocks.
* Don't import justifications multiple times
Also don't broadcast blocks which were solely proposed.
* Correct justication import pipeline
Removes JustificationImport as it should never be used.
* Announce blocks
By claiming File, they're not sent ovber the P2P network before they
have a justification, as desired. Unfortunately, they never were. This
works around that.
* Add an assert to verify proposed children aren't best
* Consolidate C and I generics into a TendermintClient trait alias
* Expand sanity checks
Substrate doesn't expect nor officially support children with less work
than their parents. It's a trick used here. Accordingly, ensure the
trick's validity.
* When resetting, use the end time of the round which was committed to
The machine reset to the end time of the current round. For a delayed
network connection, a machine may move ahead in rounds and only later
realize a prior round succeeded. Despite acknowledging that round's
success, it would maintain its delay when moving to the next block,
bricking it.
Done by tracking the end time for each round as they occur.
* Move Commit from including the round to including the round's end_time
The round was usable to build the current clock in an accumulated
fashion, relative to the previous round. The end time is the absolute
metric of it, which can be used to calculate the round number (with all
previous end times).
Substrate now builds off the best block, not genesis, using the end time
included in the justification to start its machine in a synchronized
state.
Knowing the end time of a round, or the round in which block was
committed to, is necessary for nodes to sync up with Tendermint.
Encoding it in the commit ensures it's long lasting and makes it readily
available, without the load of an entire transaction.
* Add a TODO on Tendermint
* Misc bug fixes
* More misc bug fixes
* Clean up lock acquisition
* Merge weights and signing scheme into validators, documenting needed changes
* Add pallet sessions to runtime, create pallet-tendermint
* Update node to use pallet sessions
* Update support URL
* Partial work on correcting pallet calls
* Redo Tendermint folder structure
* TendermintApi, compilation fixes
* Fix the stub round robin
At some point, the modulus was removed causing it to exceed the
validators list and stop proposing.
* Use the validators list from the session pallet
* Basic Gossip Validator
* Correct Substrate Tendermint start block
The Tendermint machine uses the passed in number as the block's being
worked on number. Substrate passed in the already finalized block's
number.
Also updates misc comments.
* Clean generics in Tendermint with a monolith with associated types
* Remove the Future triggering the machine for an async fn
Enables passing data in, such as the network.
* Move TendermintMachine from start_num, time to last_num, time
Provides an explicitly clear API clearer to program around.
Also adds additional time code to handle an edge case.
* Connect the Tendermint machine to a GossipEngine
* Connect broadcast
* Remove machine from TendermintImport
It's not used there at all.
* Merge Verifier into block_import.rs
These two files were largely the same, just hooking into sync structs
with almost identical imports. As this project shapes up, removing dead
weight is appreciated.
* Create a dedicated file for being a Tendermint authority
* Deleted comment code related to PoW
* Move serai_runtime specific code from tendermint/client to node
Renames serai-consensus to sc_tendermint
* Consolidate file structure in sc_tendermint
* Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in
general.
* Consolidate references to sr25519 in sc_tendermint
* Add documentation to public structs/functions in sc_tendermint
* Add another missing comment
* Make sign asynchronous
Some relation to https://github.com/serai-dex/serai/issues/95.
* Move sc_tendermint to async sign
* Implement proper checking of inherents
* Take in a Keystore and validator ID
* Remove unnecessary PhantomDatas
* Update node to latest sc_tendermint
* Configure node for a multi-node testnet
* Fix handling of the GossipEngine
* Use a rounded genesis to obtain sufficient synchrony within the Docker env
* Correct Serai d-f names in Docker
* Remove an attempt at caching I don't believe would ever hit
* Add an already in chain check to block import
While the inner should do this for us, we call verify_order on our end
*before* inner to ensure sequential import. Accordingly, we need to
provide our own check.
Removes errors of "non-sequential import" when trying to re-import an
existing block.
* Update the consensus documentation
It was incredibly out of date.
* Add a _ to the validator arg in slash
* Make the dev profile a local testnet profile
Restores a dev profile which only has one validator, locally running.
* Reduce Arcs in TendermintMachine, split Signer from SignatureScheme
* Update sc_tendermint per previous commit
* Restore cache
* Remove error case which shouldn't be an error
* Stop returning errors on already existing blocks entirely
* Correct Dave, Eve, and Ferdie to not run as validators
* Rename dev to devnet
--dev still works thanks to the |. Acheieves a personal preference of
mine with some historical meaning.
* Add message expiry to the Tendermint gossip
* Localize the LibP2P protocol to the blockchain
Follows convention by doing so. Theoretically enables running multiple
blockchains over a single LibP2P connection.
* Add a version to sp-runtime in tendermint-machine
* Add missing trait
* Bump Substrate dependency
Fixes #147.
* Implement Schnorr half-aggregation from https://eprint.iacr.org/2021/350.pdf
Relevant to https://github.com/serai-dex/serai/issues/99.
* cargo update (tendermint)
* Move from polling loops to a pure IO model for sc_tendermint's gossip
* Correct protocol name handling
* Use futures mpsc instead of tokio
* Timeout futures
* Move from a yielding loop to select in tendermint-machine
* Update Substrate to the new TendermintHandle
* Use futures pin instead of tokio
* Only recheck blocks with non-fatal inherent transaction errors
* Update to the latest substrate
* Separate the block processing time from the latency
* Add notes to the runtime
* Don't spam slash
Also adds a slash condition of failing to propose.
* Support running TendermintMachine when not a validator
This supports validators who leave the current set, without crashing
their nodes, along with nodes trying to become validators (who will now
seamlessly transition in).
* Properly define and pass around the block size
* Correct the Duration timing
The proposer will build it, send it, then process it (on the first
round). Accordingly, it's / 3, not / 2, as / 2 only accounted for the
latter events.
* Correct time-adjustment code on round skip
* Have the machine respond to advances made by an external sync loop
* Clean up time code in tendermint-machine
* BlockData and RoundData structs
* Rename Round to RoundNumber
* Move BlockData to a new file
* Move Round to an Option due to the pseudo-uninitialized state we create
Before the addition of RoundData, we always created the round, and on
.round(0), simply created it again. With RoundData, and the changes to
the time code, we used round 0, time 0, the latter being incorrect yet
not an issue due to lack of misuse.
Now, if we do misuse it, it'll panic.
* Clear the Queue instead of draining and filtering
There shouldn't ever be a message which passes the filter under the
current design.
* BlockData::new
* Move more code into block.rs
Introduces type-aliases to obtain Data/Message/SignedMessage solely from
a Network object.
Fixes a bug regarding stepping when you're not an active validator.
* Have verify_precommit_signature return if it verified the signature
Also fixes a bug where invalid precommit signatures were left standing
and therefore contributing to commits.
* Remove the precommit signature hash
It cached signatures per-block. Precommit signatures are bound to each
round. This would lead to forming invalid commits when a commit should
be formed. Under debug, the machine would catch that and panic. On
release, it'd have everyone who wasn't a validator fail to continue
syncing.
* Slight doc changes
Also flattens the message handling function by replacing an if
containing all following code in the function with an early return for
the else case.
* Always produce notifications for finalized blocks via origin overrides
* Correct weird formatting
* Update to the latest tendermint-machine
* Manually step the Tendermint machine when we synced a block over the network
* Ignore finality notifications for old blocks
* Remove a TODO resolved in 8c51bc011d03c8d54ded05011e7f4d1a01e9f873
* Add a TODO comment to slash
Enables searching for the case-sensitive phrase and finding it.
* cargo fmt
* Use a tmp DB for Serai in Docker
* Remove panic on slash
As we move towards protonet, this can happen (if a node goes offline),
yet it happening brings down the entire net right now.
* Add log::error on slash
* created shared volume between containers
* Complete the sh scripts
* Pass in the genesis time to Substrate
* Correct block announcements
They were announced, yet not marked best.
* Correct pupulate_end_time
It was used as inclusive yet didn't work inclusively.
* Correct gossip channel jumping when a block is synced via Substrate
* Use a looser check in import_future
This triggered so it needs to be accordingly relaxed.
* Correct race conditions between add_block and step
Also corrects a <= to <.
* Update cargo deny
* rename genesis-service to genesis
* Update Cargo.lock
* Correct runtime Cargo.toml whitespace
* Correct typo
* Document recheck
* Misc lints
* Fix prev commit
* Resolve low-hanging review comments
* Mark genesis/entry-dev.sh as executable
* Prevent a commit from including the same signature multiple times
Yanks tendermint-machine 0.1.0 accordingly.
* Update to latest nightly clippy
* Improve documentation
* Use clearer variable names
* Add log statements
* Pair more log statements
* Clean TendermintAuthority::authority as possible
Merges it into new. It has way too many arguments, yet there's no clear path at
consolidation there, unfortunately.
Additionally provides better scoping within itself.
* Fix #158
Doesn't use lock_import_and_run for reasons commented (lack of async).
* Rename guard to lock
* Have the devnet use the current time as the genesis
Possible since it's only a single node, not requiring synchronization.
* Fix gossiping
I really don't know what side effect this avoids and I can't say I care at this
point.
* Misc lints
Co-authored-by: vrx00 <vrx00@proton.me>
Co-authored-by: TheArchitect108 <TheArchitect108@protonmail.com>
2022-12-03 23:38:02 +00:00
|
|
|
"sp-core",
|
|
|
|
"sp-io",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-session",
|
|
|
|
"sp-staking",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
Initial Tendermint implementation (#145)
* Machine without timeouts
* Time code
* Move substrate/consensus/tendermint to substrate/tendermint
* Delete the old paper doc
* Refactor out external parts to generics
Also creates a dedicated file for the message log.
* Refactor <V, B> to type V, type B
* Successfully compiling
* Calculate timeouts
* Fix test
* Finish timeouts
* Misc cleanup
* Define a signature scheme trait
* Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde
doesn't natively support borsh, nor SCALE, and while there is a serde
SCALE crate, it's old. While it may be complete, it's not worth working
with.
While we could still grab bincode, and a variety of other formats, it
wasn't worth it to go custom and for Serai, we'll be using SCALE almost
everywhere anyways.
* Implement usage of the signature scheme
* Make the infinite test non-infinite
* Provide a dedicated signature in Precommit of just the block hash
Greatly simplifies verifying when syncing.
* Dedicated Commit object
Restores sig aggregation API.
* Tidy README
* Document tendermint
* Sign the ID directly instead of its SCALE encoding
For a hash, which is fixed-size, these should be the same yet this helps
move past the dependency on SCALE. It also, for any type where the two
values are different, smooths integration.
* Litany of bug fixes
Also attempts to make the code more readable while updating/correcting
documentation.
* Remove async recursion
Greatly increases safety as well by ensuring only one message is
processed at once.
* Correct timing issues
1) Commit didn't include the round, leaving the clock in question.
2) Machines started with a local time, instead of a proper start time.
3) Machines immediately started the next block instead of waiting for
the block time.
* Replace MultiSignature with sr25519::Signature
* Minor SignatureScheme API changes
* Map TM SignatureScheme to Substrate's sr25519
* Initial work on an import queue
* Properly use check_block
* Rename import to import_queue
* Implement tendermint_machine::Block for Substrate Blocks
Unfortunately, this immediately makes Tendermint machine capable of
deployment as crate since it uses a git reference. In the future, a
Cargo.toml patch section for serai/substrate should be investigated.
This is being done regardless as it's the quickest way forward and this
is for Serai.
* Dummy Weights
* Move documentation to the top of the file
* Move logic into TendermintImport itself
Multiple traits exist to verify/handle blocks. I'm unsure exactly when
each will be called in the pipeline, so the easiest solution is to have
every step run every check.
That would be extremely computationally expensive if we ran EVERY check,
yet we rely on Substrate for execution (and according checks), which are
limited to just the actual import function.
Since we're calling this code from many places, it makes sense for it to
be consolidated under TendermintImport.
* BlockImport, JustificationImport, Verifier, and import_queue function
* Update consensus/lib.rs from PoW to Tendermint
Not possible to be used as the previous consensus could. It will not
produce blocks nor does it currenly even instantiate a machine. This is
just he next step.
* Update Cargo.tomls for substrate packages
* Tendermint SelectChain
This is incompatible with Substrate's expectations, yet should be valid
for ours
* Move the node over to the new SelectChain
* Minor tweaks
* Update SelectChain documentation
* Remove substrate/node lib.rs
This shouldn't be used as a library AFAIK. While runtime should be, and
arguably should even be published, I have yet to see node in the same
way. Helps tighten API boundaries.
* Remove unused macro_use
* Replace panicking todos with stubs and // TODO
Enables progress.
* Reduce chain_spec and use more accurate naming
* Implement block proposal logic
* Modularize to get_proposal
* Trigger block importing
Doesn't wait for the response yet, which it needs to.
* Get the result of block importing
* Split import_queue into a series of files
* Provide a way to create the machine
The BasicQueue returned obscures the TendermintImport struct.
Accordingly, a Future scoped with access is returned upwards, which when
awaited will create the machine. This makes creating the machine
optional while maintaining scope boundaries.
Is sufficient to create a 1-node net which produces and finalizes
blocks.
* Don't import justifications multiple times
Also don't broadcast blocks which were solely proposed.
* Correct justication import pipeline
Removes JustificationImport as it should never be used.
* Announce blocks
By claiming File, they're not sent ovber the P2P network before they
have a justification, as desired. Unfortunately, they never were. This
works around that.
* Add an assert to verify proposed children aren't best
* Consolidate C and I generics into a TendermintClient trait alias
* Expand sanity checks
Substrate doesn't expect nor officially support children with less work
than their parents. It's a trick used here. Accordingly, ensure the
trick's validity.
* When resetting, use the end time of the round which was committed to
The machine reset to the end time of the current round. For a delayed
network connection, a machine may move ahead in rounds and only later
realize a prior round succeeded. Despite acknowledging that round's
success, it would maintain its delay when moving to the next block,
bricking it.
Done by tracking the end time for each round as they occur.
* Move Commit from including the round to including the round's end_time
The round was usable to build the current clock in an accumulated
fashion, relative to the previous round. The end time is the absolute
metric of it, which can be used to calculate the round number (with all
previous end times).
Substrate now builds off the best block, not genesis, using the end time
included in the justification to start its machine in a synchronized
state.
Knowing the end time of a round, or the round in which block was
committed to, is necessary for nodes to sync up with Tendermint.
Encoding it in the commit ensures it's long lasting and makes it readily
available, without the load of an entire transaction.
* Add a TODO on Tendermint
* Misc bug fixes
* More misc bug fixes
* Clean up lock acquisition
* Merge weights and signing scheme into validators, documenting needed changes
* Add pallet sessions to runtime, create pallet-tendermint
* Update node to use pallet sessions
* Update support URL
* Partial work on correcting pallet calls
* Redo Tendermint folder structure
* TendermintApi, compilation fixes
* Fix the stub round robin
At some point, the modulus was removed causing it to exceed the
validators list and stop proposing.
* Use the validators list from the session pallet
* Basic Gossip Validator
* Correct Substrate Tendermint start block
The Tendermint machine uses the passed in number as the block's being
worked on number. Substrate passed in the already finalized block's
number.
Also updates misc comments.
* Clean generics in Tendermint with a monolith with associated types
* Remove the Future triggering the machine for an async fn
Enables passing data in, such as the network.
* Move TendermintMachine from start_num, time to last_num, time
Provides an explicitly clear API clearer to program around.
Also adds additional time code to handle an edge case.
* Connect the Tendermint machine to a GossipEngine
* Connect broadcast
* Remove machine from TendermintImport
It's not used there at all.
* Merge Verifier into block_import.rs
These two files were largely the same, just hooking into sync structs
with almost identical imports. As this project shapes up, removing dead
weight is appreciated.
* Create a dedicated file for being a Tendermint authority
* Deleted comment code related to PoW
* Move serai_runtime specific code from tendermint/client to node
Renames serai-consensus to sc_tendermint
* Consolidate file structure in sc_tendermint
* Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in
general.
* Consolidate references to sr25519 in sc_tendermint
* Add documentation to public structs/functions in sc_tendermint
* Add another missing comment
* Make sign asynchronous
Some relation to https://github.com/serai-dex/serai/issues/95.
* Move sc_tendermint to async sign
* Implement proper checking of inherents
* Take in a Keystore and validator ID
* Remove unnecessary PhantomDatas
* Update node to latest sc_tendermint
* Configure node for a multi-node testnet
* Fix handling of the GossipEngine
* Use a rounded genesis to obtain sufficient synchrony within the Docker env
* Correct Serai d-f names in Docker
* Remove an attempt at caching I don't believe would ever hit
* Add an already in chain check to block import
While the inner should do this for us, we call verify_order on our end
*before* inner to ensure sequential import. Accordingly, we need to
provide our own check.
Removes errors of "non-sequential import" when trying to re-import an
existing block.
* Update the consensus documentation
It was incredibly out of date.
* Add a _ to the validator arg in slash
* Make the dev profile a local testnet profile
Restores a dev profile which only has one validator, locally running.
* Reduce Arcs in TendermintMachine, split Signer from SignatureScheme
* Update sc_tendermint per previous commit
* Restore cache
* Remove error case which shouldn't be an error
* Stop returning errors on already existing blocks entirely
* Correct Dave, Eve, and Ferdie to not run as validators
* Rename dev to devnet
--dev still works thanks to the |. Acheieves a personal preference of
mine with some historical meaning.
* Add message expiry to the Tendermint gossip
* Localize the LibP2P protocol to the blockchain
Follows convention by doing so. Theoretically enables running multiple
blockchains over a single LibP2P connection.
* Add a version to sp-runtime in tendermint-machine
* Add missing trait
* Bump Substrate dependency
Fixes #147.
* Implement Schnorr half-aggregation from https://eprint.iacr.org/2021/350.pdf
Relevant to https://github.com/serai-dex/serai/issues/99.
* cargo update (tendermint)
* Move from polling loops to a pure IO model for sc_tendermint's gossip
* Correct protocol name handling
* Use futures mpsc instead of tokio
* Timeout futures
* Move from a yielding loop to select in tendermint-machine
* Update Substrate to the new TendermintHandle
* Use futures pin instead of tokio
* Only recheck blocks with non-fatal inherent transaction errors
* Update to the latest substrate
* Separate the block processing time from the latency
* Add notes to the runtime
* Don't spam slash
Also adds a slash condition of failing to propose.
* Support running TendermintMachine when not a validator
This supports validators who leave the current set, without crashing
their nodes, along with nodes trying to become validators (who will now
seamlessly transition in).
* Properly define and pass around the block size
* Correct the Duration timing
The proposer will build it, send it, then process it (on the first
round). Accordingly, it's / 3, not / 2, as / 2 only accounted for the
latter events.
* Correct time-adjustment code on round skip
* Have the machine respond to advances made by an external sync loop
* Clean up time code in tendermint-machine
* BlockData and RoundData structs
* Rename Round to RoundNumber
* Move BlockData to a new file
* Move Round to an Option due to the pseudo-uninitialized state we create
Before the addition of RoundData, we always created the round, and on
.round(0), simply created it again. With RoundData, and the changes to
the time code, we used round 0, time 0, the latter being incorrect yet
not an issue due to lack of misuse.
Now, if we do misuse it, it'll panic.
* Clear the Queue instead of draining and filtering
There shouldn't ever be a message which passes the filter under the
current design.
* BlockData::new
* Move more code into block.rs
Introduces type-aliases to obtain Data/Message/SignedMessage solely from
a Network object.
Fixes a bug regarding stepping when you're not an active validator.
* Have verify_precommit_signature return if it verified the signature
Also fixes a bug where invalid precommit signatures were left standing
and therefore contributing to commits.
* Remove the precommit signature hash
It cached signatures per-block. Precommit signatures are bound to each
round. This would lead to forming invalid commits when a commit should
be formed. Under debug, the machine would catch that and panic. On
release, it'd have everyone who wasn't a validator fail to continue
syncing.
* Slight doc changes
Also flattens the message handling function by replacing an if
containing all following code in the function with an early return for
the else case.
* Always produce notifications for finalized blocks via origin overrides
* Correct weird formatting
* Update to the latest tendermint-machine
* Manually step the Tendermint machine when we synced a block over the network
* Ignore finality notifications for old blocks
* Remove a TODO resolved in 8c51bc011d03c8d54ded05011e7f4d1a01e9f873
* Add a TODO comment to slash
Enables searching for the case-sensitive phrase and finding it.
* cargo fmt
* Use a tmp DB for Serai in Docker
* Remove panic on slash
As we move towards protonet, this can happen (if a node goes offline),
yet it happening brings down the entire net right now.
* Add log::error on slash
* created shared volume between containers
* Complete the sh scripts
* Pass in the genesis time to Substrate
* Correct block announcements
They were announced, yet not marked best.
* Correct pupulate_end_time
It was used as inclusive yet didn't work inclusively.
* Correct gossip channel jumping when a block is synced via Substrate
* Use a looser check in import_future
This triggered so it needs to be accordingly relaxed.
* Correct race conditions between add_block and step
Also corrects a <= to <.
* Update cargo deny
* rename genesis-service to genesis
* Update Cargo.lock
* Correct runtime Cargo.toml whitespace
* Correct typo
* Document recheck
* Misc lints
* Fix prev commit
* Resolve low-hanging review comments
* Mark genesis/entry-dev.sh as executable
* Prevent a commit from including the same signature multiple times
Yanks tendermint-machine 0.1.0 accordingly.
* Update to latest nightly clippy
* Improve documentation
* Use clearer variable names
* Add log statements
* Pair more log statements
* Clean TendermintAuthority::authority as possible
Merges it into new. It has way too many arguments, yet there's no clear path at
consolidation there, unfortunately.
Additionally provides better scoping within itself.
* Fix #158
Doesn't use lock_import_and_run for reasons commented (lack of async).
* Rename guard to lock
* Have the devnet use the current time as the genesis
Possible since it's only a single node, not requiring synchronization.
* Fix gossiping
I really don't know what side effect this avoids and I can't say I care at this
point.
* Misc lints
Co-authored-by: vrx00 <vrx00@proton.me>
Co-authored-by: TheArchitect108 <TheArchitect108@protonmail.com>
2022-12-03 23:38:02 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2023-03-26 12:43:01 +00:00
|
|
|
name = "pallet-session"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
Initial Tendermint implementation (#145)
* Machine without timeouts
* Time code
* Move substrate/consensus/tendermint to substrate/tendermint
* Delete the old paper doc
* Refactor out external parts to generics
Also creates a dedicated file for the message log.
* Refactor <V, B> to type V, type B
* Successfully compiling
* Calculate timeouts
* Fix test
* Finish timeouts
* Misc cleanup
* Define a signature scheme trait
* Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde
doesn't natively support borsh, nor SCALE, and while there is a serde
SCALE crate, it's old. While it may be complete, it's not worth working
with.
While we could still grab bincode, and a variety of other formats, it
wasn't worth it to go custom and for Serai, we'll be using SCALE almost
everywhere anyways.
* Implement usage of the signature scheme
* Make the infinite test non-infinite
* Provide a dedicated signature in Precommit of just the block hash
Greatly simplifies verifying when syncing.
* Dedicated Commit object
Restores sig aggregation API.
* Tidy README
* Document tendermint
* Sign the ID directly instead of its SCALE encoding
For a hash, which is fixed-size, these should be the same yet this helps
move past the dependency on SCALE. It also, for any type where the two
values are different, smooths integration.
* Litany of bug fixes
Also attempts to make the code more readable while updating/correcting
documentation.
* Remove async recursion
Greatly increases safety as well by ensuring only one message is
processed at once.
* Correct timing issues
1) Commit didn't include the round, leaving the clock in question.
2) Machines started with a local time, instead of a proper start time.
3) Machines immediately started the next block instead of waiting for
the block time.
* Replace MultiSignature with sr25519::Signature
* Minor SignatureScheme API changes
* Map TM SignatureScheme to Substrate's sr25519
* Initial work on an import queue
* Properly use check_block
* Rename import to import_queue
* Implement tendermint_machine::Block for Substrate Blocks
Unfortunately, this immediately makes Tendermint machine capable of
deployment as crate since it uses a git reference. In the future, a
Cargo.toml patch section for serai/substrate should be investigated.
This is being done regardless as it's the quickest way forward and this
is for Serai.
* Dummy Weights
* Move documentation to the top of the file
* Move logic into TendermintImport itself
Multiple traits exist to verify/handle blocks. I'm unsure exactly when
each will be called in the pipeline, so the easiest solution is to have
every step run every check.
That would be extremely computationally expensive if we ran EVERY check,
yet we rely on Substrate for execution (and according checks), which are
limited to just the actual import function.
Since we're calling this code from many places, it makes sense for it to
be consolidated under TendermintImport.
* BlockImport, JustificationImport, Verifier, and import_queue function
* Update consensus/lib.rs from PoW to Tendermint
Not possible to be used as the previous consensus could. It will not
produce blocks nor does it currenly even instantiate a machine. This is
just he next step.
* Update Cargo.tomls for substrate packages
* Tendermint SelectChain
This is incompatible with Substrate's expectations, yet should be valid
for ours
* Move the node over to the new SelectChain
* Minor tweaks
* Update SelectChain documentation
* Remove substrate/node lib.rs
This shouldn't be used as a library AFAIK. While runtime should be, and
arguably should even be published, I have yet to see node in the same
way. Helps tighten API boundaries.
* Remove unused macro_use
* Replace panicking todos with stubs and // TODO
Enables progress.
* Reduce chain_spec and use more accurate naming
* Implement block proposal logic
* Modularize to get_proposal
* Trigger block importing
Doesn't wait for the response yet, which it needs to.
* Get the result of block importing
* Split import_queue into a series of files
* Provide a way to create the machine
The BasicQueue returned obscures the TendermintImport struct.
Accordingly, a Future scoped with access is returned upwards, which when
awaited will create the machine. This makes creating the machine
optional while maintaining scope boundaries.
Is sufficient to create a 1-node net which produces and finalizes
blocks.
* Don't import justifications multiple times
Also don't broadcast blocks which were solely proposed.
* Correct justication import pipeline
Removes JustificationImport as it should never be used.
* Announce blocks
By claiming File, they're not sent ovber the P2P network before they
have a justification, as desired. Unfortunately, they never were. This
works around that.
* Add an assert to verify proposed children aren't best
* Consolidate C and I generics into a TendermintClient trait alias
* Expand sanity checks
Substrate doesn't expect nor officially support children with less work
than their parents. It's a trick used here. Accordingly, ensure the
trick's validity.
* When resetting, use the end time of the round which was committed to
The machine reset to the end time of the current round. For a delayed
network connection, a machine may move ahead in rounds and only later
realize a prior round succeeded. Despite acknowledging that round's
success, it would maintain its delay when moving to the next block,
bricking it.
Done by tracking the end time for each round as they occur.
* Move Commit from including the round to including the round's end_time
The round was usable to build the current clock in an accumulated
fashion, relative to the previous round. The end time is the absolute
metric of it, which can be used to calculate the round number (with all
previous end times).
Substrate now builds off the best block, not genesis, using the end time
included in the justification to start its machine in a synchronized
state.
Knowing the end time of a round, or the round in which block was
committed to, is necessary for nodes to sync up with Tendermint.
Encoding it in the commit ensures it's long lasting and makes it readily
available, without the load of an entire transaction.
* Add a TODO on Tendermint
* Misc bug fixes
* More misc bug fixes
* Clean up lock acquisition
* Merge weights and signing scheme into validators, documenting needed changes
* Add pallet sessions to runtime, create pallet-tendermint
* Update node to use pallet sessions
* Update support URL
* Partial work on correcting pallet calls
* Redo Tendermint folder structure
* TendermintApi, compilation fixes
* Fix the stub round robin
At some point, the modulus was removed causing it to exceed the
validators list and stop proposing.
* Use the validators list from the session pallet
* Basic Gossip Validator
* Correct Substrate Tendermint start block
The Tendermint machine uses the passed in number as the block's being
worked on number. Substrate passed in the already finalized block's
number.
Also updates misc comments.
* Clean generics in Tendermint with a monolith with associated types
* Remove the Future triggering the machine for an async fn
Enables passing data in, such as the network.
* Move TendermintMachine from start_num, time to last_num, time
Provides an explicitly clear API clearer to program around.
Also adds additional time code to handle an edge case.
* Connect the Tendermint machine to a GossipEngine
* Connect broadcast
* Remove machine from TendermintImport
It's not used there at all.
* Merge Verifier into block_import.rs
These two files were largely the same, just hooking into sync structs
with almost identical imports. As this project shapes up, removing dead
weight is appreciated.
* Create a dedicated file for being a Tendermint authority
* Deleted comment code related to PoW
* Move serai_runtime specific code from tendermint/client to node
Renames serai-consensus to sc_tendermint
* Consolidate file structure in sc_tendermint
* Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in
general.
* Consolidate references to sr25519 in sc_tendermint
* Add documentation to public structs/functions in sc_tendermint
* Add another missing comment
* Make sign asynchronous
Some relation to https://github.com/serai-dex/serai/issues/95.
* Move sc_tendermint to async sign
* Implement proper checking of inherents
* Take in a Keystore and validator ID
* Remove unnecessary PhantomDatas
* Update node to latest sc_tendermint
* Configure node for a multi-node testnet
* Fix handling of the GossipEngine
* Use a rounded genesis to obtain sufficient synchrony within the Docker env
* Correct Serai d-f names in Docker
* Remove an attempt at caching I don't believe would ever hit
* Add an already in chain check to block import
While the inner should do this for us, we call verify_order on our end
*before* inner to ensure sequential import. Accordingly, we need to
provide our own check.
Removes errors of "non-sequential import" when trying to re-import an
existing block.
* Update the consensus documentation
It was incredibly out of date.
* Add a _ to the validator arg in slash
* Make the dev profile a local testnet profile
Restores a dev profile which only has one validator, locally running.
* Reduce Arcs in TendermintMachine, split Signer from SignatureScheme
* Update sc_tendermint per previous commit
* Restore cache
* Remove error case which shouldn't be an error
* Stop returning errors on already existing blocks entirely
* Correct Dave, Eve, and Ferdie to not run as validators
* Rename dev to devnet
--dev still works thanks to the |. Acheieves a personal preference of
mine with some historical meaning.
* Add message expiry to the Tendermint gossip
* Localize the LibP2P protocol to the blockchain
Follows convention by doing so. Theoretically enables running multiple
blockchains over a single LibP2P connection.
* Add a version to sp-runtime in tendermint-machine
* Add missing trait
* Bump Substrate dependency
Fixes #147.
* Implement Schnorr half-aggregation from https://eprint.iacr.org/2021/350.pdf
Relevant to https://github.com/serai-dex/serai/issues/99.
* cargo update (tendermint)
* Move from polling loops to a pure IO model for sc_tendermint's gossip
* Correct protocol name handling
* Use futures mpsc instead of tokio
* Timeout futures
* Move from a yielding loop to select in tendermint-machine
* Update Substrate to the new TendermintHandle
* Use futures pin instead of tokio
* Only recheck blocks with non-fatal inherent transaction errors
* Update to the latest substrate
* Separate the block processing time from the latency
* Add notes to the runtime
* Don't spam slash
Also adds a slash condition of failing to propose.
* Support running TendermintMachine when not a validator
This supports validators who leave the current set, without crashing
their nodes, along with nodes trying to become validators (who will now
seamlessly transition in).
* Properly define and pass around the block size
* Correct the Duration timing
The proposer will build it, send it, then process it (on the first
round). Accordingly, it's / 3, not / 2, as / 2 only accounted for the
latter events.
* Correct time-adjustment code on round skip
* Have the machine respond to advances made by an external sync loop
* Clean up time code in tendermint-machine
* BlockData and RoundData structs
* Rename Round to RoundNumber
* Move BlockData to a new file
* Move Round to an Option due to the pseudo-uninitialized state we create
Before the addition of RoundData, we always created the round, and on
.round(0), simply created it again. With RoundData, and the changes to
the time code, we used round 0, time 0, the latter being incorrect yet
not an issue due to lack of misuse.
Now, if we do misuse it, it'll panic.
* Clear the Queue instead of draining and filtering
There shouldn't ever be a message which passes the filter under the
current design.
* BlockData::new
* Move more code into block.rs
Introduces type-aliases to obtain Data/Message/SignedMessage solely from
a Network object.
Fixes a bug regarding stepping when you're not an active validator.
* Have verify_precommit_signature return if it verified the signature
Also fixes a bug where invalid precommit signatures were left standing
and therefore contributing to commits.
* Remove the precommit signature hash
It cached signatures per-block. Precommit signatures are bound to each
round. This would lead to forming invalid commits when a commit should
be formed. Under debug, the machine would catch that and panic. On
release, it'd have everyone who wasn't a validator fail to continue
syncing.
* Slight doc changes
Also flattens the message handling function by replacing an if
containing all following code in the function with an early return for
the else case.
* Always produce notifications for finalized blocks via origin overrides
* Correct weird formatting
* Update to the latest tendermint-machine
* Manually step the Tendermint machine when we synced a block over the network
* Ignore finality notifications for old blocks
* Remove a TODO resolved in 8c51bc011d03c8d54ded05011e7f4d1a01e9f873
* Add a TODO comment to slash
Enables searching for the case-sensitive phrase and finding it.
* cargo fmt
* Use a tmp DB for Serai in Docker
* Remove panic on slash
As we move towards protonet, this can happen (if a node goes offline),
yet it happening brings down the entire net right now.
* Add log::error on slash
* created shared volume between containers
* Complete the sh scripts
* Pass in the genesis time to Substrate
* Correct block announcements
They were announced, yet not marked best.
* Correct pupulate_end_time
It was used as inclusive yet didn't work inclusively.
* Correct gossip channel jumping when a block is synced via Substrate
* Use a looser check in import_future
This triggered so it needs to be accordingly relaxed.
* Correct race conditions between add_block and step
Also corrects a <= to <.
* Update cargo deny
* rename genesis-service to genesis
* Update Cargo.lock
* Correct runtime Cargo.toml whitespace
* Correct typo
* Document recheck
* Misc lints
* Fix prev commit
* Resolve low-hanging review comments
* Mark genesis/entry-dev.sh as executable
* Prevent a commit from including the same signature multiple times
Yanks tendermint-machine 0.1.0 accordingly.
* Update to latest nightly clippy
* Improve documentation
* Use clearer variable names
* Add log statements
* Pair more log statements
* Clean TendermintAuthority::authority as possible
Merges it into new. It has way too many arguments, yet there's no clear path at
consolidation there, unfortunately.
Additionally provides better scoping within itself.
* Fix #158
Doesn't use lock_import_and_run for reasons commented (lack of async).
* Rename guard to lock
* Have the devnet use the current time as the genesis
Possible since it's only a single node, not requiring synchronization.
* Fix gossiping
I really don't know what side effect this avoids and I can't say I care at this
point.
* Misc lints
Co-authored-by: vrx00 <vrx00@proton.me>
Co-authored-by: TheArchitect108 <TheArchitect108@protonmail.com>
2022-12-03 23:38:02 +00:00
|
|
|
dependencies = [
|
|
|
|
"frame-support",
|
|
|
|
"frame-system",
|
2023-03-26 12:43:01 +00:00
|
|
|
"impl-trait-for-tuples",
|
|
|
|
"log",
|
|
|
|
"pallet-timestamp",
|
Initial Tendermint implementation (#145)
* Machine without timeouts
* Time code
* Move substrate/consensus/tendermint to substrate/tendermint
* Delete the old paper doc
* Refactor out external parts to generics
Also creates a dedicated file for the message log.
* Refactor <V, B> to type V, type B
* Successfully compiling
* Calculate timeouts
* Fix test
* Finish timeouts
* Misc cleanup
* Define a signature scheme trait
* Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde
doesn't natively support borsh, nor SCALE, and while there is a serde
SCALE crate, it's old. While it may be complete, it's not worth working
with.
While we could still grab bincode, and a variety of other formats, it
wasn't worth it to go custom and for Serai, we'll be using SCALE almost
everywhere anyways.
* Implement usage of the signature scheme
* Make the infinite test non-infinite
* Provide a dedicated signature in Precommit of just the block hash
Greatly simplifies verifying when syncing.
* Dedicated Commit object
Restores sig aggregation API.
* Tidy README
* Document tendermint
* Sign the ID directly instead of its SCALE encoding
For a hash, which is fixed-size, these should be the same yet this helps
move past the dependency on SCALE. It also, for any type where the two
values are different, smooths integration.
* Litany of bug fixes
Also attempts to make the code more readable while updating/correcting
documentation.
* Remove async recursion
Greatly increases safety as well by ensuring only one message is
processed at once.
* Correct timing issues
1) Commit didn't include the round, leaving the clock in question.
2) Machines started with a local time, instead of a proper start time.
3) Machines immediately started the next block instead of waiting for
the block time.
* Replace MultiSignature with sr25519::Signature
* Minor SignatureScheme API changes
* Map TM SignatureScheme to Substrate's sr25519
* Initial work on an import queue
* Properly use check_block
* Rename import to import_queue
* Implement tendermint_machine::Block for Substrate Blocks
Unfortunately, this immediately makes Tendermint machine capable of
deployment as crate since it uses a git reference. In the future, a
Cargo.toml patch section for serai/substrate should be investigated.
This is being done regardless as it's the quickest way forward and this
is for Serai.
* Dummy Weights
* Move documentation to the top of the file
* Move logic into TendermintImport itself
Multiple traits exist to verify/handle blocks. I'm unsure exactly when
each will be called in the pipeline, so the easiest solution is to have
every step run every check.
That would be extremely computationally expensive if we ran EVERY check,
yet we rely on Substrate for execution (and according checks), which are
limited to just the actual import function.
Since we're calling this code from many places, it makes sense for it to
be consolidated under TendermintImport.
* BlockImport, JustificationImport, Verifier, and import_queue function
* Update consensus/lib.rs from PoW to Tendermint
Not possible to be used as the previous consensus could. It will not
produce blocks nor does it currenly even instantiate a machine. This is
just he next step.
* Update Cargo.tomls for substrate packages
* Tendermint SelectChain
This is incompatible with Substrate's expectations, yet should be valid
for ours
* Move the node over to the new SelectChain
* Minor tweaks
* Update SelectChain documentation
* Remove substrate/node lib.rs
This shouldn't be used as a library AFAIK. While runtime should be, and
arguably should even be published, I have yet to see node in the same
way. Helps tighten API boundaries.
* Remove unused macro_use
* Replace panicking todos with stubs and // TODO
Enables progress.
* Reduce chain_spec and use more accurate naming
* Implement block proposal logic
* Modularize to get_proposal
* Trigger block importing
Doesn't wait for the response yet, which it needs to.
* Get the result of block importing
* Split import_queue into a series of files
* Provide a way to create the machine
The BasicQueue returned obscures the TendermintImport struct.
Accordingly, a Future scoped with access is returned upwards, which when
awaited will create the machine. This makes creating the machine
optional while maintaining scope boundaries.
Is sufficient to create a 1-node net which produces and finalizes
blocks.
* Don't import justifications multiple times
Also don't broadcast blocks which were solely proposed.
* Correct justication import pipeline
Removes JustificationImport as it should never be used.
* Announce blocks
By claiming File, they're not sent ovber the P2P network before they
have a justification, as desired. Unfortunately, they never were. This
works around that.
* Add an assert to verify proposed children aren't best
* Consolidate C and I generics into a TendermintClient trait alias
* Expand sanity checks
Substrate doesn't expect nor officially support children with less work
than their parents. It's a trick used here. Accordingly, ensure the
trick's validity.
* When resetting, use the end time of the round which was committed to
The machine reset to the end time of the current round. For a delayed
network connection, a machine may move ahead in rounds and only later
realize a prior round succeeded. Despite acknowledging that round's
success, it would maintain its delay when moving to the next block,
bricking it.
Done by tracking the end time for each round as they occur.
* Move Commit from including the round to including the round's end_time
The round was usable to build the current clock in an accumulated
fashion, relative to the previous round. The end time is the absolute
metric of it, which can be used to calculate the round number (with all
previous end times).
Substrate now builds off the best block, not genesis, using the end time
included in the justification to start its machine in a synchronized
state.
Knowing the end time of a round, or the round in which block was
committed to, is necessary for nodes to sync up with Tendermint.
Encoding it in the commit ensures it's long lasting and makes it readily
available, without the load of an entire transaction.
* Add a TODO on Tendermint
* Misc bug fixes
* More misc bug fixes
* Clean up lock acquisition
* Merge weights and signing scheme into validators, documenting needed changes
* Add pallet sessions to runtime, create pallet-tendermint
* Update node to use pallet sessions
* Update support URL
* Partial work on correcting pallet calls
* Redo Tendermint folder structure
* TendermintApi, compilation fixes
* Fix the stub round robin
At some point, the modulus was removed causing it to exceed the
validators list and stop proposing.
* Use the validators list from the session pallet
* Basic Gossip Validator
* Correct Substrate Tendermint start block
The Tendermint machine uses the passed in number as the block's being
worked on number. Substrate passed in the already finalized block's
number.
Also updates misc comments.
* Clean generics in Tendermint with a monolith with associated types
* Remove the Future triggering the machine for an async fn
Enables passing data in, such as the network.
* Move TendermintMachine from start_num, time to last_num, time
Provides an explicitly clear API clearer to program around.
Also adds additional time code to handle an edge case.
* Connect the Tendermint machine to a GossipEngine
* Connect broadcast
* Remove machine from TendermintImport
It's not used there at all.
* Merge Verifier into block_import.rs
These two files were largely the same, just hooking into sync structs
with almost identical imports. As this project shapes up, removing dead
weight is appreciated.
* Create a dedicated file for being a Tendermint authority
* Deleted comment code related to PoW
* Move serai_runtime specific code from tendermint/client to node
Renames serai-consensus to sc_tendermint
* Consolidate file structure in sc_tendermint
* Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in
general.
* Consolidate references to sr25519 in sc_tendermint
* Add documentation to public structs/functions in sc_tendermint
* Add another missing comment
* Make sign asynchronous
Some relation to https://github.com/serai-dex/serai/issues/95.
* Move sc_tendermint to async sign
* Implement proper checking of inherents
* Take in a Keystore and validator ID
* Remove unnecessary PhantomDatas
* Update node to latest sc_tendermint
* Configure node for a multi-node testnet
* Fix handling of the GossipEngine
* Use a rounded genesis to obtain sufficient synchrony within the Docker env
* Correct Serai d-f names in Docker
* Remove an attempt at caching I don't believe would ever hit
* Add an already in chain check to block import
While the inner should do this for us, we call verify_order on our end
*before* inner to ensure sequential import. Accordingly, we need to
provide our own check.
Removes errors of "non-sequential import" when trying to re-import an
existing block.
* Update the consensus documentation
It was incredibly out of date.
* Add a _ to the validator arg in slash
* Make the dev profile a local testnet profile
Restores a dev profile which only has one validator, locally running.
* Reduce Arcs in TendermintMachine, split Signer from SignatureScheme
* Update sc_tendermint per previous commit
* Restore cache
* Remove error case which shouldn't be an error
* Stop returning errors on already existing blocks entirely
* Correct Dave, Eve, and Ferdie to not run as validators
* Rename dev to devnet
--dev still works thanks to the |. Acheieves a personal preference of
mine with some historical meaning.
* Add message expiry to the Tendermint gossip
* Localize the LibP2P protocol to the blockchain
Follows convention by doing so. Theoretically enables running multiple
blockchains over a single LibP2P connection.
* Add a version to sp-runtime in tendermint-machine
* Add missing trait
* Bump Substrate dependency
Fixes #147.
* Implement Schnorr half-aggregation from https://eprint.iacr.org/2021/350.pdf
Relevant to https://github.com/serai-dex/serai/issues/99.
* cargo update (tendermint)
* Move from polling loops to a pure IO model for sc_tendermint's gossip
* Correct protocol name handling
* Use futures mpsc instead of tokio
* Timeout futures
* Move from a yielding loop to select in tendermint-machine
* Update Substrate to the new TendermintHandle
* Use futures pin instead of tokio
* Only recheck blocks with non-fatal inherent transaction errors
* Update to the latest substrate
* Separate the block processing time from the latency
* Add notes to the runtime
* Don't spam slash
Also adds a slash condition of failing to propose.
* Support running TendermintMachine when not a validator
This supports validators who leave the current set, without crashing
their nodes, along with nodes trying to become validators (who will now
seamlessly transition in).
* Properly define and pass around the block size
* Correct the Duration timing
The proposer will build it, send it, then process it (on the first
round). Accordingly, it's / 3, not / 2, as / 2 only accounted for the
latter events.
* Correct time-adjustment code on round skip
* Have the machine respond to advances made by an external sync loop
* Clean up time code in tendermint-machine
* BlockData and RoundData structs
* Rename Round to RoundNumber
* Move BlockData to a new file
* Move Round to an Option due to the pseudo-uninitialized state we create
Before the addition of RoundData, we always created the round, and on
.round(0), simply created it again. With RoundData, and the changes to
the time code, we used round 0, time 0, the latter being incorrect yet
not an issue due to lack of misuse.
Now, if we do misuse it, it'll panic.
* Clear the Queue instead of draining and filtering
There shouldn't ever be a message which passes the filter under the
current design.
* BlockData::new
* Move more code into block.rs
Introduces type-aliases to obtain Data/Message/SignedMessage solely from
a Network object.
Fixes a bug regarding stepping when you're not an active validator.
* Have verify_precommit_signature return if it verified the signature
Also fixes a bug where invalid precommit signatures were left standing
and therefore contributing to commits.
* Remove the precommit signature hash
It cached signatures per-block. Precommit signatures are bound to each
round. This would lead to forming invalid commits when a commit should
be formed. Under debug, the machine would catch that and panic. On
release, it'd have everyone who wasn't a validator fail to continue
syncing.
* Slight doc changes
Also flattens the message handling function by replacing an if
containing all following code in the function with an early return for
the else case.
* Always produce notifications for finalized blocks via origin overrides
* Correct weird formatting
* Update to the latest tendermint-machine
* Manually step the Tendermint machine when we synced a block over the network
* Ignore finality notifications for old blocks
* Remove a TODO resolved in 8c51bc011d03c8d54ded05011e7f4d1a01e9f873
* Add a TODO comment to slash
Enables searching for the case-sensitive phrase and finding it.
* cargo fmt
* Use a tmp DB for Serai in Docker
* Remove panic on slash
As we move towards protonet, this can happen (if a node goes offline),
yet it happening brings down the entire net right now.
* Add log::error on slash
* created shared volume between containers
* Complete the sh scripts
* Pass in the genesis time to Substrate
* Correct block announcements
They were announced, yet not marked best.
* Correct pupulate_end_time
It was used as inclusive yet didn't work inclusively.
* Correct gossip channel jumping when a block is synced via Substrate
* Use a looser check in import_future
This triggered so it needs to be accordingly relaxed.
* Correct race conditions between add_block and step
Also corrects a <= to <.
* Update cargo deny
* rename genesis-service to genesis
* Update Cargo.lock
* Correct runtime Cargo.toml whitespace
* Correct typo
* Document recheck
* Misc lints
* Fix prev commit
* Resolve low-hanging review comments
* Mark genesis/entry-dev.sh as executable
* Prevent a commit from including the same signature multiple times
Yanks tendermint-machine 0.1.0 accordingly.
* Update to latest nightly clippy
* Improve documentation
* Use clearer variable names
* Add log statements
* Pair more log statements
* Clean TendermintAuthority::authority as possible
Merges it into new. It has way too many arguments, yet there's no clear path at
consolidation there, unfortunately.
Additionally provides better scoping within itself.
* Fix #158
Doesn't use lock_import_and_run for reasons commented (lack of async).
* Rename guard to lock
* Have the devnet use the current time as the genesis
Possible since it's only a single node, not requiring synchronization.
* Fix gossiping
I really don't know what side effect this avoids and I can't say I care at this
point.
* Misc lints
Co-authored-by: vrx00 <vrx00@proton.me>
Co-authored-by: TheArchitect108 <TheArchitect108@protonmail.com>
2022-12-03 23:38:02 +00:00
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"sp-core",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sp-io",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-session",
|
|
|
|
"sp-staking",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sp-trie",
|
Initial Tendermint implementation (#145)
* Machine without timeouts
* Time code
* Move substrate/consensus/tendermint to substrate/tendermint
* Delete the old paper doc
* Refactor out external parts to generics
Also creates a dedicated file for the message log.
* Refactor <V, B> to type V, type B
* Successfully compiling
* Calculate timeouts
* Fix test
* Finish timeouts
* Misc cleanup
* Define a signature scheme trait
* Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde
doesn't natively support borsh, nor SCALE, and while there is a serde
SCALE crate, it's old. While it may be complete, it's not worth working
with.
While we could still grab bincode, and a variety of other formats, it
wasn't worth it to go custom and for Serai, we'll be using SCALE almost
everywhere anyways.
* Implement usage of the signature scheme
* Make the infinite test non-infinite
* Provide a dedicated signature in Precommit of just the block hash
Greatly simplifies verifying when syncing.
* Dedicated Commit object
Restores sig aggregation API.
* Tidy README
* Document tendermint
* Sign the ID directly instead of its SCALE encoding
For a hash, which is fixed-size, these should be the same yet this helps
move past the dependency on SCALE. It also, for any type where the two
values are different, smooths integration.
* Litany of bug fixes
Also attempts to make the code more readable while updating/correcting
documentation.
* Remove async recursion
Greatly increases safety as well by ensuring only one message is
processed at once.
* Correct timing issues
1) Commit didn't include the round, leaving the clock in question.
2) Machines started with a local time, instead of a proper start time.
3) Machines immediately started the next block instead of waiting for
the block time.
* Replace MultiSignature with sr25519::Signature
* Minor SignatureScheme API changes
* Map TM SignatureScheme to Substrate's sr25519
* Initial work on an import queue
* Properly use check_block
* Rename import to import_queue
* Implement tendermint_machine::Block for Substrate Blocks
Unfortunately, this immediately makes Tendermint machine capable of
deployment as crate since it uses a git reference. In the future, a
Cargo.toml patch section for serai/substrate should be investigated.
This is being done regardless as it's the quickest way forward and this
is for Serai.
* Dummy Weights
* Move documentation to the top of the file
* Move logic into TendermintImport itself
Multiple traits exist to verify/handle blocks. I'm unsure exactly when
each will be called in the pipeline, so the easiest solution is to have
every step run every check.
That would be extremely computationally expensive if we ran EVERY check,
yet we rely on Substrate for execution (and according checks), which are
limited to just the actual import function.
Since we're calling this code from many places, it makes sense for it to
be consolidated under TendermintImport.
* BlockImport, JustificationImport, Verifier, and import_queue function
* Update consensus/lib.rs from PoW to Tendermint
Not possible to be used as the previous consensus could. It will not
produce blocks nor does it currenly even instantiate a machine. This is
just he next step.
* Update Cargo.tomls for substrate packages
* Tendermint SelectChain
This is incompatible with Substrate's expectations, yet should be valid
for ours
* Move the node over to the new SelectChain
* Minor tweaks
* Update SelectChain documentation
* Remove substrate/node lib.rs
This shouldn't be used as a library AFAIK. While runtime should be, and
arguably should even be published, I have yet to see node in the same
way. Helps tighten API boundaries.
* Remove unused macro_use
* Replace panicking todos with stubs and // TODO
Enables progress.
* Reduce chain_spec and use more accurate naming
* Implement block proposal logic
* Modularize to get_proposal
* Trigger block importing
Doesn't wait for the response yet, which it needs to.
* Get the result of block importing
* Split import_queue into a series of files
* Provide a way to create the machine
The BasicQueue returned obscures the TendermintImport struct.
Accordingly, a Future scoped with access is returned upwards, which when
awaited will create the machine. This makes creating the machine
optional while maintaining scope boundaries.
Is sufficient to create a 1-node net which produces and finalizes
blocks.
* Don't import justifications multiple times
Also don't broadcast blocks which were solely proposed.
* Correct justication import pipeline
Removes JustificationImport as it should never be used.
* Announce blocks
By claiming File, they're not sent ovber the P2P network before they
have a justification, as desired. Unfortunately, they never were. This
works around that.
* Add an assert to verify proposed children aren't best
* Consolidate C and I generics into a TendermintClient trait alias
* Expand sanity checks
Substrate doesn't expect nor officially support children with less work
than their parents. It's a trick used here. Accordingly, ensure the
trick's validity.
* When resetting, use the end time of the round which was committed to
The machine reset to the end time of the current round. For a delayed
network connection, a machine may move ahead in rounds and only later
realize a prior round succeeded. Despite acknowledging that round's
success, it would maintain its delay when moving to the next block,
bricking it.
Done by tracking the end time for each round as they occur.
* Move Commit from including the round to including the round's end_time
The round was usable to build the current clock in an accumulated
fashion, relative to the previous round. The end time is the absolute
metric of it, which can be used to calculate the round number (with all
previous end times).
Substrate now builds off the best block, not genesis, using the end time
included in the justification to start its machine in a synchronized
state.
Knowing the end time of a round, or the round in which block was
committed to, is necessary for nodes to sync up with Tendermint.
Encoding it in the commit ensures it's long lasting and makes it readily
available, without the load of an entire transaction.
* Add a TODO on Tendermint
* Misc bug fixes
* More misc bug fixes
* Clean up lock acquisition
* Merge weights and signing scheme into validators, documenting needed changes
* Add pallet sessions to runtime, create pallet-tendermint
* Update node to use pallet sessions
* Update support URL
* Partial work on correcting pallet calls
* Redo Tendermint folder structure
* TendermintApi, compilation fixes
* Fix the stub round robin
At some point, the modulus was removed causing it to exceed the
validators list and stop proposing.
* Use the validators list from the session pallet
* Basic Gossip Validator
* Correct Substrate Tendermint start block
The Tendermint machine uses the passed in number as the block's being
worked on number. Substrate passed in the already finalized block's
number.
Also updates misc comments.
* Clean generics in Tendermint with a monolith with associated types
* Remove the Future triggering the machine for an async fn
Enables passing data in, such as the network.
* Move TendermintMachine from start_num, time to last_num, time
Provides an explicitly clear API clearer to program around.
Also adds additional time code to handle an edge case.
* Connect the Tendermint machine to a GossipEngine
* Connect broadcast
* Remove machine from TendermintImport
It's not used there at all.
* Merge Verifier into block_import.rs
These two files were largely the same, just hooking into sync structs
with almost identical imports. As this project shapes up, removing dead
weight is appreciated.
* Create a dedicated file for being a Tendermint authority
* Deleted comment code related to PoW
* Move serai_runtime specific code from tendermint/client to node
Renames serai-consensus to sc_tendermint
* Consolidate file structure in sc_tendermint
* Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in
general.
* Consolidate references to sr25519 in sc_tendermint
* Add documentation to public structs/functions in sc_tendermint
* Add another missing comment
* Make sign asynchronous
Some relation to https://github.com/serai-dex/serai/issues/95.
* Move sc_tendermint to async sign
* Implement proper checking of inherents
* Take in a Keystore and validator ID
* Remove unnecessary PhantomDatas
* Update node to latest sc_tendermint
* Configure node for a multi-node testnet
* Fix handling of the GossipEngine
* Use a rounded genesis to obtain sufficient synchrony within the Docker env
* Correct Serai d-f names in Docker
* Remove an attempt at caching I don't believe would ever hit
* Add an already in chain check to block import
While the inner should do this for us, we call verify_order on our end
*before* inner to ensure sequential import. Accordingly, we need to
provide our own check.
Removes errors of "non-sequential import" when trying to re-import an
existing block.
* Update the consensus documentation
It was incredibly out of date.
* Add a _ to the validator arg in slash
* Make the dev profile a local testnet profile
Restores a dev profile which only has one validator, locally running.
* Reduce Arcs in TendermintMachine, split Signer from SignatureScheme
* Update sc_tendermint per previous commit
* Restore cache
* Remove error case which shouldn't be an error
* Stop returning errors on already existing blocks entirely
* Correct Dave, Eve, and Ferdie to not run as validators
* Rename dev to devnet
--dev still works thanks to the |. Acheieves a personal preference of
mine with some historical meaning.
* Add message expiry to the Tendermint gossip
* Localize the LibP2P protocol to the blockchain
Follows convention by doing so. Theoretically enables running multiple
blockchains over a single LibP2P connection.
* Add a version to sp-runtime in tendermint-machine
* Add missing trait
* Bump Substrate dependency
Fixes #147.
* Implement Schnorr half-aggregation from https://eprint.iacr.org/2021/350.pdf
Relevant to https://github.com/serai-dex/serai/issues/99.
* cargo update (tendermint)
* Move from polling loops to a pure IO model for sc_tendermint's gossip
* Correct protocol name handling
* Use futures mpsc instead of tokio
* Timeout futures
* Move from a yielding loop to select in tendermint-machine
* Update Substrate to the new TendermintHandle
* Use futures pin instead of tokio
* Only recheck blocks with non-fatal inherent transaction errors
* Update to the latest substrate
* Separate the block processing time from the latency
* Add notes to the runtime
* Don't spam slash
Also adds a slash condition of failing to propose.
* Support running TendermintMachine when not a validator
This supports validators who leave the current set, without crashing
their nodes, along with nodes trying to become validators (who will now
seamlessly transition in).
* Properly define and pass around the block size
* Correct the Duration timing
The proposer will build it, send it, then process it (on the first
round). Accordingly, it's / 3, not / 2, as / 2 only accounted for the
latter events.
* Correct time-adjustment code on round skip
* Have the machine respond to advances made by an external sync loop
* Clean up time code in tendermint-machine
* BlockData and RoundData structs
* Rename Round to RoundNumber
* Move BlockData to a new file
* Move Round to an Option due to the pseudo-uninitialized state we create
Before the addition of RoundData, we always created the round, and on
.round(0), simply created it again. With RoundData, and the changes to
the time code, we used round 0, time 0, the latter being incorrect yet
not an issue due to lack of misuse.
Now, if we do misuse it, it'll panic.
* Clear the Queue instead of draining and filtering
There shouldn't ever be a message which passes the filter under the
current design.
* BlockData::new
* Move more code into block.rs
Introduces type-aliases to obtain Data/Message/SignedMessage solely from
a Network object.
Fixes a bug regarding stepping when you're not an active validator.
* Have verify_precommit_signature return if it verified the signature
Also fixes a bug where invalid precommit signatures were left standing
and therefore contributing to commits.
* Remove the precommit signature hash
It cached signatures per-block. Precommit signatures are bound to each
round. This would lead to forming invalid commits when a commit should
be formed. Under debug, the machine would catch that and panic. On
release, it'd have everyone who wasn't a validator fail to continue
syncing.
* Slight doc changes
Also flattens the message handling function by replacing an if
containing all following code in the function with an early return for
the else case.
* Always produce notifications for finalized blocks via origin overrides
* Correct weird formatting
* Update to the latest tendermint-machine
* Manually step the Tendermint machine when we synced a block over the network
* Ignore finality notifications for old blocks
* Remove a TODO resolved in 8c51bc011d03c8d54ded05011e7f4d1a01e9f873
* Add a TODO comment to slash
Enables searching for the case-sensitive phrase and finding it.
* cargo fmt
* Use a tmp DB for Serai in Docker
* Remove panic on slash
As we move towards protonet, this can happen (if a node goes offline),
yet it happening brings down the entire net right now.
* Add log::error on slash
* created shared volume between containers
* Complete the sh scripts
* Pass in the genesis time to Substrate
* Correct block announcements
They were announced, yet not marked best.
* Correct pupulate_end_time
It was used as inclusive yet didn't work inclusively.
* Correct gossip channel jumping when a block is synced via Substrate
* Use a looser check in import_future
This triggered so it needs to be accordingly relaxed.
* Correct race conditions between add_block and step
Also corrects a <= to <.
* Update cargo deny
* rename genesis-service to genesis
* Update Cargo.lock
* Correct runtime Cargo.toml whitespace
* Correct typo
* Document recheck
* Misc lints
* Fix prev commit
* Resolve low-hanging review comments
* Mark genesis/entry-dev.sh as executable
* Prevent a commit from including the same signature multiple times
Yanks tendermint-machine 0.1.0 accordingly.
* Update to latest nightly clippy
* Improve documentation
* Use clearer variable names
* Add log statements
* Pair more log statements
* Clean TendermintAuthority::authority as possible
Merges it into new. It has way too many arguments, yet there's no clear path at
consolidation there, unfortunately.
Additionally provides better scoping within itself.
* Fix #158
Doesn't use lock_import_and_run for reasons commented (lack of async).
* Rename guard to lock
* Have the devnet use the current time as the genesis
Possible since it's only a single node, not requiring synchronization.
* Fix gossiping
I really don't know what side effect this avoids and I can't say I care at this
point.
* Misc lints
Co-authored-by: vrx00 <vrx00@proton.me>
Co-authored-by: TheArchitect108 <TheArchitect108@protonmail.com>
2022-12-03 23:38:02 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "pallet-timestamp"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"frame-benchmarking",
|
|
|
|
"frame-support",
|
|
|
|
"frame-system",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"sp-inherents",
|
|
|
|
"sp-io",
|
|
|
|
"sp-runtime",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-timestamp",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pallet-transaction-payment"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"frame-support",
|
|
|
|
"frame-system",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"serde",
|
|
|
|
"sp-core",
|
|
|
|
"sp-io",
|
|
|
|
"sp-runtime",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pallet-transaction-payment-rpc"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"jsonrpsee",
|
|
|
|
"pallet-transaction-payment-rpc-runtime-api",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"sp-api",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-core",
|
|
|
|
"sp-rpc",
|
|
|
|
"sp-runtime",
|
2022-11-11 04:59:20 +00:00
|
|
|
"sp-weights",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pallet-transaction-payment-rpc-runtime-api"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"pallet-transaction-payment",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"sp-api",
|
|
|
|
"sp-runtime",
|
2022-11-11 04:59:20 +00:00
|
|
|
"sp-weights",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "parity-db"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.4.8"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "4890dcb9556136a4ec2b0c51fa4a08c8b733b829506af8fff2e853f3a065985b"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-11-11 04:59:20 +00:00
|
|
|
"blake2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"crc32fast",
|
|
|
|
"fs2",
|
|
|
|
"hex",
|
|
|
|
"libc",
|
|
|
|
"log",
|
|
|
|
"lz4",
|
2022-09-18 19:30:38 +00:00
|
|
|
"memmap2",
|
|
|
|
"parking_lot 0.12.1",
|
2022-07-16 21:49:35 +00:00
|
|
|
"rand 0.8.5",
|
2023-03-06 12:39:43 +00:00
|
|
|
"siphasher",
|
2022-07-16 21:49:35 +00:00
|
|
|
"snap",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "parity-scale-codec"
|
2023-07-02 00:27:03 +00:00
|
|
|
version = "3.6.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-07-02 00:27:03 +00:00
|
|
|
checksum = "d7467bc45fea3d77e829a4df331b9e969e2ec6a4dcd4e126e660f8509b40a475"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"arrayvec",
|
2022-07-16 21:49:35 +00:00
|
|
|
"bitvec 1.0.1",
|
|
|
|
"byte-slice-cast",
|
2022-09-29 18:33:09 +00:00
|
|
|
"bytes",
|
2022-07-16 21:49:35 +00:00
|
|
|
"impl-trait-for-tuples",
|
|
|
|
"parity-scale-codec-derive",
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "parity-scale-codec-derive"
|
2023-07-02 00:27:03 +00:00
|
|
|
version = "3.6.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-07-02 00:27:03 +00:00
|
|
|
checksum = "2c9de611934c78014c455793552d0bf7d65a58211179c49996fde925aa667c38"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-12-07 23:05:06 +00:00
|
|
|
"proc-macro-crate",
|
2022-07-16 21:49:35 +00:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "parity-send-wrapper"
|
|
|
|
version = "0.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "parity-wasm"
|
2022-09-29 18:33:09 +00:00
|
|
|
version = "0.45.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-09-29 18:33:09 +00:00
|
|
|
checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "parking"
|
2023-04-08 08:44:28 +00:00
|
|
|
version = "2.1.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-08 08:44:28 +00:00
|
|
|
checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "parking_lot"
|
|
|
|
version = "0.11.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
|
|
|
|
dependencies = [
|
|
|
|
"instant",
|
|
|
|
"lock_api",
|
2022-12-21 04:12:26 +00:00
|
|
|
"parking_lot_core 0.8.6",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "parking_lot"
|
|
|
|
version = "0.12.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
|
|
|
|
dependencies = [
|
|
|
|
"lock_api",
|
2023-06-22 10:25:30 +00:00
|
|
|
"parking_lot_core 0.9.8",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "parking_lot_core"
|
2022-12-21 04:12:26 +00:00
|
|
|
version = "0.8.6"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-21 04:12:26 +00:00
|
|
|
checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"instant",
|
|
|
|
"libc",
|
2023-03-31 06:34:52 +00:00
|
|
|
"redox_syscall 0.2.16",
|
2022-07-16 21:49:35 +00:00
|
|
|
"smallvec",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "parking_lot_core"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.9.8"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"libc",
|
2023-06-22 10:25:30 +00:00
|
|
|
"redox_syscall 0.3.5",
|
2022-07-16 21:49:35 +00:00
|
|
|
"smallvec",
|
2023-06-28 19:04:48 +00:00
|
|
|
"windows-targets 0.48.1",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-06-28 18:57:58 +00:00
|
|
|
[[package]]
|
|
|
|
name = "partial_sort"
|
|
|
|
version = "0.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "password-hash"
|
|
|
|
version = "0.4.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700"
|
|
|
|
dependencies = [
|
|
|
|
"base64ct",
|
2022-09-18 19:30:38 +00:00
|
|
|
"rand_core 0.6.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
2023-03-28 08:38:01 +00:00
|
|
|
[[package]]
|
|
|
|
name = "pasta_curves"
|
|
|
|
version = "0.5.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d3e57598f73cc7e1b2ac63c79c517b31a0877cd7c402cdcaa311b5208de7a095"
|
|
|
|
dependencies = [
|
|
|
|
"blake2b_simd",
|
|
|
|
"ff 0.13.0",
|
|
|
|
"group 0.13.0",
|
|
|
|
"lazy_static",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"static_assertions",
|
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "paste"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "1.0.12"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "path-slash"
|
2022-08-16 07:44:32 +00:00
|
|
|
version = "0.2.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-08-16 07:44:32 +00:00
|
|
|
checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pbkdf2"
|
|
|
|
version = "0.11.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917"
|
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
"hmac 0.12.1",
|
2022-12-07 23:05:06 +00:00
|
|
|
"password-hash",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-03-25 04:45:33 +00:00
|
|
|
[[package]]
|
|
|
|
name = "pbkdf2"
|
|
|
|
version = "0.12.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f0ca0b5a68607598bf3bad68f32227a8164f6254833f84eafaac409cd6746c31"
|
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2023-03-25 04:45:33 +00:00
|
|
|
"hmac 0.12.1",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "peeking_take_while"
|
|
|
|
version = "0.1.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "pem"
|
|
|
|
version = "1.1.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8"
|
|
|
|
dependencies = [
|
|
|
|
"base64 0.13.1",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pem-rfc7468"
|
|
|
|
version = "0.6.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "24d159833a9105500e0398934e205e0773f0b27529557134ecfc51c27646adac"
|
|
|
|
dependencies = [
|
|
|
|
"base64ct",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "percent-encoding"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.3.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pest"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.7.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "f73935e4d55e2abf7f130186537b19e7a4abc886a0252380b59248af473a3fc9"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-08-16 07:44:32 +00:00
|
|
|
"thiserror",
|
2022-07-16 21:49:35 +00:00
|
|
|
"ucd-trie",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pest_derive"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.7.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "aef623c9bbfa0eedf5a0efba11a5ee83209c326653ca31ff019bec3a95bfff2b"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"pest",
|
|
|
|
"pest_generator",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pest_generator"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.7.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "b3e8cba4ec22bada7fc55ffe51e2deb6a0e0db2d0b7ab0b103acc80d2510c190"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"pest",
|
|
|
|
"pest_meta",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pest_meta"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.7.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "a01f71cb40bd8bb94232df14b946909e14660e33fc05db3e50ae2a82d7ea0ca0"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-08-16 07:44:32 +00:00
|
|
|
"once_cell",
|
2022-07-16 21:49:35 +00:00
|
|
|
"pest",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "petgraph"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.6.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"fixedbitset",
|
2023-06-28 18:57:58 +00:00
|
|
|
"indexmap 1.9.3",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pharos"
|
|
|
|
version = "0.5.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414"
|
|
|
|
dependencies = [
|
|
|
|
"futures",
|
2023-01-05 03:52:41 +00:00
|
|
|
"rustc_version",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "phf"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.11.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"phf_macros",
|
2023-06-28 18:57:58 +00:00
|
|
|
"phf_shared 0.11.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "phf_generator"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.11.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"phf_shared 0.11.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"rand 0.8.5",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "phf_macros"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.11.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"phf_generator",
|
2023-06-28 18:57:58 +00:00
|
|
|
"phf_shared 0.11.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "phf_shared"
|
|
|
|
version = "0.10.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
|
|
|
|
dependencies = [
|
|
|
|
"siphasher",
|
|
|
|
]
|
|
|
|
|
2023-03-17 00:16:57 +00:00
|
|
|
[[package]]
|
|
|
|
name = "phf_shared"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.11.2"
|
2023-03-17 00:16:57 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b"
|
2023-03-17 00:16:57 +00:00
|
|
|
dependencies = [
|
|
|
|
"siphasher",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "pin-project"
|
2023-07-02 00:27:03 +00:00
|
|
|
version = "1.1.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-07-02 00:27:03 +00:00
|
|
|
checksum = "6e138fdd8263907a2b0e1b4e80b7e58c721126479b6e6eedfb1b402acea7b9bd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"pin-project-internal",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pin-project-internal"
|
2023-07-02 00:27:03 +00:00
|
|
|
version = "1.1.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-07-02 00:27:03 +00:00
|
|
|
checksum = "d1fef411b303e3e12d534fb6e7852de82da56edd937d895125821fb7c09436c7"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pin-project-lite"
|
|
|
|
version = "0.1.12"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pin-project-lite"
|
|
|
|
version = "0.2.9"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pin-utils"
|
|
|
|
version = "0.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pkcs8"
|
|
|
|
version = "0.9.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba"
|
|
|
|
dependencies = [
|
2023-03-25 04:45:33 +00:00
|
|
|
"der 0.6.1",
|
|
|
|
"spki 0.6.0",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pkcs8"
|
2023-04-08 08:44:28 +00:00
|
|
|
version = "0.10.2"
|
2023-03-25 04:45:33 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-08 08:44:28 +00:00
|
|
|
checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7"
|
2023-03-25 04:45:33 +00:00
|
|
|
dependencies = [
|
2023-07-02 00:27:03 +00:00
|
|
|
"der 0.7.7",
|
2023-05-10 11:34:07 +00:00
|
|
|
"spki 0.7.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pkg-config"
|
2023-05-10 11:34:07 +00:00
|
|
|
version = "0.3.27"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-10 11:34:07 +00:00
|
|
|
checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
2022-12-21 04:12:26 +00:00
|
|
|
[[package]]
|
|
|
|
name = "platforms"
|
|
|
|
version = "3.0.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "polling"
|
2023-04-23 23:21:24 +00:00
|
|
|
version = "2.8.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-23 23:21:24 +00:00
|
|
|
checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-09-18 19:30:38 +00:00
|
|
|
"autocfg",
|
2023-06-28 18:57:58 +00:00
|
|
|
"bitflags 1.3.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"cfg-if",
|
2023-03-11 09:49:05 +00:00
|
|
|
"concurrent-queue",
|
2022-07-16 21:49:35 +00:00
|
|
|
"libc",
|
|
|
|
"log",
|
2023-03-11 09:49:05 +00:00
|
|
|
"pin-project-lite 0.2.9",
|
2023-04-08 08:44:28 +00:00
|
|
|
"windows-sys 0.48.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "poly1305"
|
|
|
|
version = "0.7.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede"
|
|
|
|
dependencies = [
|
|
|
|
"cpufeatures",
|
2023-04-08 08:44:28 +00:00
|
|
|
"opaque-debug",
|
2023-03-06 12:39:43 +00:00
|
|
|
"universal-hash 0.4.1",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "polyval"
|
|
|
|
version = "0.5.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"cpufeatures",
|
2023-04-08 08:44:28 +00:00
|
|
|
"opaque-debug",
|
2023-03-06 12:39:43 +00:00
|
|
|
"universal-hash 0.4.1",
|
2023-01-16 15:42:31 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "polyval"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.6.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"cpufeatures",
|
2023-04-08 08:44:28 +00:00
|
|
|
"opaque-debug",
|
2023-06-22 10:25:30 +00:00
|
|
|
"universal-hash 0.5.1",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ppv-lite86"
|
2022-11-11 04:59:20 +00:00
|
|
|
version = "0.2.17"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-11-11 04:59:20 +00:00
|
|
|
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "precomputed-hash"
|
|
|
|
version = "0.1.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
|
|
|
|
|
2022-10-20 05:05:36 +00:00
|
|
|
[[package]]
|
|
|
|
name = "predicates"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "2.1.5"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-04 08:17:36 +00:00
|
|
|
checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd"
|
2022-10-20 05:05:36 +00:00
|
|
|
dependencies = [
|
|
|
|
"difflib",
|
|
|
|
"float-cmp",
|
|
|
|
"itertools",
|
|
|
|
"normalize-line-endings",
|
|
|
|
"predicates-core",
|
|
|
|
"regex",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "predicates-core"
|
2023-03-16 23:37:32 +00:00
|
|
|
version = "1.0.6"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-16 23:37:32 +00:00
|
|
|
checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174"
|
2022-10-20 05:05:36 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "predicates-tree"
|
2023-03-16 23:37:32 +00:00
|
|
|
version = "1.0.9"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-16 23:37:32 +00:00
|
|
|
checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf"
|
2022-10-20 05:05:36 +00:00
|
|
|
dependencies = [
|
|
|
|
"predicates-core",
|
|
|
|
"termtree",
|
|
|
|
]
|
|
|
|
|
2022-11-11 04:59:20 +00:00
|
|
|
[[package]]
|
|
|
|
name = "prettyplease"
|
2023-03-16 23:37:32 +00:00
|
|
|
version = "0.1.25"
|
2022-11-11 04:59:20 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-16 23:37:32 +00:00
|
|
|
checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86"
|
2022-11-11 04:59:20 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-11-11 04:59:20 +00:00
|
|
|
]
|
|
|
|
|
2023-04-14 01:05:18 +00:00
|
|
|
[[package]]
|
|
|
|
name = "prettyplease"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.2.9"
|
2023-04-14 01:05:18 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "9825a04601d60621feed79c4e6b56d65db77cdca55cef43b46b0de1096d1c282"
|
2023-04-14 01:05:18 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2023-04-14 01:05:18 +00:00
|
|
|
]
|
|
|
|
|
2023-03-06 13:22:04 +00:00
|
|
|
[[package]]
|
|
|
|
name = "primeorder"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.13.2"
|
2023-04-11 13:23:54 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "3c2fcef82c0ec6eefcc179b978446c399b3cdf73c392c35604e399eee6df1ee3"
|
2023-03-06 13:22:04 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"elliptic-curve 0.13.5",
|
2023-03-06 13:22:04 +00:00
|
|
|
]
|
|
|
|
|
2022-10-20 05:05:36 +00:00
|
|
|
[[package]]
|
|
|
|
name = "primitive-types"
|
2022-11-04 12:07:37 +00:00
|
|
|
version = "0.12.1"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-11-04 12:07:37 +00:00
|
|
|
checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66"
|
2022-10-20 05:05:36 +00:00
|
|
|
dependencies = [
|
2023-01-17 07:35:22 +00:00
|
|
|
"fixed-hash 0.8.0",
|
2022-10-20 05:05:36 +00:00
|
|
|
"impl-codec",
|
2022-12-07 23:05:06 +00:00
|
|
|
"impl-rlp",
|
2023-01-05 03:52:41 +00:00
|
|
|
"impl-serde",
|
2022-07-16 21:49:35 +00:00
|
|
|
"scale-info",
|
|
|
|
"uint",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "proc-macro-crate"
|
2023-05-01 07:17:37 +00:00
|
|
|
version = "1.1.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-01 07:17:37 +00:00
|
|
|
checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-05-01 07:17:37 +00:00
|
|
|
"thiserror",
|
|
|
|
"toml 0.5.11",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "proc-macro-error"
|
|
|
|
version = "1.0.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro-error-attr",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-07-16 21:49:35 +00:00
|
|
|
"version_check",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "proc-macro-error-attr"
|
|
|
|
version = "1.0.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"version_check",
|
|
|
|
]
|
|
|
|
|
2023-05-01 07:17:37 +00:00
|
|
|
[[package]]
|
|
|
|
name = "proc-macro-warning"
|
|
|
|
version = "0.3.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0e99670bafb56b9a106419397343bdbc8b8742c3cc449fec6345f86173f47cd4"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2023-05-01 07:17:37 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "proc-macro2"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "1.0.63"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"unicode-ident",
|
|
|
|
]
|
|
|
|
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
[[package]]
|
|
|
|
name = "processor"
|
|
|
|
version = "0.1.0"
|
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"bincode",
|
|
|
|
"bitcoin-serai",
|
|
|
|
"dalek-ff-group",
|
|
|
|
"env_logger",
|
|
|
|
"flexible-transcript",
|
2023-04-10 15:11:46 +00:00
|
|
|
"frost-schnorrkel",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"futures",
|
2023-03-28 08:38:01 +00:00
|
|
|
"group 0.13.0",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"hex",
|
2023-03-28 08:38:01 +00:00
|
|
|
"k256",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"lazy_static",
|
|
|
|
"log",
|
|
|
|
"modular-frost",
|
|
|
|
"monero-serai",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"processor-messages",
|
|
|
|
"rand_chacha 0.3.1",
|
|
|
|
"rand_core 0.6.4",
|
|
|
|
"secp256k1",
|
|
|
|
"serai-client",
|
2023-04-14 15:41:01 +00:00
|
|
|
"serai-db",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"serde",
|
|
|
|
"serde_json",
|
2023-04-10 06:51:15 +00:00
|
|
|
"sp-application-crypto",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "processor-messages"
|
|
|
|
version = "0.1.0"
|
|
|
|
dependencies = [
|
2023-04-25 06:36:20 +00:00
|
|
|
"bincode",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"dkg",
|
|
|
|
"in-instructions-primitives",
|
|
|
|
"serai-primitives",
|
|
|
|
"serde",
|
|
|
|
"tokens-primitives",
|
|
|
|
"validator-sets-primitives",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "prometheus"
|
2022-10-22 01:40:50 +00:00
|
|
|
version = "0.13.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-10-22 01:40:50 +00:00
|
|
|
checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"fnv",
|
|
|
|
"lazy_static",
|
|
|
|
"memchr",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "prometheus-client"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.19.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "5d6fa99d535dd930d1249e6c79cb3c2915f9172a540fe2b02a4c8f9ca954721e"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"dtoa",
|
2022-10-20 05:05:36 +00:00
|
|
|
"itoa",
|
|
|
|
"parking_lot 0.12.1",
|
2023-06-28 18:57:58 +00:00
|
|
|
"prometheus-client-derive-encode",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2023-06-28 18:57:58 +00:00
|
|
|
name = "prometheus-client-derive-encode"
|
|
|
|
version = "0.4.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "72b6a5217beb0ad503ee7fa752d451c905113d70721b937126158f3106a48cc1"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2022-09-29 18:33:09 +00:00
|
|
|
[[package]]
|
|
|
|
name = "prost"
|
2023-04-14 01:05:18 +00:00
|
|
|
version = "0.11.9"
|
2022-09-29 18:33:09 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-14 01:05:18 +00:00
|
|
|
checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd"
|
2022-09-29 18:33:09 +00:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
2022-10-20 05:05:36 +00:00
|
|
|
"prost-derive",
|
2022-09-29 18:33:09 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "prost-build"
|
2023-04-14 01:05:18 +00:00
|
|
|
version = "0.11.9"
|
2022-09-29 18:33:09 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-14 01:05:18 +00:00
|
|
|
checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270"
|
2022-09-29 18:33:09 +00:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
2023-03-06 12:39:43 +00:00
|
|
|
"heck 0.4.1",
|
2022-09-29 18:33:09 +00:00
|
|
|
"itertools",
|
|
|
|
"lazy_static",
|
|
|
|
"log",
|
|
|
|
"multimap",
|
|
|
|
"petgraph",
|
2023-04-14 01:05:18 +00:00
|
|
|
"prettyplease 0.1.25",
|
2022-10-20 05:05:36 +00:00
|
|
|
"prost",
|
|
|
|
"prost-types",
|
2022-07-16 21:49:35 +00:00
|
|
|
"regex",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-07-16 21:49:35 +00:00
|
|
|
"tempfile",
|
|
|
|
"which",
|
|
|
|
]
|
|
|
|
|
2022-09-29 18:33:09 +00:00
|
|
|
[[package]]
|
|
|
|
name = "prost-derive"
|
2023-04-14 01:05:18 +00:00
|
|
|
version = "0.11.9"
|
2022-09-29 18:33:09 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-14 01:05:18 +00:00
|
|
|
checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4"
|
2022-09-29 18:33:09 +00:00
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"itertools",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-09-29 18:33:09 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "prost-types"
|
2023-04-14 01:05:18 +00:00
|
|
|
version = "0.11.9"
|
2022-09-29 18:33:09 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-14 01:05:18 +00:00
|
|
|
checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13"
|
2022-09-29 18:33:09 +00:00
|
|
|
dependencies = [
|
2022-10-20 05:05:36 +00:00
|
|
|
"prost",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "psm"
|
2022-09-29 18:33:09 +00:00
|
|
|
version = "0.1.21"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-09-29 18:33:09 +00:00
|
|
|
checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "quick-error"
|
|
|
|
version = "1.2.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
|
|
|
|
|
2023-03-16 23:37:32 +00:00
|
|
|
[[package]]
|
|
|
|
name = "quick-protobuf"
|
|
|
|
version = "0.8.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f"
|
|
|
|
dependencies = [
|
|
|
|
"byteorder",
|
|
|
|
]
|
|
|
|
|
2023-06-28 18:57:58 +00:00
|
|
|
[[package]]
|
|
|
|
name = "quick-protobuf-codec"
|
|
|
|
version = "0.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1693116345026436eb2f10b677806169c1a1260c1c60eaaffe3fb5a29ae23d8b"
|
|
|
|
dependencies = [
|
|
|
|
"asynchronous-codec",
|
|
|
|
"bytes",
|
|
|
|
"quick-protobuf",
|
|
|
|
"thiserror",
|
|
|
|
"unsigned-varint",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "quicksink"
|
|
|
|
version = "0.1.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "77de3c815e5a160b1539c6592796801df2043ae35e123b46d73380cfa57af858"
|
|
|
|
dependencies = [
|
|
|
|
"futures-core",
|
|
|
|
"futures-sink",
|
|
|
|
"pin-project-lite 0.1.12",
|
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "quinn-proto"
|
2023-03-31 06:34:52 +00:00
|
|
|
version = "0.9.3"
|
2023-01-16 15:42:31 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-31 06:34:52 +00:00
|
|
|
checksum = "67c10f662eee9c94ddd7135043e544f3c82fa839a1e7b865911331961b53186c"
|
2023-01-16 15:42:31 +00:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"ring",
|
|
|
|
"rustc-hash",
|
|
|
|
"rustls 0.20.8",
|
|
|
|
"slab",
|
|
|
|
"thiserror",
|
|
|
|
"tinyvec",
|
|
|
|
"tracing",
|
|
|
|
"webpki 0.22.0",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "quote"
|
2023-07-02 00:27:03 +00:00
|
|
|
version = "1.0.29"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-07-02 00:27:03 +00:00
|
|
|
checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "radium"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "radium"
|
|
|
|
version = "0.7.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rand"
|
|
|
|
version = "0.7.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
|
|
|
|
dependencies = [
|
|
|
|
"getrandom 0.1.16",
|
|
|
|
"libc",
|
|
|
|
"rand_chacha 0.2.2",
|
|
|
|
"rand_core 0.5.1",
|
|
|
|
"rand_hc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rand"
|
|
|
|
version = "0.8.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"rand_chacha 0.3.1",
|
2022-09-18 19:30:38 +00:00
|
|
|
"rand_core 0.6.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rand_chacha"
|
|
|
|
version = "0.2.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
|
|
|
|
dependencies = [
|
|
|
|
"ppv-lite86",
|
|
|
|
"rand_core 0.5.1",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rand_chacha"
|
|
|
|
version = "0.3.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
|
|
|
|
dependencies = [
|
|
|
|
"ppv-lite86",
|
2022-09-18 19:30:38 +00:00
|
|
|
"rand_core 0.6.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rand_core"
|
|
|
|
version = "0.5.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
|
|
|
|
dependencies = [
|
|
|
|
"getrandom 0.1.16",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rand_core"
|
2022-09-18 19:30:38 +00:00
|
|
|
version = "0.6.4"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-09-18 19:30:38 +00:00
|
|
|
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"getrandom 0.2.10",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rand_distr"
|
|
|
|
version = "0.4.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31"
|
|
|
|
dependencies = [
|
|
|
|
"num-traits",
|
|
|
|
"rand 0.8.5",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rand_hc"
|
|
|
|
version = "0.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
|
|
|
|
dependencies = [
|
|
|
|
"rand_core 0.5.1",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rand_pcg"
|
|
|
|
version = "0.3.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e"
|
|
|
|
dependencies = [
|
2022-09-18 19:30:38 +00:00
|
|
|
"rand_core 0.6.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rawpointer"
|
|
|
|
version = "0.2.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rayon"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "1.7.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"either",
|
|
|
|
"rayon-core",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rayon-core"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "1.11.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"crossbeam-channel",
|
|
|
|
"crossbeam-deque",
|
|
|
|
"crossbeam-utils",
|
|
|
|
"num_cpus",
|
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "rcgen"
|
|
|
|
version = "0.9.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd"
|
|
|
|
dependencies = [
|
|
|
|
"pem",
|
|
|
|
"ring",
|
2023-06-22 10:25:30 +00:00
|
|
|
"time 0.3.22",
|
2023-01-16 15:42:31 +00:00
|
|
|
"x509-parser 0.13.2",
|
|
|
|
"yasna",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rcgen"
|
|
|
|
version = "0.10.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b"
|
|
|
|
dependencies = [
|
|
|
|
"pem",
|
|
|
|
"ring",
|
2023-06-22 10:25:30 +00:00
|
|
|
"time 0.3.22",
|
2023-01-16 15:42:31 +00:00
|
|
|
"yasna",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "redox_syscall"
|
2022-08-16 07:44:32 +00:00
|
|
|
version = "0.2.16"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-08-16 07:44:32 +00:00
|
|
|
checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"bitflags 1.3.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-03-31 06:34:52 +00:00
|
|
|
[[package]]
|
|
|
|
name = "redox_syscall"
|
|
|
|
version = "0.3.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
|
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"bitflags 1.3.2",
|
2023-03-31 06:34:52 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "redox_users"
|
|
|
|
version = "0.4.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
|
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"getrandom 0.2.10",
|
2023-03-31 06:34:52 +00:00
|
|
|
"redox_syscall 0.2.16",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ref-cast"
|
2023-03-25 04:45:33 +00:00
|
|
|
version = "1.0.16"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-25 04:45:33 +00:00
|
|
|
checksum = "f43faa91b1c8b36841ee70e97188a869d37ae21759da6846d4be66de5bf7b12c"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"ref-cast-impl",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ref-cast-impl"
|
2023-03-25 04:45:33 +00:00
|
|
|
version = "1.0.16"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-25 04:45:33 +00:00
|
|
|
checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "regalloc2"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.6.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "80535183cae11b149d618fbd3c37e38d7cda589d82d7769e196ca9a9042d7621"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"fxhash",
|
|
|
|
"log",
|
|
|
|
"slice-group-by",
|
|
|
|
"smallvec",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "regex"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "1.8.4"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"aho-corasick 1.0.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"memchr",
|
2023-06-22 10:25:30 +00:00
|
|
|
"regex-syntax 0.7.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "regex-automata"
|
|
|
|
version = "0.1.10"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
|
|
|
|
dependencies = [
|
2023-04-23 23:21:24 +00:00
|
|
|
"regex-syntax 0.6.29",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "regex-syntax"
|
2023-03-25 04:45:33 +00:00
|
|
|
version = "0.6.29"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-25 04:45:33 +00:00
|
|
|
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
2023-04-23 23:21:24 +00:00
|
|
|
[[package]]
|
|
|
|
name = "regex-syntax"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.7.2"
|
2023-04-23 23:21:24 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78"
|
2023-04-23 23:21:24 +00:00
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "reqwest"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.11.18"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"base64 0.21.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"bytes",
|
|
|
|
"encoding_rs",
|
|
|
|
"futures-core",
|
|
|
|
"futures-util",
|
|
|
|
"h2",
|
|
|
|
"http",
|
|
|
|
"http-body",
|
|
|
|
"hyper",
|
2023-06-22 10:25:30 +00:00
|
|
|
"hyper-rustls 0.24.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"hyper-tls",
|
|
|
|
"ipnet",
|
|
|
|
"js-sys",
|
|
|
|
"log",
|
|
|
|
"mime",
|
|
|
|
"native-tls",
|
2022-09-29 18:33:09 +00:00
|
|
|
"once_cell",
|
2022-07-16 21:49:35 +00:00
|
|
|
"percent-encoding",
|
|
|
|
"pin-project-lite 0.2.9",
|
2023-06-22 10:25:30 +00:00
|
|
|
"rustls 0.21.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"rustls-pemfile",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"serde_urlencoded",
|
|
|
|
"tokio",
|
|
|
|
"tokio-native-tls",
|
2023-06-22 10:25:30 +00:00
|
|
|
"tokio-rustls 0.24.1",
|
2023-01-17 07:35:22 +00:00
|
|
|
"tokio-socks",
|
2022-07-16 21:49:35 +00:00
|
|
|
"tower-service",
|
|
|
|
"url",
|
|
|
|
"wasm-bindgen",
|
|
|
|
"wasm-bindgen-futures",
|
|
|
|
"web-sys",
|
|
|
|
"webpki-roots",
|
2023-06-22 10:25:30 +00:00
|
|
|
"winreg 0.10.1",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "resolv-conf"
|
|
|
|
version = "0.7.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00"
|
|
|
|
dependencies = [
|
|
|
|
"hostname",
|
|
|
|
"quick-error",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rfc6979"
|
2022-11-04 12:07:37 +00:00
|
|
|
version = "0.3.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-11-04 12:07:37 +00:00
|
|
|
checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-03-17 19:31:04 +00:00
|
|
|
"crypto-bigint 0.4.9",
|
2022-07-16 21:49:35 +00:00
|
|
|
"hmac 0.12.1",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2023-03-25 04:45:33 +00:00
|
|
|
[[package]]
|
|
|
|
name = "rfc6979"
|
|
|
|
version = "0.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2"
|
|
|
|
dependencies = [
|
|
|
|
"hmac 0.12.1",
|
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "ring"
|
|
|
|
version = "0.16.20"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
|
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
"libc",
|
|
|
|
"once_cell",
|
2023-06-29 01:16:33 +00:00
|
|
|
"spin 0.5.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"untrusted",
|
|
|
|
"web-sys",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ripemd"
|
2022-09-29 18:33:09 +00:00
|
|
|
version = "0.1.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-09-29 18:33:09 +00:00
|
|
|
checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rlp"
|
2022-10-22 01:40:50 +00:00
|
|
|
version = "0.5.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-10-22 01:40:50 +00:00
|
|
|
checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
2023-03-25 04:45:33 +00:00
|
|
|
"rlp-derive",
|
2022-07-16 21:49:35 +00:00
|
|
|
"rustc-hex",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rlp-derive"
|
|
|
|
version = "0.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rocksdb"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.21.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"librocksdb-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rpassword"
|
2022-12-07 22:56:53 +00:00
|
|
|
version = "7.2.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-07 22:56:53 +00:00
|
|
|
checksum = "6678cf63ab3491898c0d021b493c94c9b221d91295294a2a5746eacbe5928322"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
2022-12-07 22:56:53 +00:00
|
|
|
"rtoolbox",
|
2022-07-16 21:49:35 +00:00
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "rtcp"
|
|
|
|
version = "0.7.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1919efd6d4a6a85d13388f9487549bb8e359f17198cc03ffd72f79b553873691"
|
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"thiserror",
|
|
|
|
"webrtc-util",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "rtnetlink"
|
|
|
|
version = "0.10.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0"
|
|
|
|
dependencies = [
|
|
|
|
"futures",
|
|
|
|
"log",
|
|
|
|
"netlink-packet-route",
|
|
|
|
"netlink-proto",
|
2023-03-26 12:43:01 +00:00
|
|
|
"nix",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
2023-01-16 15:42:31 +00:00
|
|
|
"tokio",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2022-12-07 22:56:53 +00:00
|
|
|
[[package]]
|
|
|
|
name = "rtoolbox"
|
|
|
|
version = "0.0.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "rtp"
|
|
|
|
version = "0.6.8"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a2a095411ff00eed7b12e4c6a118ba984d113e1079582570d56a5ee723f11f80"
|
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"bytes",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"serde",
|
|
|
|
"thiserror",
|
|
|
|
"webrtc-util",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "rustc-demangle"
|
2023-04-18 03:59:04 +00:00
|
|
|
version = "0.1.23"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-18 03:59:04 +00:00
|
|
|
checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rustc-hash"
|
|
|
|
version = "1.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rustc-hex"
|
|
|
|
version = "2.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6"
|
|
|
|
|
2022-07-17 01:06:54 +00:00
|
|
|
[[package]]
|
|
|
|
name = "rustc_version"
|
2022-07-16 21:49:35 +00:00
|
|
|
version = "0.4.0"
|
2022-07-17 01:06:54 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-07-16 21:49:35 +00:00
|
|
|
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
|
2022-07-17 01:06:54 +00:00
|
|
|
dependencies = [
|
2023-03-16 23:37:32 +00:00
|
|
|
"semver 1.0.17",
|
2022-07-17 01:06:54 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
2023-01-16 15:42:31 +00:00
|
|
|
name = "rusticata-macros"
|
|
|
|
version = "4.1.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-16 15:42:31 +00:00
|
|
|
checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-01-16 15:42:31 +00:00
|
|
|
"nom",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rustix"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.36.14"
|
2023-03-25 04:45:33 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "14e4d67015953998ad0eb82887a0eb0129e18a7e2f3b7b0f6c422fddcd503d62"
|
2023-03-25 04:45:33 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"bitflags 1.3.2",
|
2023-05-10 11:34:07 +00:00
|
|
|
"errno",
|
|
|
|
"io-lifetimes",
|
2023-03-25 04:45:33 +00:00
|
|
|
"libc",
|
|
|
|
"linux-raw-sys 0.1.4",
|
|
|
|
"windows-sys 0.45.0",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rustix"
|
2023-07-02 00:27:03 +00:00
|
|
|
version = "0.37.21"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-07-02 00:27:03 +00:00
|
|
|
checksum = "62f25693a73057a1b4cb56179dd3c7ea21a7c6c5ee7d85781f5749b46f34b79c"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"bitflags 1.3.2",
|
2023-05-10 11:34:07 +00:00
|
|
|
"errno",
|
|
|
|
"io-lifetimes",
|
2022-11-11 04:59:20 +00:00
|
|
|
"libc",
|
2023-06-22 10:25:30 +00:00
|
|
|
"linux-raw-sys 0.3.8",
|
2023-04-08 08:44:28 +00:00
|
|
|
"windows-sys 0.48.0",
|
2022-11-11 04:59:20 +00:00
|
|
|
]
|
|
|
|
|
2023-07-02 00:27:03 +00:00
|
|
|
[[package]]
|
|
|
|
name = "rustix"
|
|
|
|
version = "0.38.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "fbc6396159432b5c8490d4e301d8c705f61860b8b6c863bf79942ce5401968f3"
|
|
|
|
dependencies = [
|
|
|
|
"bitflags 2.3.3",
|
|
|
|
"errno",
|
|
|
|
"libc",
|
|
|
|
"linux-raw-sys 0.4.3",
|
|
|
|
"windows-sys 0.48.0",
|
|
|
|
]
|
|
|
|
|
2022-11-11 04:59:20 +00:00
|
|
|
[[package]]
|
2022-07-16 21:49:35 +00:00
|
|
|
name = "rustls"
|
2023-01-16 15:42:31 +00:00
|
|
|
version = "0.19.1"
|
2022-11-11 04:59:20 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-16 15:42:31 +00:00
|
|
|
checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7"
|
2022-11-11 04:59:20 +00:00
|
|
|
dependencies = [
|
2023-01-16 15:42:31 +00:00
|
|
|
"base64 0.13.1",
|
|
|
|
"log",
|
|
|
|
"ring",
|
|
|
|
"sct 0.6.1",
|
|
|
|
"webpki 0.21.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rustls"
|
2023-01-16 15:42:31 +00:00
|
|
|
version = "0.20.8"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-16 15:42:31 +00:00
|
|
|
checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"log",
|
|
|
|
"ring",
|
2023-01-16 15:42:31 +00:00
|
|
|
"sct 0.7.0",
|
|
|
|
"webpki 0.22.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-06-22 10:25:30 +00:00
|
|
|
[[package]]
|
|
|
|
name = "rustls"
|
|
|
|
version = "0.21.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e32ca28af694bc1bbf399c33a516dbdf1c90090b8ab23c2bc24f834aa2247f5f"
|
|
|
|
dependencies = [
|
|
|
|
"log",
|
|
|
|
"ring",
|
|
|
|
"rustls-webpki",
|
|
|
|
"sct 0.7.0",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "rustls-native-certs"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.6.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"openssl-probe",
|
|
|
|
"rustls-pemfile",
|
|
|
|
"schannel",
|
|
|
|
"security-framework",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rustls-pemfile"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "1.0.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"base64 0.21.2",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rustls-webpki"
|
|
|
|
version = "0.100.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b"
|
|
|
|
dependencies = [
|
|
|
|
"ring",
|
|
|
|
"untrusted",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rustversion"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "1.0.12"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rw-stream-sink"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "26338f5e09bb721b85b135ea05af7767c90b52f6de4f087d4f4a3a9d64e7dc04"
|
|
|
|
dependencies = [
|
|
|
|
"futures",
|
|
|
|
"pin-project",
|
|
|
|
"static_assertions",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ryu"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "1.0.13"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
2022-07-17 01:06:54 +00:00
|
|
|
[[package]]
|
2023-03-06 12:39:43 +00:00
|
|
|
name = "safe_arch"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.7.0"
|
2022-07-17 01:06:54 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "62a7484307bd40f8f7ccbacccac730108f2cae119a3b11c74485b48aa9ea650f"
|
2022-07-17 01:06:54 +00:00
|
|
|
dependencies = [
|
2023-03-06 12:39:43 +00:00
|
|
|
"bytemuck",
|
2022-07-17 01:06:54 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "salsa20"
|
2022-12-07 23:05:06 +00:00
|
|
|
version = "0.10.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-07 23:05:06 +00:00
|
|
|
checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-03-11 09:49:05 +00:00
|
|
|
"cipher 0.4.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "same-file"
|
|
|
|
version = "1.0.6"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
|
|
|
|
dependencies = [
|
|
|
|
"winapi-util",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-allocator"
|
|
|
|
version = "4.1.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"log",
|
|
|
|
"sp-core",
|
|
|
|
"sp-wasm-interface",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
2023-03-26 12:43:01 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sc-authority-discovery"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2023-03-26 12:43:01 +00:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
|
|
|
"ip_network",
|
|
|
|
"libp2p",
|
|
|
|
"log",
|
2023-06-28 18:57:58 +00:00
|
|
|
"multihash 0.17.0",
|
2023-03-26 12:43:01 +00:00
|
|
|
"parity-scale-codec",
|
|
|
|
"prost",
|
|
|
|
"prost-build",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"sc-client-api",
|
|
|
|
"sc-network",
|
|
|
|
"sc-network-common",
|
|
|
|
"sp-api",
|
|
|
|
"sp-authority-discovery",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-core",
|
|
|
|
"sp-keystore",
|
|
|
|
"sp-runtime",
|
|
|
|
"substrate-prometheus-endpoint",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sc-basic-authorship"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"sc-block-builder",
|
|
|
|
"sc-client-api",
|
|
|
|
"sc-proposer-metrics",
|
|
|
|
"sc-telemetry",
|
|
|
|
"sc-transaction-pool-api",
|
|
|
|
"sp-api",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-consensus",
|
|
|
|
"sp-core",
|
|
|
|
"sp-inherents",
|
|
|
|
"sp-runtime",
|
|
|
|
"substrate-prometheus-endpoint",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-block-builder"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"parity-scale-codec",
|
|
|
|
"sc-client-api",
|
|
|
|
"sp-api",
|
|
|
|
"sp-block-builder",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-core",
|
|
|
|
"sp-inherents",
|
|
|
|
"sp-runtime",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-chain-spec"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-09-18 19:30:38 +00:00
|
|
|
"memmap2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-chain-spec-derive",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sc-client-api",
|
|
|
|
"sc-executor",
|
|
|
|
"sc-network",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-telemetry",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sp-blockchain",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-core",
|
|
|
|
"sp-runtime",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sp-state-machine",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-chain-spec-derive"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-12-07 23:05:06 +00:00
|
|
|
"proc-macro-crate",
|
2022-07-16 21:49:35 +00:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-cli"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-09-29 18:33:09 +00:00
|
|
|
"array-bytes",
|
2022-07-16 21:49:35 +00:00
|
|
|
"chrono",
|
2023-06-22 10:25:30 +00:00
|
|
|
"clap",
|
2022-07-16 21:49:35 +00:00
|
|
|
"fdlimit",
|
|
|
|
"futures",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-identity",
|
2022-07-16 21:49:35 +00:00
|
|
|
"log",
|
|
|
|
"names",
|
|
|
|
"parity-scale-codec",
|
2023-01-16 15:42:31 +00:00
|
|
|
"rand 0.8.5",
|
2022-07-16 21:49:35 +00:00
|
|
|
"regex",
|
|
|
|
"rpassword",
|
|
|
|
"sc-client-api",
|
|
|
|
"sc-client-db",
|
|
|
|
"sc-keystore",
|
|
|
|
"sc-network",
|
2022-09-29 18:33:09 +00:00
|
|
|
"sc-network-common",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-service",
|
|
|
|
"sc-telemetry",
|
|
|
|
"sc-tracing",
|
|
|
|
"sc-utils",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-core",
|
|
|
|
"sp-keyring",
|
|
|
|
"sp-keystore",
|
|
|
|
"sp-panic-handler",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-version",
|
|
|
|
"thiserror",
|
|
|
|
"tiny-bip39",
|
|
|
|
"tokio",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-client-api"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"fnv",
|
|
|
|
"futures",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"sc-executor",
|
|
|
|
"sc-transaction-pool-api",
|
|
|
|
"sc-utils",
|
|
|
|
"sp-api",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-consensus",
|
|
|
|
"sp-core",
|
|
|
|
"sp-database",
|
|
|
|
"sp-externalities",
|
|
|
|
"sp-keystore",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-state-machine",
|
2023-06-28 18:57:58 +00:00
|
|
|
"sp-statement-store",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-storage",
|
|
|
|
"substrate-prometheus-endpoint",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-client-db"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"hash-db",
|
|
|
|
"kvdb",
|
|
|
|
"kvdb-memorydb",
|
|
|
|
"kvdb-rocksdb",
|
|
|
|
"linked-hash-map",
|
|
|
|
"log",
|
|
|
|
"parity-db",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"sc-client-api",
|
|
|
|
"sc-state-db",
|
2023-03-06 12:39:43 +00:00
|
|
|
"schnellru",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-arithmetic",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-core",
|
|
|
|
"sp-database",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-state-machine",
|
|
|
|
"sp-trie",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-consensus"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-identity",
|
2022-07-16 21:49:35 +00:00
|
|
|
"log",
|
2023-01-04 08:17:36 +00:00
|
|
|
"mockall",
|
2022-07-16 21:49:35 +00:00
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"sc-client-api",
|
|
|
|
"sc-utils",
|
|
|
|
"serde",
|
|
|
|
"sp-api",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-consensus",
|
|
|
|
"sp-core",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-state-machine",
|
|
|
|
"substrate-prometheus-endpoint",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
2023-03-26 12:43:01 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sc-consensus-babe"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2023-03-26 12:43:01 +00:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"fork-tree",
|
|
|
|
"futures",
|
|
|
|
"log",
|
|
|
|
"num-bigint",
|
|
|
|
"num-rational",
|
|
|
|
"num-traits",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"sc-client-api",
|
|
|
|
"sc-consensus",
|
|
|
|
"sc-consensus-epochs",
|
|
|
|
"sc-consensus-slots",
|
|
|
|
"sc-telemetry",
|
|
|
|
"scale-info",
|
|
|
|
"sp-api",
|
|
|
|
"sp-application-crypto",
|
|
|
|
"sp-block-builder",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-consensus",
|
|
|
|
"sp-consensus-babe",
|
|
|
|
"sp-consensus-slots",
|
|
|
|
"sp-core",
|
|
|
|
"sp-inherents",
|
|
|
|
"sp-keystore",
|
|
|
|
"sp-runtime",
|
|
|
|
"substrate-prometheus-endpoint",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-consensus-epochs"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2023-03-26 12:43:01 +00:00
|
|
|
dependencies = [
|
|
|
|
"fork-tree",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"sc-client-api",
|
|
|
|
"sc-consensus",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-runtime",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-consensus-grandpa"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2023-03-26 12:43:01 +00:00
|
|
|
dependencies = [
|
|
|
|
"ahash 0.8.3",
|
|
|
|
"array-bytes",
|
|
|
|
"async-trait",
|
|
|
|
"dyn-clone",
|
|
|
|
"finality-grandpa",
|
|
|
|
"fork-tree",
|
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"sc-block-builder",
|
|
|
|
"sc-chain-spec",
|
|
|
|
"sc-client-api",
|
|
|
|
"sc-consensus",
|
|
|
|
"sc-network",
|
|
|
|
"sc-network-common",
|
|
|
|
"sc-network-gossip",
|
|
|
|
"sc-telemetry",
|
|
|
|
"sc-utils",
|
|
|
|
"serde_json",
|
|
|
|
"sp-api",
|
|
|
|
"sp-application-crypto",
|
|
|
|
"sp-arithmetic",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-consensus",
|
|
|
|
"sp-consensus-grandpa",
|
|
|
|
"sp-core",
|
|
|
|
"sp-keystore",
|
|
|
|
"sp-runtime",
|
|
|
|
"substrate-prometheus-endpoint",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-consensus-slots"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2023-03-26 12:43:01 +00:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"sc-client-api",
|
|
|
|
"sc-consensus",
|
|
|
|
"sc-telemetry",
|
|
|
|
"sp-arithmetic",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-consensus",
|
|
|
|
"sp-consensus-slots",
|
|
|
|
"sp-core",
|
|
|
|
"sp-inherents",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-state-machine",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sc-executor"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-04-09 06:31:10 +00:00
|
|
|
"lru 0.9.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"parity-scale-codec",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"sc-executor-common",
|
|
|
|
"sc-executor-wasmtime",
|
|
|
|
"sp-api",
|
|
|
|
"sp-core",
|
|
|
|
"sp-externalities",
|
|
|
|
"sp-io",
|
|
|
|
"sp-panic-handler",
|
|
|
|
"sp-runtime-interface",
|
|
|
|
"sp-trie",
|
|
|
|
"sp-version",
|
|
|
|
"sp-wasm-interface",
|
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-executor-common"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"sc-allocator",
|
|
|
|
"sp-maybe-compressed-blob",
|
|
|
|
"sp-wasm-interface",
|
|
|
|
"thiserror",
|
|
|
|
"wasm-instrument",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-executor-wasmtime"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-03-06 12:39:43 +00:00
|
|
|
"anyhow",
|
2022-07-16 21:49:35 +00:00
|
|
|
"cfg-if",
|
|
|
|
"libc",
|
|
|
|
"log",
|
|
|
|
"once_cell",
|
2023-06-22 10:25:30 +00:00
|
|
|
"rustix 0.36.14",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-allocator",
|
|
|
|
"sc-executor-common",
|
|
|
|
"sp-runtime-interface",
|
|
|
|
"sp-wasm-interface",
|
|
|
|
"wasmtime",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-informant"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-04-15 07:27:45 +00:00
|
|
|
"anstyle",
|
2022-07-16 21:49:35 +00:00
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
|
|
|
"log",
|
|
|
|
"sc-client-api",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sc-network",
|
2022-09-29 18:33:09 +00:00
|
|
|
"sc-network-common",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-blockchain",
|
|
|
|
"sp-runtime",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-keystore"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-09-29 18:33:09 +00:00
|
|
|
"array-bytes",
|
2022-07-16 21:49:35 +00:00
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"serde_json",
|
|
|
|
"sp-application-crypto",
|
|
|
|
"sp-core",
|
|
|
|
"sp-keystore",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-network"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-09-29 18:33:09 +00:00
|
|
|
"array-bytes",
|
2023-03-26 12:43:01 +00:00
|
|
|
"async-channel",
|
2022-07-16 21:49:35 +00:00
|
|
|
"async-trait",
|
|
|
|
"asynchronous-codec",
|
|
|
|
"bytes",
|
|
|
|
"either",
|
|
|
|
"fnv",
|
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
|
|
|
"ip_network",
|
|
|
|
"libp2p",
|
2023-03-26 12:43:01 +00:00
|
|
|
"linked_hash_set",
|
2022-07-16 21:49:35 +00:00
|
|
|
"log",
|
2023-04-09 06:31:10 +00:00
|
|
|
"lru 0.9.0",
|
2023-03-06 12:39:43 +00:00
|
|
|
"mockall",
|
2022-07-16 21:49:35 +00:00
|
|
|
"parity-scale-codec",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"pin-project",
|
2023-01-16 15:42:31 +00:00
|
|
|
"rand 0.8.5",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-client-api",
|
|
|
|
"sc-network-common",
|
|
|
|
"sc-peerset",
|
|
|
|
"sc-utils",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"smallvec",
|
2023-05-01 07:17:37 +00:00
|
|
|
"snow",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-blockchain",
|
|
|
|
"sp-core",
|
|
|
|
"sp-runtime",
|
|
|
|
"substrate-prometheus-endpoint",
|
|
|
|
"thiserror",
|
|
|
|
"unsigned-varint",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2022-09-29 18:33:09 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sc-network-bitswap"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-09-29 18:33:09 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"async-channel",
|
2022-09-29 18:33:09 +00:00
|
|
|
"cid",
|
|
|
|
"futures",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-identity",
|
2022-09-29 18:33:09 +00:00
|
|
|
"log",
|
2022-10-20 05:05:36 +00:00
|
|
|
"prost",
|
|
|
|
"prost-build",
|
2022-09-29 18:33:09 +00:00
|
|
|
"sc-client-api",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sc-network",
|
2022-09-29 18:33:09 +00:00
|
|
|
"sc-network-common",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-runtime",
|
|
|
|
"thiserror",
|
|
|
|
"unsigned-varint",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sc-network-common"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"array-bytes",
|
2022-09-29 18:33:09 +00:00
|
|
|
"async-trait",
|
2023-06-28 18:57:58 +00:00
|
|
|
"bitflags 1.3.2",
|
|
|
|
"bytes",
|
2022-07-16 21:49:35 +00:00
|
|
|
"futures",
|
2023-06-28 18:57:58 +00:00
|
|
|
"futures-timer",
|
|
|
|
"libp2p-identity",
|
2022-07-16 21:49:35 +00:00
|
|
|
"parity-scale-codec",
|
2022-10-20 05:05:36 +00:00
|
|
|
"prost-build",
|
2022-08-16 07:44:32 +00:00
|
|
|
"sc-consensus",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-peerset",
|
2023-06-28 18:57:58 +00:00
|
|
|
"smallvec",
|
2022-08-16 07:44:32 +00:00
|
|
|
"sp-consensus",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sp-consensus-grandpa",
|
2022-08-16 07:44:32 +00:00
|
|
|
"sp-runtime",
|
2023-06-28 18:57:58 +00:00
|
|
|
"substrate-prometheus-endpoint",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
Initial Tendermint implementation (#145)
* Machine without timeouts
* Time code
* Move substrate/consensus/tendermint to substrate/tendermint
* Delete the old paper doc
* Refactor out external parts to generics
Also creates a dedicated file for the message log.
* Refactor <V, B> to type V, type B
* Successfully compiling
* Calculate timeouts
* Fix test
* Finish timeouts
* Misc cleanup
* Define a signature scheme trait
* Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde
doesn't natively support borsh, nor SCALE, and while there is a serde
SCALE crate, it's old. While it may be complete, it's not worth working
with.
While we could still grab bincode, and a variety of other formats, it
wasn't worth it to go custom and for Serai, we'll be using SCALE almost
everywhere anyways.
* Implement usage of the signature scheme
* Make the infinite test non-infinite
* Provide a dedicated signature in Precommit of just the block hash
Greatly simplifies verifying when syncing.
* Dedicated Commit object
Restores sig aggregation API.
* Tidy README
* Document tendermint
* Sign the ID directly instead of its SCALE encoding
For a hash, which is fixed-size, these should be the same yet this helps
move past the dependency on SCALE. It also, for any type where the two
values are different, smooths integration.
* Litany of bug fixes
Also attempts to make the code more readable while updating/correcting
documentation.
* Remove async recursion
Greatly increases safety as well by ensuring only one message is
processed at once.
* Correct timing issues
1) Commit didn't include the round, leaving the clock in question.
2) Machines started with a local time, instead of a proper start time.
3) Machines immediately started the next block instead of waiting for
the block time.
* Replace MultiSignature with sr25519::Signature
* Minor SignatureScheme API changes
* Map TM SignatureScheme to Substrate's sr25519
* Initial work on an import queue
* Properly use check_block
* Rename import to import_queue
* Implement tendermint_machine::Block for Substrate Blocks
Unfortunately, this immediately makes Tendermint machine capable of
deployment as crate since it uses a git reference. In the future, a
Cargo.toml patch section for serai/substrate should be investigated.
This is being done regardless as it's the quickest way forward and this
is for Serai.
* Dummy Weights
* Move documentation to the top of the file
* Move logic into TendermintImport itself
Multiple traits exist to verify/handle blocks. I'm unsure exactly when
each will be called in the pipeline, so the easiest solution is to have
every step run every check.
That would be extremely computationally expensive if we ran EVERY check,
yet we rely on Substrate for execution (and according checks), which are
limited to just the actual import function.
Since we're calling this code from many places, it makes sense for it to
be consolidated under TendermintImport.
* BlockImport, JustificationImport, Verifier, and import_queue function
* Update consensus/lib.rs from PoW to Tendermint
Not possible to be used as the previous consensus could. It will not
produce blocks nor does it currenly even instantiate a machine. This is
just he next step.
* Update Cargo.tomls for substrate packages
* Tendermint SelectChain
This is incompatible with Substrate's expectations, yet should be valid
for ours
* Move the node over to the new SelectChain
* Minor tweaks
* Update SelectChain documentation
* Remove substrate/node lib.rs
This shouldn't be used as a library AFAIK. While runtime should be, and
arguably should even be published, I have yet to see node in the same
way. Helps tighten API boundaries.
* Remove unused macro_use
* Replace panicking todos with stubs and // TODO
Enables progress.
* Reduce chain_spec and use more accurate naming
* Implement block proposal logic
* Modularize to get_proposal
* Trigger block importing
Doesn't wait for the response yet, which it needs to.
* Get the result of block importing
* Split import_queue into a series of files
* Provide a way to create the machine
The BasicQueue returned obscures the TendermintImport struct.
Accordingly, a Future scoped with access is returned upwards, which when
awaited will create the machine. This makes creating the machine
optional while maintaining scope boundaries.
Is sufficient to create a 1-node net which produces and finalizes
blocks.
* Don't import justifications multiple times
Also don't broadcast blocks which were solely proposed.
* Correct justication import pipeline
Removes JustificationImport as it should never be used.
* Announce blocks
By claiming File, they're not sent ovber the P2P network before they
have a justification, as desired. Unfortunately, they never were. This
works around that.
* Add an assert to verify proposed children aren't best
* Consolidate C and I generics into a TendermintClient trait alias
* Expand sanity checks
Substrate doesn't expect nor officially support children with less work
than their parents. It's a trick used here. Accordingly, ensure the
trick's validity.
* When resetting, use the end time of the round which was committed to
The machine reset to the end time of the current round. For a delayed
network connection, a machine may move ahead in rounds and only later
realize a prior round succeeded. Despite acknowledging that round's
success, it would maintain its delay when moving to the next block,
bricking it.
Done by tracking the end time for each round as they occur.
* Move Commit from including the round to including the round's end_time
The round was usable to build the current clock in an accumulated
fashion, relative to the previous round. The end time is the absolute
metric of it, which can be used to calculate the round number (with all
previous end times).
Substrate now builds off the best block, not genesis, using the end time
included in the justification to start its machine in a synchronized
state.
Knowing the end time of a round, or the round in which block was
committed to, is necessary for nodes to sync up with Tendermint.
Encoding it in the commit ensures it's long lasting and makes it readily
available, without the load of an entire transaction.
* Add a TODO on Tendermint
* Misc bug fixes
* More misc bug fixes
* Clean up lock acquisition
* Merge weights and signing scheme into validators, documenting needed changes
* Add pallet sessions to runtime, create pallet-tendermint
* Update node to use pallet sessions
* Update support URL
* Partial work on correcting pallet calls
* Redo Tendermint folder structure
* TendermintApi, compilation fixes
* Fix the stub round robin
At some point, the modulus was removed causing it to exceed the
validators list and stop proposing.
* Use the validators list from the session pallet
* Basic Gossip Validator
* Correct Substrate Tendermint start block
The Tendermint machine uses the passed in number as the block's being
worked on number. Substrate passed in the already finalized block's
number.
Also updates misc comments.
* Clean generics in Tendermint with a monolith with associated types
* Remove the Future triggering the machine for an async fn
Enables passing data in, such as the network.
* Move TendermintMachine from start_num, time to last_num, time
Provides an explicitly clear API clearer to program around.
Also adds additional time code to handle an edge case.
* Connect the Tendermint machine to a GossipEngine
* Connect broadcast
* Remove machine from TendermintImport
It's not used there at all.
* Merge Verifier into block_import.rs
These two files were largely the same, just hooking into sync structs
with almost identical imports. As this project shapes up, removing dead
weight is appreciated.
* Create a dedicated file for being a Tendermint authority
* Deleted comment code related to PoW
* Move serai_runtime specific code from tendermint/client to node
Renames serai-consensus to sc_tendermint
* Consolidate file structure in sc_tendermint
* Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in
general.
* Consolidate references to sr25519 in sc_tendermint
* Add documentation to public structs/functions in sc_tendermint
* Add another missing comment
* Make sign asynchronous
Some relation to https://github.com/serai-dex/serai/issues/95.
* Move sc_tendermint to async sign
* Implement proper checking of inherents
* Take in a Keystore and validator ID
* Remove unnecessary PhantomDatas
* Update node to latest sc_tendermint
* Configure node for a multi-node testnet
* Fix handling of the GossipEngine
* Use a rounded genesis to obtain sufficient synchrony within the Docker env
* Correct Serai d-f names in Docker
* Remove an attempt at caching I don't believe would ever hit
* Add an already in chain check to block import
While the inner should do this for us, we call verify_order on our end
*before* inner to ensure sequential import. Accordingly, we need to
provide our own check.
Removes errors of "non-sequential import" when trying to re-import an
existing block.
* Update the consensus documentation
It was incredibly out of date.
* Add a _ to the validator arg in slash
* Make the dev profile a local testnet profile
Restores a dev profile which only has one validator, locally running.
* Reduce Arcs in TendermintMachine, split Signer from SignatureScheme
* Update sc_tendermint per previous commit
* Restore cache
* Remove error case which shouldn't be an error
* Stop returning errors on already existing blocks entirely
* Correct Dave, Eve, and Ferdie to not run as validators
* Rename dev to devnet
--dev still works thanks to the |. Acheieves a personal preference of
mine with some historical meaning.
* Add message expiry to the Tendermint gossip
* Localize the LibP2P protocol to the blockchain
Follows convention by doing so. Theoretically enables running multiple
blockchains over a single LibP2P connection.
* Add a version to sp-runtime in tendermint-machine
* Add missing trait
* Bump Substrate dependency
Fixes #147.
* Implement Schnorr half-aggregation from https://eprint.iacr.org/2021/350.pdf
Relevant to https://github.com/serai-dex/serai/issues/99.
* cargo update (tendermint)
* Move from polling loops to a pure IO model for sc_tendermint's gossip
* Correct protocol name handling
* Use futures mpsc instead of tokio
* Timeout futures
* Move from a yielding loop to select in tendermint-machine
* Update Substrate to the new TendermintHandle
* Use futures pin instead of tokio
* Only recheck blocks with non-fatal inherent transaction errors
* Update to the latest substrate
* Separate the block processing time from the latency
* Add notes to the runtime
* Don't spam slash
Also adds a slash condition of failing to propose.
* Support running TendermintMachine when not a validator
This supports validators who leave the current set, without crashing
their nodes, along with nodes trying to become validators (who will now
seamlessly transition in).
* Properly define and pass around the block size
* Correct the Duration timing
The proposer will build it, send it, then process it (on the first
round). Accordingly, it's / 3, not / 2, as / 2 only accounted for the
latter events.
* Correct time-adjustment code on round skip
* Have the machine respond to advances made by an external sync loop
* Clean up time code in tendermint-machine
* BlockData and RoundData structs
* Rename Round to RoundNumber
* Move BlockData to a new file
* Move Round to an Option due to the pseudo-uninitialized state we create
Before the addition of RoundData, we always created the round, and on
.round(0), simply created it again. With RoundData, and the changes to
the time code, we used round 0, time 0, the latter being incorrect yet
not an issue due to lack of misuse.
Now, if we do misuse it, it'll panic.
* Clear the Queue instead of draining and filtering
There shouldn't ever be a message which passes the filter under the
current design.
* BlockData::new
* Move more code into block.rs
Introduces type-aliases to obtain Data/Message/SignedMessage solely from
a Network object.
Fixes a bug regarding stepping when you're not an active validator.
* Have verify_precommit_signature return if it verified the signature
Also fixes a bug where invalid precommit signatures were left standing
and therefore contributing to commits.
* Remove the precommit signature hash
It cached signatures per-block. Precommit signatures are bound to each
round. This would lead to forming invalid commits when a commit should
be formed. Under debug, the machine would catch that and panic. On
release, it'd have everyone who wasn't a validator fail to continue
syncing.
* Slight doc changes
Also flattens the message handling function by replacing an if
containing all following code in the function with an early return for
the else case.
* Always produce notifications for finalized blocks via origin overrides
* Correct weird formatting
* Update to the latest tendermint-machine
* Manually step the Tendermint machine when we synced a block over the network
* Ignore finality notifications for old blocks
* Remove a TODO resolved in 8c51bc011d03c8d54ded05011e7f4d1a01e9f873
* Add a TODO comment to slash
Enables searching for the case-sensitive phrase and finding it.
* cargo fmt
* Use a tmp DB for Serai in Docker
* Remove panic on slash
As we move towards protonet, this can happen (if a node goes offline),
yet it happening brings down the entire net right now.
* Add log::error on slash
* created shared volume between containers
* Complete the sh scripts
* Pass in the genesis time to Substrate
* Correct block announcements
They were announced, yet not marked best.
* Correct pupulate_end_time
It was used as inclusive yet didn't work inclusively.
* Correct gossip channel jumping when a block is synced via Substrate
* Use a looser check in import_future
This triggered so it needs to be accordingly relaxed.
* Correct race conditions between add_block and step
Also corrects a <= to <.
* Update cargo deny
* rename genesis-service to genesis
* Update Cargo.lock
* Correct runtime Cargo.toml whitespace
* Correct typo
* Document recheck
* Misc lints
* Fix prev commit
* Resolve low-hanging review comments
* Mark genesis/entry-dev.sh as executable
* Prevent a commit from including the same signature multiple times
Yanks tendermint-machine 0.1.0 accordingly.
* Update to latest nightly clippy
* Improve documentation
* Use clearer variable names
* Add log statements
* Pair more log statements
* Clean TendermintAuthority::authority as possible
Merges it into new. It has way too many arguments, yet there's no clear path at
consolidation there, unfortunately.
Additionally provides better scoping within itself.
* Fix #158
Doesn't use lock_import_and_run for reasons commented (lack of async).
* Rename guard to lock
* Have the devnet use the current time as the genesis
Possible since it's only a single node, not requiring synchronization.
* Fix gossiping
I really don't know what side effect this avoids and I can't say I care at this
point.
* Misc lints
Co-authored-by: vrx00 <vrx00@proton.me>
Co-authored-by: TheArchitect108 <TheArchitect108@protonmail.com>
2022-12-03 23:38:02 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sc-network-gossip"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
Initial Tendermint implementation (#145)
* Machine without timeouts
* Time code
* Move substrate/consensus/tendermint to substrate/tendermint
* Delete the old paper doc
* Refactor out external parts to generics
Also creates a dedicated file for the message log.
* Refactor <V, B> to type V, type B
* Successfully compiling
* Calculate timeouts
* Fix test
* Finish timeouts
* Misc cleanup
* Define a signature scheme trait
* Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde
doesn't natively support borsh, nor SCALE, and while there is a serde
SCALE crate, it's old. While it may be complete, it's not worth working
with.
While we could still grab bincode, and a variety of other formats, it
wasn't worth it to go custom and for Serai, we'll be using SCALE almost
everywhere anyways.
* Implement usage of the signature scheme
* Make the infinite test non-infinite
* Provide a dedicated signature in Precommit of just the block hash
Greatly simplifies verifying when syncing.
* Dedicated Commit object
Restores sig aggregation API.
* Tidy README
* Document tendermint
* Sign the ID directly instead of its SCALE encoding
For a hash, which is fixed-size, these should be the same yet this helps
move past the dependency on SCALE. It also, for any type where the two
values are different, smooths integration.
* Litany of bug fixes
Also attempts to make the code more readable while updating/correcting
documentation.
* Remove async recursion
Greatly increases safety as well by ensuring only one message is
processed at once.
* Correct timing issues
1) Commit didn't include the round, leaving the clock in question.
2) Machines started with a local time, instead of a proper start time.
3) Machines immediately started the next block instead of waiting for
the block time.
* Replace MultiSignature with sr25519::Signature
* Minor SignatureScheme API changes
* Map TM SignatureScheme to Substrate's sr25519
* Initial work on an import queue
* Properly use check_block
* Rename import to import_queue
* Implement tendermint_machine::Block for Substrate Blocks
Unfortunately, this immediately makes Tendermint machine capable of
deployment as crate since it uses a git reference. In the future, a
Cargo.toml patch section for serai/substrate should be investigated.
This is being done regardless as it's the quickest way forward and this
is for Serai.
* Dummy Weights
* Move documentation to the top of the file
* Move logic into TendermintImport itself
Multiple traits exist to verify/handle blocks. I'm unsure exactly when
each will be called in the pipeline, so the easiest solution is to have
every step run every check.
That would be extremely computationally expensive if we ran EVERY check,
yet we rely on Substrate for execution (and according checks), which are
limited to just the actual import function.
Since we're calling this code from many places, it makes sense for it to
be consolidated under TendermintImport.
* BlockImport, JustificationImport, Verifier, and import_queue function
* Update consensus/lib.rs from PoW to Tendermint
Not possible to be used as the previous consensus could. It will not
produce blocks nor does it currenly even instantiate a machine. This is
just he next step.
* Update Cargo.tomls for substrate packages
* Tendermint SelectChain
This is incompatible with Substrate's expectations, yet should be valid
for ours
* Move the node over to the new SelectChain
* Minor tweaks
* Update SelectChain documentation
* Remove substrate/node lib.rs
This shouldn't be used as a library AFAIK. While runtime should be, and
arguably should even be published, I have yet to see node in the same
way. Helps tighten API boundaries.
* Remove unused macro_use
* Replace panicking todos with stubs and // TODO
Enables progress.
* Reduce chain_spec and use more accurate naming
* Implement block proposal logic
* Modularize to get_proposal
* Trigger block importing
Doesn't wait for the response yet, which it needs to.
* Get the result of block importing
* Split import_queue into a series of files
* Provide a way to create the machine
The BasicQueue returned obscures the TendermintImport struct.
Accordingly, a Future scoped with access is returned upwards, which when
awaited will create the machine. This makes creating the machine
optional while maintaining scope boundaries.
Is sufficient to create a 1-node net which produces and finalizes
blocks.
* Don't import justifications multiple times
Also don't broadcast blocks which were solely proposed.
* Correct justication import pipeline
Removes JustificationImport as it should never be used.
* Announce blocks
By claiming File, they're not sent ovber the P2P network before they
have a justification, as desired. Unfortunately, they never were. This
works around that.
* Add an assert to verify proposed children aren't best
* Consolidate C and I generics into a TendermintClient trait alias
* Expand sanity checks
Substrate doesn't expect nor officially support children with less work
than their parents. It's a trick used here. Accordingly, ensure the
trick's validity.
* When resetting, use the end time of the round which was committed to
The machine reset to the end time of the current round. For a delayed
network connection, a machine may move ahead in rounds and only later
realize a prior round succeeded. Despite acknowledging that round's
success, it would maintain its delay when moving to the next block,
bricking it.
Done by tracking the end time for each round as they occur.
* Move Commit from including the round to including the round's end_time
The round was usable to build the current clock in an accumulated
fashion, relative to the previous round. The end time is the absolute
metric of it, which can be used to calculate the round number (with all
previous end times).
Substrate now builds off the best block, not genesis, using the end time
included in the justification to start its machine in a synchronized
state.
Knowing the end time of a round, or the round in which block was
committed to, is necessary for nodes to sync up with Tendermint.
Encoding it in the commit ensures it's long lasting and makes it readily
available, without the load of an entire transaction.
* Add a TODO on Tendermint
* Misc bug fixes
* More misc bug fixes
* Clean up lock acquisition
* Merge weights and signing scheme into validators, documenting needed changes
* Add pallet sessions to runtime, create pallet-tendermint
* Update node to use pallet sessions
* Update support URL
* Partial work on correcting pallet calls
* Redo Tendermint folder structure
* TendermintApi, compilation fixes
* Fix the stub round robin
At some point, the modulus was removed causing it to exceed the
validators list and stop proposing.
* Use the validators list from the session pallet
* Basic Gossip Validator
* Correct Substrate Tendermint start block
The Tendermint machine uses the passed in number as the block's being
worked on number. Substrate passed in the already finalized block's
number.
Also updates misc comments.
* Clean generics in Tendermint with a monolith with associated types
* Remove the Future triggering the machine for an async fn
Enables passing data in, such as the network.
* Move TendermintMachine from start_num, time to last_num, time
Provides an explicitly clear API clearer to program around.
Also adds additional time code to handle an edge case.
* Connect the Tendermint machine to a GossipEngine
* Connect broadcast
* Remove machine from TendermintImport
It's not used there at all.
* Merge Verifier into block_import.rs
These two files were largely the same, just hooking into sync structs
with almost identical imports. As this project shapes up, removing dead
weight is appreciated.
* Create a dedicated file for being a Tendermint authority
* Deleted comment code related to PoW
* Move serai_runtime specific code from tendermint/client to node
Renames serai-consensus to sc_tendermint
* Consolidate file structure in sc_tendermint
* Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in
general.
* Consolidate references to sr25519 in sc_tendermint
* Add documentation to public structs/functions in sc_tendermint
* Add another missing comment
* Make sign asynchronous
Some relation to https://github.com/serai-dex/serai/issues/95.
* Move sc_tendermint to async sign
* Implement proper checking of inherents
* Take in a Keystore and validator ID
* Remove unnecessary PhantomDatas
* Update node to latest sc_tendermint
* Configure node for a multi-node testnet
* Fix handling of the GossipEngine
* Use a rounded genesis to obtain sufficient synchrony within the Docker env
* Correct Serai d-f names in Docker
* Remove an attempt at caching I don't believe would ever hit
* Add an already in chain check to block import
While the inner should do this for us, we call verify_order on our end
*before* inner to ensure sequential import. Accordingly, we need to
provide our own check.
Removes errors of "non-sequential import" when trying to re-import an
existing block.
* Update the consensus documentation
It was incredibly out of date.
* Add a _ to the validator arg in slash
* Make the dev profile a local testnet profile
Restores a dev profile which only has one validator, locally running.
* Reduce Arcs in TendermintMachine, split Signer from SignatureScheme
* Update sc_tendermint per previous commit
* Restore cache
* Remove error case which shouldn't be an error
* Stop returning errors on already existing blocks entirely
* Correct Dave, Eve, and Ferdie to not run as validators
* Rename dev to devnet
--dev still works thanks to the |. Acheieves a personal preference of
mine with some historical meaning.
* Add message expiry to the Tendermint gossip
* Localize the LibP2P protocol to the blockchain
Follows convention by doing so. Theoretically enables running multiple
blockchains over a single LibP2P connection.
* Add a version to sp-runtime in tendermint-machine
* Add missing trait
* Bump Substrate dependency
Fixes #147.
* Implement Schnorr half-aggregation from https://eprint.iacr.org/2021/350.pdf
Relevant to https://github.com/serai-dex/serai/issues/99.
* cargo update (tendermint)
* Move from polling loops to a pure IO model for sc_tendermint's gossip
* Correct protocol name handling
* Use futures mpsc instead of tokio
* Timeout futures
* Move from a yielding loop to select in tendermint-machine
* Update Substrate to the new TendermintHandle
* Use futures pin instead of tokio
* Only recheck blocks with non-fatal inherent transaction errors
* Update to the latest substrate
* Separate the block processing time from the latency
* Add notes to the runtime
* Don't spam slash
Also adds a slash condition of failing to propose.
* Support running TendermintMachine when not a validator
This supports validators who leave the current set, without crashing
their nodes, along with nodes trying to become validators (who will now
seamlessly transition in).
* Properly define and pass around the block size
* Correct the Duration timing
The proposer will build it, send it, then process it (on the first
round). Accordingly, it's / 3, not / 2, as / 2 only accounted for the
latter events.
* Correct time-adjustment code on round skip
* Have the machine respond to advances made by an external sync loop
* Clean up time code in tendermint-machine
* BlockData and RoundData structs
* Rename Round to RoundNumber
* Move BlockData to a new file
* Move Round to an Option due to the pseudo-uninitialized state we create
Before the addition of RoundData, we always created the round, and on
.round(0), simply created it again. With RoundData, and the changes to
the time code, we used round 0, time 0, the latter being incorrect yet
not an issue due to lack of misuse.
Now, if we do misuse it, it'll panic.
* Clear the Queue instead of draining and filtering
There shouldn't ever be a message which passes the filter under the
current design.
* BlockData::new
* Move more code into block.rs
Introduces type-aliases to obtain Data/Message/SignedMessage solely from
a Network object.
Fixes a bug regarding stepping when you're not an active validator.
* Have verify_precommit_signature return if it verified the signature
Also fixes a bug where invalid precommit signatures were left standing
and therefore contributing to commits.
* Remove the precommit signature hash
It cached signatures per-block. Precommit signatures are bound to each
round. This would lead to forming invalid commits when a commit should
be formed. Under debug, the machine would catch that and panic. On
release, it'd have everyone who wasn't a validator fail to continue
syncing.
* Slight doc changes
Also flattens the message handling function by replacing an if
containing all following code in the function with an early return for
the else case.
* Always produce notifications for finalized blocks via origin overrides
* Correct weird formatting
* Update to the latest tendermint-machine
* Manually step the Tendermint machine when we synced a block over the network
* Ignore finality notifications for old blocks
* Remove a TODO resolved in 8c51bc011d03c8d54ded05011e7f4d1a01e9f873
* Add a TODO comment to slash
Enables searching for the case-sensitive phrase and finding it.
* cargo fmt
* Use a tmp DB for Serai in Docker
* Remove panic on slash
As we move towards protonet, this can happen (if a node goes offline),
yet it happening brings down the entire net right now.
* Add log::error on slash
* created shared volume between containers
* Complete the sh scripts
* Pass in the genesis time to Substrate
* Correct block announcements
They were announced, yet not marked best.
* Correct pupulate_end_time
It was used as inclusive yet didn't work inclusively.
* Correct gossip channel jumping when a block is synced via Substrate
* Use a looser check in import_future
This triggered so it needs to be accordingly relaxed.
* Correct race conditions between add_block and step
Also corrects a <= to <.
* Update cargo deny
* rename genesis-service to genesis
* Update Cargo.lock
* Correct runtime Cargo.toml whitespace
* Correct typo
* Document recheck
* Misc lints
* Fix prev commit
* Resolve low-hanging review comments
* Mark genesis/entry-dev.sh as executable
* Prevent a commit from including the same signature multiple times
Yanks tendermint-machine 0.1.0 accordingly.
* Update to latest nightly clippy
* Improve documentation
* Use clearer variable names
* Add log statements
* Pair more log statements
* Clean TendermintAuthority::authority as possible
Merges it into new. It has way too many arguments, yet there's no clear path at
consolidation there, unfortunately.
Additionally provides better scoping within itself.
* Fix #158
Doesn't use lock_import_and_run for reasons commented (lack of async).
* Rename guard to lock
* Have the devnet use the current time as the genesis
Possible since it's only a single node, not requiring synchronization.
* Fix gossiping
I really don't know what side effect this avoids and I can't say I care at this
point.
* Misc lints
Co-authored-by: vrx00 <vrx00@proton.me>
Co-authored-by: TheArchitect108 <TheArchitect108@protonmail.com>
2022-12-03 23:38:02 +00:00
|
|
|
dependencies = [
|
2023-03-06 12:39:43 +00:00
|
|
|
"ahash 0.8.3",
|
Initial Tendermint implementation (#145)
* Machine without timeouts
* Time code
* Move substrate/consensus/tendermint to substrate/tendermint
* Delete the old paper doc
* Refactor out external parts to generics
Also creates a dedicated file for the message log.
* Refactor <V, B> to type V, type B
* Successfully compiling
* Calculate timeouts
* Fix test
* Finish timeouts
* Misc cleanup
* Define a signature scheme trait
* Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde
doesn't natively support borsh, nor SCALE, and while there is a serde
SCALE crate, it's old. While it may be complete, it's not worth working
with.
While we could still grab bincode, and a variety of other formats, it
wasn't worth it to go custom and for Serai, we'll be using SCALE almost
everywhere anyways.
* Implement usage of the signature scheme
* Make the infinite test non-infinite
* Provide a dedicated signature in Precommit of just the block hash
Greatly simplifies verifying when syncing.
* Dedicated Commit object
Restores sig aggregation API.
* Tidy README
* Document tendermint
* Sign the ID directly instead of its SCALE encoding
For a hash, which is fixed-size, these should be the same yet this helps
move past the dependency on SCALE. It also, for any type where the two
values are different, smooths integration.
* Litany of bug fixes
Also attempts to make the code more readable while updating/correcting
documentation.
* Remove async recursion
Greatly increases safety as well by ensuring only one message is
processed at once.
* Correct timing issues
1) Commit didn't include the round, leaving the clock in question.
2) Machines started with a local time, instead of a proper start time.
3) Machines immediately started the next block instead of waiting for
the block time.
* Replace MultiSignature with sr25519::Signature
* Minor SignatureScheme API changes
* Map TM SignatureScheme to Substrate's sr25519
* Initial work on an import queue
* Properly use check_block
* Rename import to import_queue
* Implement tendermint_machine::Block for Substrate Blocks
Unfortunately, this immediately makes Tendermint machine capable of
deployment as crate since it uses a git reference. In the future, a
Cargo.toml patch section for serai/substrate should be investigated.
This is being done regardless as it's the quickest way forward and this
is for Serai.
* Dummy Weights
* Move documentation to the top of the file
* Move logic into TendermintImport itself
Multiple traits exist to verify/handle blocks. I'm unsure exactly when
each will be called in the pipeline, so the easiest solution is to have
every step run every check.
That would be extremely computationally expensive if we ran EVERY check,
yet we rely on Substrate for execution (and according checks), which are
limited to just the actual import function.
Since we're calling this code from many places, it makes sense for it to
be consolidated under TendermintImport.
* BlockImport, JustificationImport, Verifier, and import_queue function
* Update consensus/lib.rs from PoW to Tendermint
Not possible to be used as the previous consensus could. It will not
produce blocks nor does it currenly even instantiate a machine. This is
just he next step.
* Update Cargo.tomls for substrate packages
* Tendermint SelectChain
This is incompatible with Substrate's expectations, yet should be valid
for ours
* Move the node over to the new SelectChain
* Minor tweaks
* Update SelectChain documentation
* Remove substrate/node lib.rs
This shouldn't be used as a library AFAIK. While runtime should be, and
arguably should even be published, I have yet to see node in the same
way. Helps tighten API boundaries.
* Remove unused macro_use
* Replace panicking todos with stubs and // TODO
Enables progress.
* Reduce chain_spec and use more accurate naming
* Implement block proposal logic
* Modularize to get_proposal
* Trigger block importing
Doesn't wait for the response yet, which it needs to.
* Get the result of block importing
* Split import_queue into a series of files
* Provide a way to create the machine
The BasicQueue returned obscures the TendermintImport struct.
Accordingly, a Future scoped with access is returned upwards, which when
awaited will create the machine. This makes creating the machine
optional while maintaining scope boundaries.
Is sufficient to create a 1-node net which produces and finalizes
blocks.
* Don't import justifications multiple times
Also don't broadcast blocks which were solely proposed.
* Correct justication import pipeline
Removes JustificationImport as it should never be used.
* Announce blocks
By claiming File, they're not sent ovber the P2P network before they
have a justification, as desired. Unfortunately, they never were. This
works around that.
* Add an assert to verify proposed children aren't best
* Consolidate C and I generics into a TendermintClient trait alias
* Expand sanity checks
Substrate doesn't expect nor officially support children with less work
than their parents. It's a trick used here. Accordingly, ensure the
trick's validity.
* When resetting, use the end time of the round which was committed to
The machine reset to the end time of the current round. For a delayed
network connection, a machine may move ahead in rounds and only later
realize a prior round succeeded. Despite acknowledging that round's
success, it would maintain its delay when moving to the next block,
bricking it.
Done by tracking the end time for each round as they occur.
* Move Commit from including the round to including the round's end_time
The round was usable to build the current clock in an accumulated
fashion, relative to the previous round. The end time is the absolute
metric of it, which can be used to calculate the round number (with all
previous end times).
Substrate now builds off the best block, not genesis, using the end time
included in the justification to start its machine in a synchronized
state.
Knowing the end time of a round, or the round in which block was
committed to, is necessary for nodes to sync up with Tendermint.
Encoding it in the commit ensures it's long lasting and makes it readily
available, without the load of an entire transaction.
* Add a TODO on Tendermint
* Misc bug fixes
* More misc bug fixes
* Clean up lock acquisition
* Merge weights and signing scheme into validators, documenting needed changes
* Add pallet sessions to runtime, create pallet-tendermint
* Update node to use pallet sessions
* Update support URL
* Partial work on correcting pallet calls
* Redo Tendermint folder structure
* TendermintApi, compilation fixes
* Fix the stub round robin
At some point, the modulus was removed causing it to exceed the
validators list and stop proposing.
* Use the validators list from the session pallet
* Basic Gossip Validator
* Correct Substrate Tendermint start block
The Tendermint machine uses the passed in number as the block's being
worked on number. Substrate passed in the already finalized block's
number.
Also updates misc comments.
* Clean generics in Tendermint with a monolith with associated types
* Remove the Future triggering the machine for an async fn
Enables passing data in, such as the network.
* Move TendermintMachine from start_num, time to last_num, time
Provides an explicitly clear API clearer to program around.
Also adds additional time code to handle an edge case.
* Connect the Tendermint machine to a GossipEngine
* Connect broadcast
* Remove machine from TendermintImport
It's not used there at all.
* Merge Verifier into block_import.rs
These two files were largely the same, just hooking into sync structs
with almost identical imports. As this project shapes up, removing dead
weight is appreciated.
* Create a dedicated file for being a Tendermint authority
* Deleted comment code related to PoW
* Move serai_runtime specific code from tendermint/client to node
Renames serai-consensus to sc_tendermint
* Consolidate file structure in sc_tendermint
* Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in
general.
* Consolidate references to sr25519 in sc_tendermint
* Add documentation to public structs/functions in sc_tendermint
* Add another missing comment
* Make sign asynchronous
Some relation to https://github.com/serai-dex/serai/issues/95.
* Move sc_tendermint to async sign
* Implement proper checking of inherents
* Take in a Keystore and validator ID
* Remove unnecessary PhantomDatas
* Update node to latest sc_tendermint
* Configure node for a multi-node testnet
* Fix handling of the GossipEngine
* Use a rounded genesis to obtain sufficient synchrony within the Docker env
* Correct Serai d-f names in Docker
* Remove an attempt at caching I don't believe would ever hit
* Add an already in chain check to block import
While the inner should do this for us, we call verify_order on our end
*before* inner to ensure sequential import. Accordingly, we need to
provide our own check.
Removes errors of "non-sequential import" when trying to re-import an
existing block.
* Update the consensus documentation
It was incredibly out of date.
* Add a _ to the validator arg in slash
* Make the dev profile a local testnet profile
Restores a dev profile which only has one validator, locally running.
* Reduce Arcs in TendermintMachine, split Signer from SignatureScheme
* Update sc_tendermint per previous commit
* Restore cache
* Remove error case which shouldn't be an error
* Stop returning errors on already existing blocks entirely
* Correct Dave, Eve, and Ferdie to not run as validators
* Rename dev to devnet
--dev still works thanks to the |. Acheieves a personal preference of
mine with some historical meaning.
* Add message expiry to the Tendermint gossip
* Localize the LibP2P protocol to the blockchain
Follows convention by doing so. Theoretically enables running multiple
blockchains over a single LibP2P connection.
* Add a version to sp-runtime in tendermint-machine
* Add missing trait
* Bump Substrate dependency
Fixes #147.
* Implement Schnorr half-aggregation from https://eprint.iacr.org/2021/350.pdf
Relevant to https://github.com/serai-dex/serai/issues/99.
* cargo update (tendermint)
* Move from polling loops to a pure IO model for sc_tendermint's gossip
* Correct protocol name handling
* Use futures mpsc instead of tokio
* Timeout futures
* Move from a yielding loop to select in tendermint-machine
* Update Substrate to the new TendermintHandle
* Use futures pin instead of tokio
* Only recheck blocks with non-fatal inherent transaction errors
* Update to the latest substrate
* Separate the block processing time from the latency
* Add notes to the runtime
* Don't spam slash
Also adds a slash condition of failing to propose.
* Support running TendermintMachine when not a validator
This supports validators who leave the current set, without crashing
their nodes, along with nodes trying to become validators (who will now
seamlessly transition in).
* Properly define and pass around the block size
* Correct the Duration timing
The proposer will build it, send it, then process it (on the first
round). Accordingly, it's / 3, not / 2, as / 2 only accounted for the
latter events.
* Correct time-adjustment code on round skip
* Have the machine respond to advances made by an external sync loop
* Clean up time code in tendermint-machine
* BlockData and RoundData structs
* Rename Round to RoundNumber
* Move BlockData to a new file
* Move Round to an Option due to the pseudo-uninitialized state we create
Before the addition of RoundData, we always created the round, and on
.round(0), simply created it again. With RoundData, and the changes to
the time code, we used round 0, time 0, the latter being incorrect yet
not an issue due to lack of misuse.
Now, if we do misuse it, it'll panic.
* Clear the Queue instead of draining and filtering
There shouldn't ever be a message which passes the filter under the
current design.
* BlockData::new
* Move more code into block.rs
Introduces type-aliases to obtain Data/Message/SignedMessage solely from
a Network object.
Fixes a bug regarding stepping when you're not an active validator.
* Have verify_precommit_signature return if it verified the signature
Also fixes a bug where invalid precommit signatures were left standing
and therefore contributing to commits.
* Remove the precommit signature hash
It cached signatures per-block. Precommit signatures are bound to each
round. This would lead to forming invalid commits when a commit should
be formed. Under debug, the machine would catch that and panic. On
release, it'd have everyone who wasn't a validator fail to continue
syncing.
* Slight doc changes
Also flattens the message handling function by replacing an if
containing all following code in the function with an early return for
the else case.
* Always produce notifications for finalized blocks via origin overrides
* Correct weird formatting
* Update to the latest tendermint-machine
* Manually step the Tendermint machine when we synced a block over the network
* Ignore finality notifications for old blocks
* Remove a TODO resolved in 8c51bc011d03c8d54ded05011e7f4d1a01e9f873
* Add a TODO comment to slash
Enables searching for the case-sensitive phrase and finding it.
* cargo fmt
* Use a tmp DB for Serai in Docker
* Remove panic on slash
As we move towards protonet, this can happen (if a node goes offline),
yet it happening brings down the entire net right now.
* Add log::error on slash
* created shared volume between containers
* Complete the sh scripts
* Pass in the genesis time to Substrate
* Correct block announcements
They were announced, yet not marked best.
* Correct pupulate_end_time
It was used as inclusive yet didn't work inclusively.
* Correct gossip channel jumping when a block is synced via Substrate
* Use a looser check in import_future
This triggered so it needs to be accordingly relaxed.
* Correct race conditions between add_block and step
Also corrects a <= to <.
* Update cargo deny
* rename genesis-service to genesis
* Update Cargo.lock
* Correct runtime Cargo.toml whitespace
* Correct typo
* Document recheck
* Misc lints
* Fix prev commit
* Resolve low-hanging review comments
* Mark genesis/entry-dev.sh as executable
* Prevent a commit from including the same signature multiple times
Yanks tendermint-machine 0.1.0 accordingly.
* Update to latest nightly clippy
* Improve documentation
* Use clearer variable names
* Add log statements
* Pair more log statements
* Clean TendermintAuthority::authority as possible
Merges it into new. It has way too many arguments, yet there's no clear path at
consolidation there, unfortunately.
Additionally provides better scoping within itself.
* Fix #158
Doesn't use lock_import_and_run for reasons commented (lack of async).
* Rename guard to lock
* Have the devnet use the current time as the genesis
Possible since it's only a single node, not requiring synchronization.
* Fix gossiping
I really don't know what side effect this avoids and I can't say I care at this
point.
* Misc lints
Co-authored-by: vrx00 <vrx00@proton.me>
Co-authored-by: TheArchitect108 <TheArchitect108@protonmail.com>
2022-12-03 23:38:02 +00:00
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
|
|
|
"libp2p",
|
|
|
|
"log",
|
2023-04-09 06:31:10 +00:00
|
|
|
"lru 0.9.0",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sc-network",
|
Initial Tendermint implementation (#145)
* Machine without timeouts
* Time code
* Move substrate/consensus/tendermint to substrate/tendermint
* Delete the old paper doc
* Refactor out external parts to generics
Also creates a dedicated file for the message log.
* Refactor <V, B> to type V, type B
* Successfully compiling
* Calculate timeouts
* Fix test
* Finish timeouts
* Misc cleanup
* Define a signature scheme trait
* Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde
doesn't natively support borsh, nor SCALE, and while there is a serde
SCALE crate, it's old. While it may be complete, it's not worth working
with.
While we could still grab bincode, and a variety of other formats, it
wasn't worth it to go custom and for Serai, we'll be using SCALE almost
everywhere anyways.
* Implement usage of the signature scheme
* Make the infinite test non-infinite
* Provide a dedicated signature in Precommit of just the block hash
Greatly simplifies verifying when syncing.
* Dedicated Commit object
Restores sig aggregation API.
* Tidy README
* Document tendermint
* Sign the ID directly instead of its SCALE encoding
For a hash, which is fixed-size, these should be the same yet this helps
move past the dependency on SCALE. It also, for any type where the two
values are different, smooths integration.
* Litany of bug fixes
Also attempts to make the code more readable while updating/correcting
documentation.
* Remove async recursion
Greatly increases safety as well by ensuring only one message is
processed at once.
* Correct timing issues
1) Commit didn't include the round, leaving the clock in question.
2) Machines started with a local time, instead of a proper start time.
3) Machines immediately started the next block instead of waiting for
the block time.
* Replace MultiSignature with sr25519::Signature
* Minor SignatureScheme API changes
* Map TM SignatureScheme to Substrate's sr25519
* Initial work on an import queue
* Properly use check_block
* Rename import to import_queue
* Implement tendermint_machine::Block for Substrate Blocks
Unfortunately, this immediately makes Tendermint machine capable of
deployment as crate since it uses a git reference. In the future, a
Cargo.toml patch section for serai/substrate should be investigated.
This is being done regardless as it's the quickest way forward and this
is for Serai.
* Dummy Weights
* Move documentation to the top of the file
* Move logic into TendermintImport itself
Multiple traits exist to verify/handle blocks. I'm unsure exactly when
each will be called in the pipeline, so the easiest solution is to have
every step run every check.
That would be extremely computationally expensive if we ran EVERY check,
yet we rely on Substrate for execution (and according checks), which are
limited to just the actual import function.
Since we're calling this code from many places, it makes sense for it to
be consolidated under TendermintImport.
* BlockImport, JustificationImport, Verifier, and import_queue function
* Update consensus/lib.rs from PoW to Tendermint
Not possible to be used as the previous consensus could. It will not
produce blocks nor does it currenly even instantiate a machine. This is
just he next step.
* Update Cargo.tomls for substrate packages
* Tendermint SelectChain
This is incompatible with Substrate's expectations, yet should be valid
for ours
* Move the node over to the new SelectChain
* Minor tweaks
* Update SelectChain documentation
* Remove substrate/node lib.rs
This shouldn't be used as a library AFAIK. While runtime should be, and
arguably should even be published, I have yet to see node in the same
way. Helps tighten API boundaries.
* Remove unused macro_use
* Replace panicking todos with stubs and // TODO
Enables progress.
* Reduce chain_spec and use more accurate naming
* Implement block proposal logic
* Modularize to get_proposal
* Trigger block importing
Doesn't wait for the response yet, which it needs to.
* Get the result of block importing
* Split import_queue into a series of files
* Provide a way to create the machine
The BasicQueue returned obscures the TendermintImport struct.
Accordingly, a Future scoped with access is returned upwards, which when
awaited will create the machine. This makes creating the machine
optional while maintaining scope boundaries.
Is sufficient to create a 1-node net which produces and finalizes
blocks.
* Don't import justifications multiple times
Also don't broadcast blocks which were solely proposed.
* Correct justication import pipeline
Removes JustificationImport as it should never be used.
* Announce blocks
By claiming File, they're not sent ovber the P2P network before they
have a justification, as desired. Unfortunately, they never were. This
works around that.
* Add an assert to verify proposed children aren't best
* Consolidate C and I generics into a TendermintClient trait alias
* Expand sanity checks
Substrate doesn't expect nor officially support children with less work
than their parents. It's a trick used here. Accordingly, ensure the
trick's validity.
* When resetting, use the end time of the round which was committed to
The machine reset to the end time of the current round. For a delayed
network connection, a machine may move ahead in rounds and only later
realize a prior round succeeded. Despite acknowledging that round's
success, it would maintain its delay when moving to the next block,
bricking it.
Done by tracking the end time for each round as they occur.
* Move Commit from including the round to including the round's end_time
The round was usable to build the current clock in an accumulated
fashion, relative to the previous round. The end time is the absolute
metric of it, which can be used to calculate the round number (with all
previous end times).
Substrate now builds off the best block, not genesis, using the end time
included in the justification to start its machine in a synchronized
state.
Knowing the end time of a round, or the round in which block was
committed to, is necessary for nodes to sync up with Tendermint.
Encoding it in the commit ensures it's long lasting and makes it readily
available, without the load of an entire transaction.
* Add a TODO on Tendermint
* Misc bug fixes
* More misc bug fixes
* Clean up lock acquisition
* Merge weights and signing scheme into validators, documenting needed changes
* Add pallet sessions to runtime, create pallet-tendermint
* Update node to use pallet sessions
* Update support URL
* Partial work on correcting pallet calls
* Redo Tendermint folder structure
* TendermintApi, compilation fixes
* Fix the stub round robin
At some point, the modulus was removed causing it to exceed the
validators list and stop proposing.
* Use the validators list from the session pallet
* Basic Gossip Validator
* Correct Substrate Tendermint start block
The Tendermint machine uses the passed in number as the block's being
worked on number. Substrate passed in the already finalized block's
number.
Also updates misc comments.
* Clean generics in Tendermint with a monolith with associated types
* Remove the Future triggering the machine for an async fn
Enables passing data in, such as the network.
* Move TendermintMachine from start_num, time to last_num, time
Provides an explicitly clear API clearer to program around.
Also adds additional time code to handle an edge case.
* Connect the Tendermint machine to a GossipEngine
* Connect broadcast
* Remove machine from TendermintImport
It's not used there at all.
* Merge Verifier into block_import.rs
These two files were largely the same, just hooking into sync structs
with almost identical imports. As this project shapes up, removing dead
weight is appreciated.
* Create a dedicated file for being a Tendermint authority
* Deleted comment code related to PoW
* Move serai_runtime specific code from tendermint/client to node
Renames serai-consensus to sc_tendermint
* Consolidate file structure in sc_tendermint
* Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in
general.
* Consolidate references to sr25519 in sc_tendermint
* Add documentation to public structs/functions in sc_tendermint
* Add another missing comment
* Make sign asynchronous
Some relation to https://github.com/serai-dex/serai/issues/95.
* Move sc_tendermint to async sign
* Implement proper checking of inherents
* Take in a Keystore and validator ID
* Remove unnecessary PhantomDatas
* Update node to latest sc_tendermint
* Configure node for a multi-node testnet
* Fix handling of the GossipEngine
* Use a rounded genesis to obtain sufficient synchrony within the Docker env
* Correct Serai d-f names in Docker
* Remove an attempt at caching I don't believe would ever hit
* Add an already in chain check to block import
While the inner should do this for us, we call verify_order on our end
*before* inner to ensure sequential import. Accordingly, we need to
provide our own check.
Removes errors of "non-sequential import" when trying to re-import an
existing block.
* Update the consensus documentation
It was incredibly out of date.
* Add a _ to the validator arg in slash
* Make the dev profile a local testnet profile
Restores a dev profile which only has one validator, locally running.
* Reduce Arcs in TendermintMachine, split Signer from SignatureScheme
* Update sc_tendermint per previous commit
* Restore cache
* Remove error case which shouldn't be an error
* Stop returning errors on already existing blocks entirely
* Correct Dave, Eve, and Ferdie to not run as validators
* Rename dev to devnet
--dev still works thanks to the |. Acheieves a personal preference of
mine with some historical meaning.
* Add message expiry to the Tendermint gossip
* Localize the LibP2P protocol to the blockchain
Follows convention by doing so. Theoretically enables running multiple
blockchains over a single LibP2P connection.
* Add a version to sp-runtime in tendermint-machine
* Add missing trait
* Bump Substrate dependency
Fixes #147.
* Implement Schnorr half-aggregation from https://eprint.iacr.org/2021/350.pdf
Relevant to https://github.com/serai-dex/serai/issues/99.
* cargo update (tendermint)
* Move from polling loops to a pure IO model for sc_tendermint's gossip
* Correct protocol name handling
* Use futures mpsc instead of tokio
* Timeout futures
* Move from a yielding loop to select in tendermint-machine
* Update Substrate to the new TendermintHandle
* Use futures pin instead of tokio
* Only recheck blocks with non-fatal inherent transaction errors
* Update to the latest substrate
* Separate the block processing time from the latency
* Add notes to the runtime
* Don't spam slash
Also adds a slash condition of failing to propose.
* Support running TendermintMachine when not a validator
This supports validators who leave the current set, without crashing
their nodes, along with nodes trying to become validators (who will now
seamlessly transition in).
* Properly define and pass around the block size
* Correct the Duration timing
The proposer will build it, send it, then process it (on the first
round). Accordingly, it's / 3, not / 2, as / 2 only accounted for the
latter events.
* Correct time-adjustment code on round skip
* Have the machine respond to advances made by an external sync loop
* Clean up time code in tendermint-machine
* BlockData and RoundData structs
* Rename Round to RoundNumber
* Move BlockData to a new file
* Move Round to an Option due to the pseudo-uninitialized state we create
Before the addition of RoundData, we always created the round, and on
.round(0), simply created it again. With RoundData, and the changes to
the time code, we used round 0, time 0, the latter being incorrect yet
not an issue due to lack of misuse.
Now, if we do misuse it, it'll panic.
* Clear the Queue instead of draining and filtering
There shouldn't ever be a message which passes the filter under the
current design.
* BlockData::new
* Move more code into block.rs
Introduces type-aliases to obtain Data/Message/SignedMessage solely from
a Network object.
Fixes a bug regarding stepping when you're not an active validator.
* Have verify_precommit_signature return if it verified the signature
Also fixes a bug where invalid precommit signatures were left standing
and therefore contributing to commits.
* Remove the precommit signature hash
It cached signatures per-block. Precommit signatures are bound to each
round. This would lead to forming invalid commits when a commit should
be formed. Under debug, the machine would catch that and panic. On
release, it'd have everyone who wasn't a validator fail to continue
syncing.
* Slight doc changes
Also flattens the message handling function by replacing an if
containing all following code in the function with an early return for
the else case.
* Always produce notifications for finalized blocks via origin overrides
* Correct weird formatting
* Update to the latest tendermint-machine
* Manually step the Tendermint machine when we synced a block over the network
* Ignore finality notifications for old blocks
* Remove a TODO resolved in 8c51bc011d03c8d54ded05011e7f4d1a01e9f873
* Add a TODO comment to slash
Enables searching for the case-sensitive phrase and finding it.
* cargo fmt
* Use a tmp DB for Serai in Docker
* Remove panic on slash
As we move towards protonet, this can happen (if a node goes offline),
yet it happening brings down the entire net right now.
* Add log::error on slash
* created shared volume between containers
* Complete the sh scripts
* Pass in the genesis time to Substrate
* Correct block announcements
They were announced, yet not marked best.
* Correct pupulate_end_time
It was used as inclusive yet didn't work inclusively.
* Correct gossip channel jumping when a block is synced via Substrate
* Use a looser check in import_future
This triggered so it needs to be accordingly relaxed.
* Correct race conditions between add_block and step
Also corrects a <= to <.
* Update cargo deny
* rename genesis-service to genesis
* Update Cargo.lock
* Correct runtime Cargo.toml whitespace
* Correct typo
* Document recheck
* Misc lints
* Fix prev commit
* Resolve low-hanging review comments
* Mark genesis/entry-dev.sh as executable
* Prevent a commit from including the same signature multiple times
Yanks tendermint-machine 0.1.0 accordingly.
* Update to latest nightly clippy
* Improve documentation
* Use clearer variable names
* Add log statements
* Pair more log statements
* Clean TendermintAuthority::authority as possible
Merges it into new. It has way too many arguments, yet there's no clear path at
consolidation there, unfortunately.
Additionally provides better scoping within itself.
* Fix #158
Doesn't use lock_import_and_run for reasons commented (lack of async).
* Rename guard to lock
* Have the devnet use the current time as the genesis
Possible since it's only a single node, not requiring synchronization.
* Fix gossiping
I really don't know what side effect this avoids and I can't say I care at this
point.
* Misc lints
Co-authored-by: vrx00 <vrx00@proton.me>
Co-authored-by: TheArchitect108 <TheArchitect108@protonmail.com>
2022-12-03 23:38:02 +00:00
|
|
|
"sc-network-common",
|
|
|
|
"sc-peerset",
|
|
|
|
"sp-runtime",
|
|
|
|
"substrate-prometheus-endpoint",
|
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sc-network-light"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-09-29 18:33:09 +00:00
|
|
|
"array-bytes",
|
2023-06-28 18:57:58 +00:00
|
|
|
"async-channel",
|
2022-07-16 21:49:35 +00:00
|
|
|
"futures",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-identity",
|
2022-07-16 21:49:35 +00:00
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
2022-10-20 05:05:36 +00:00
|
|
|
"prost",
|
|
|
|
"prost-build",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-client-api",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sc-network",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-network-common",
|
|
|
|
"sc-peerset",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-core",
|
|
|
|
"sp-runtime",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-network-sync"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-09-29 18:33:09 +00:00
|
|
|
"array-bytes",
|
2023-06-28 18:57:58 +00:00
|
|
|
"async-channel",
|
2023-01-04 08:17:36 +00:00
|
|
|
"async-trait",
|
2022-07-16 21:49:35 +00:00
|
|
|
"fork-tree",
|
|
|
|
"futures",
|
2023-03-26 12:43:01 +00:00
|
|
|
"futures-timer",
|
2022-07-16 21:49:35 +00:00
|
|
|
"libp2p",
|
|
|
|
"log",
|
2023-04-09 06:31:10 +00:00
|
|
|
"lru 0.9.0",
|
2022-10-20 05:05:36 +00:00
|
|
|
"mockall",
|
2022-07-16 21:49:35 +00:00
|
|
|
"parity-scale-codec",
|
2022-10-20 05:05:36 +00:00
|
|
|
"prost",
|
|
|
|
"prost-build",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-client-api",
|
|
|
|
"sc-consensus",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sc-network",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-network-common",
|
|
|
|
"sc-peerset",
|
2022-10-20 05:05:36 +00:00
|
|
|
"sc-utils",
|
2022-07-16 21:49:35 +00:00
|
|
|
"smallvec",
|
|
|
|
"sp-arithmetic",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-consensus",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sp-consensus-grandpa",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-core",
|
|
|
|
"sp-runtime",
|
2023-01-04 08:17:36 +00:00
|
|
|
"substrate-prometheus-endpoint",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
2022-09-29 18:33:09 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sc-network-transactions"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-09-29 18:33:09 +00:00
|
|
|
dependencies = [
|
|
|
|
"array-bytes",
|
|
|
|
"futures",
|
|
|
|
"libp2p",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"pin-project",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sc-network",
|
2022-09-29 18:33:09 +00:00
|
|
|
"sc-network-common",
|
|
|
|
"sc-peerset",
|
2023-01-16 15:42:31 +00:00
|
|
|
"sc-utils",
|
2022-09-29 18:33:09 +00:00
|
|
|
"sp-consensus",
|
|
|
|
"sp-runtime",
|
|
|
|
"substrate-prometheus-endpoint",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sc-offchain"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-09-29 18:33:09 +00:00
|
|
|
"array-bytes",
|
2022-07-16 21:49:35 +00:00
|
|
|
"bytes",
|
|
|
|
"fnv",
|
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
|
|
|
"hyper",
|
2023-06-22 10:25:30 +00:00
|
|
|
"hyper-rustls 0.23.2",
|
2022-09-29 18:33:09 +00:00
|
|
|
"libp2p",
|
2022-07-16 21:49:35 +00:00
|
|
|
"num_cpus",
|
|
|
|
"once_cell",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"parking_lot 0.12.1",
|
2023-01-16 15:42:31 +00:00
|
|
|
"rand 0.8.5",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-client-api",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sc-network",
|
2022-09-29 18:33:09 +00:00
|
|
|
"sc-network-common",
|
|
|
|
"sc-peerset",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-utils",
|
|
|
|
"sp-api",
|
|
|
|
"sp-core",
|
|
|
|
"sp-offchain",
|
|
|
|
"sp-runtime",
|
|
|
|
"threadpool",
|
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-peerset"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"futures",
|
2023-06-28 18:57:58 +00:00
|
|
|
"libp2p-identity",
|
2022-07-16 21:49:35 +00:00
|
|
|
"log",
|
2023-06-28 18:57:58 +00:00
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"partial_sort",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-utils",
|
|
|
|
"serde_json",
|
2023-06-28 18:57:58 +00:00
|
|
|
"sp-arithmetic",
|
2022-07-16 21:49:35 +00:00
|
|
|
"wasm-timer",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-proposer-metrics"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"log",
|
|
|
|
"substrate-prometheus-endpoint",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-rpc"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"futures",
|
|
|
|
"jsonrpsee",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"sc-block-builder",
|
|
|
|
"sc-chain-spec",
|
|
|
|
"sc-client-api",
|
|
|
|
"sc-rpc-api",
|
|
|
|
"sc-tracing",
|
|
|
|
"sc-transaction-pool-api",
|
|
|
|
"sc-utils",
|
|
|
|
"serde_json",
|
|
|
|
"sp-api",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-core",
|
|
|
|
"sp-keystore",
|
|
|
|
"sp-offchain",
|
|
|
|
"sp-rpc",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-session",
|
2023-06-28 18:57:58 +00:00
|
|
|
"sp-statement-store",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-version",
|
2023-03-06 12:39:43 +00:00
|
|
|
"tokio",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-rpc-api"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"jsonrpsee",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"sc-chain-spec",
|
|
|
|
"sc-transaction-pool-api",
|
|
|
|
"scale-info",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"sp-core",
|
|
|
|
"sp-rpc",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-version",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-rpc-server"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-01-04 08:17:36 +00:00
|
|
|
"http",
|
2022-07-16 21:49:35 +00:00
|
|
|
"jsonrpsee",
|
|
|
|
"log",
|
|
|
|
"serde_json",
|
|
|
|
"substrate-prometheus-endpoint",
|
|
|
|
"tokio",
|
2023-01-04 08:17:36 +00:00
|
|
|
"tower",
|
|
|
|
"tower-http",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2022-10-20 05:05:36 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sc-rpc-spec-v2"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-10-20 05:05:36 +00:00
|
|
|
dependencies = [
|
2023-01-16 15:42:31 +00:00
|
|
|
"array-bytes",
|
2022-10-20 05:05:36 +00:00
|
|
|
"futures",
|
2023-01-16 15:42:31 +00:00
|
|
|
"futures-util",
|
2022-10-20 05:05:36 +00:00
|
|
|
"hex",
|
|
|
|
"jsonrpsee",
|
2023-01-16 15:42:31 +00:00
|
|
|
"log",
|
2022-10-20 05:05:36 +00:00
|
|
|
"parity-scale-codec",
|
2023-01-16 15:42:31 +00:00
|
|
|
"parking_lot 0.12.1",
|
2022-10-20 05:05:36 +00:00
|
|
|
"sc-chain-spec",
|
2023-01-16 15:42:31 +00:00
|
|
|
"sc-client-api",
|
2022-10-20 05:05:36 +00:00
|
|
|
"sc-transaction-pool-api",
|
|
|
|
"serde",
|
|
|
|
"sp-api",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-core",
|
|
|
|
"sp-runtime",
|
2023-01-16 15:42:31 +00:00
|
|
|
"sp-version",
|
2022-10-20 05:05:36 +00:00
|
|
|
"thiserror",
|
2023-01-16 15:42:31 +00:00
|
|
|
"tokio-stream",
|
2022-10-20 05:05:36 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sc-service"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"directories",
|
|
|
|
"exit-future",
|
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
|
|
|
"jsonrpsee",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"pin-project",
|
2023-01-16 15:42:31 +00:00
|
|
|
"rand 0.8.5",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-block-builder",
|
|
|
|
"sc-chain-spec",
|
|
|
|
"sc-client-api",
|
|
|
|
"sc-client-db",
|
|
|
|
"sc-consensus",
|
|
|
|
"sc-executor",
|
|
|
|
"sc-informant",
|
|
|
|
"sc-keystore",
|
|
|
|
"sc-network",
|
2022-09-29 18:33:09 +00:00
|
|
|
"sc-network-bitswap",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-network-common",
|
2022-08-16 07:44:32 +00:00
|
|
|
"sc-network-light",
|
|
|
|
"sc-network-sync",
|
2022-09-29 18:33:09 +00:00
|
|
|
"sc-network-transactions",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-offchain",
|
|
|
|
"sc-rpc",
|
|
|
|
"sc-rpc-server",
|
2022-10-20 05:05:36 +00:00
|
|
|
"sc-rpc-spec-v2",
|
2023-03-06 12:39:43 +00:00
|
|
|
"sc-storage-monitor",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-sysinfo",
|
|
|
|
"sc-telemetry",
|
|
|
|
"sc-tracing",
|
|
|
|
"sc-transaction-pool",
|
|
|
|
"sc-transaction-pool-api",
|
|
|
|
"sc-utils",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"sp-api",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-consensus",
|
|
|
|
"sp-core",
|
|
|
|
"sp-externalities",
|
|
|
|
"sp-keystore",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-session",
|
|
|
|
"sp-state-machine",
|
|
|
|
"sp-storage",
|
|
|
|
"sp-transaction-pool",
|
|
|
|
"sp-transaction-storage-proof",
|
|
|
|
"sp-trie",
|
|
|
|
"sp-version",
|
2022-09-29 18:33:09 +00:00
|
|
|
"static_init",
|
2022-07-16 21:49:35 +00:00
|
|
|
"substrate-prometheus-endpoint",
|
|
|
|
"tempfile",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
"tracing",
|
|
|
|
"tracing-futures",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-state-db"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"sp-core",
|
|
|
|
]
|
|
|
|
|
2023-03-06 12:39:43 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sc-storage-monitor"
|
|
|
|
version = "0.1.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2023-03-06 12:39:43 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"clap",
|
2023-03-26 12:43:01 +00:00
|
|
|
"fs4",
|
2023-06-28 18:57:58 +00:00
|
|
|
"futures",
|
2023-03-06 12:39:43 +00:00
|
|
|
"log",
|
|
|
|
"sc-client-db",
|
|
|
|
"sc-utils",
|
|
|
|
"sp-core",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sc-sysinfo"
|
|
|
|
version = "6.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"futures",
|
|
|
|
"libc",
|
|
|
|
"log",
|
2023-01-16 15:42:31 +00:00
|
|
|
"rand 0.8.5",
|
|
|
|
"rand_pcg",
|
2022-07-16 21:49:35 +00:00
|
|
|
"regex",
|
|
|
|
"sc-telemetry",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"sp-core",
|
|
|
|
"sp-io",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-telemetry"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"chrono",
|
|
|
|
"futures",
|
|
|
|
"libp2p",
|
|
|
|
"log",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"pin-project",
|
2023-01-16 15:42:31 +00:00
|
|
|
"rand 0.8.5",
|
|
|
|
"sc-utils",
|
2022-07-16 21:49:35 +00:00
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"thiserror",
|
|
|
|
"wasm-timer",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-tracing"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-04-15 07:27:45 +00:00
|
|
|
"anstyle",
|
2022-07-16 21:49:35 +00:00
|
|
|
"chrono",
|
2023-07-02 00:27:03 +00:00
|
|
|
"is-terminal",
|
2022-07-16 21:49:35 +00:00
|
|
|
"lazy_static",
|
|
|
|
"libc",
|
|
|
|
"log",
|
|
|
|
"once_cell",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"regex",
|
|
|
|
"rustc-hash",
|
|
|
|
"sc-client-api",
|
|
|
|
"sc-rpc-server",
|
|
|
|
"sc-tracing-proc-macro",
|
|
|
|
"serde",
|
|
|
|
"sp-api",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-core",
|
|
|
|
"sp-rpc",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-tracing",
|
|
|
|
"thiserror",
|
|
|
|
"tracing",
|
|
|
|
"tracing-log",
|
|
|
|
"tracing-subscriber",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-tracing-proc-macro"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-12-07 23:05:06 +00:00
|
|
|
"proc-macro-crate",
|
2022-07-16 21:49:35 +00:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-transaction-pool"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-10-20 05:05:36 +00:00
|
|
|
"async-trait",
|
2022-07-16 21:49:35 +00:00
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
|
|
|
"linked-hash-map",
|
|
|
|
"log",
|
2023-03-06 12:39:43 +00:00
|
|
|
"num-traits",
|
2022-07-16 21:49:35 +00:00
|
|
|
"parity-scale-codec",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"sc-client-api",
|
|
|
|
"sc-transaction-pool-api",
|
|
|
|
"sc-utils",
|
|
|
|
"serde",
|
|
|
|
"sp-api",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-core",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-tracing",
|
|
|
|
"sp-transaction-pool",
|
|
|
|
"substrate-prometheus-endpoint",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-transaction-pool-api"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-10-20 05:05:36 +00:00
|
|
|
"async-trait",
|
2022-07-16 21:49:35 +00:00
|
|
|
"futures",
|
|
|
|
"log",
|
|
|
|
"serde",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-runtime",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sc-utils"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-03-26 12:43:01 +00:00
|
|
|
"async-channel",
|
2022-07-16 21:49:35 +00:00
|
|
|
"futures",
|
|
|
|
"futures-timer",
|
|
|
|
"lazy_static",
|
|
|
|
"log",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"prometheus",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sp-arithmetic",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-01-20 16:00:18 +00:00
|
|
|
[[package]]
|
|
|
|
name = "scale-bits"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8dd7aca73785181cc41f0bbe017263e682b585ca660540ba569133901d013ecf"
|
|
|
|
dependencies = [
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "scale-decode"
|
2023-04-15 09:23:57 +00:00
|
|
|
version = "0.5.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "c7e5527e4b3bf079d4c0b2f253418598c380722ba37ef20fac9088081407f2b6"
|
|
|
|
dependencies = [
|
|
|
|
"parity-scale-codec",
|
|
|
|
"primitive-types",
|
|
|
|
"scale-bits",
|
|
|
|
"scale-decode-derive",
|
|
|
|
"scale-info",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "scale-decode-derive"
|
|
|
|
version = "0.5.0"
|
2023-01-20 16:00:18 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-15 09:23:57 +00:00
|
|
|
checksum = "b38741b2f78e4391b94eac6b102af0f6ea2b0f7fe65adb55d7f4004f507854db"
|
|
|
|
dependencies = [
|
|
|
|
"darling",
|
|
|
|
"proc-macro-crate",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn 1.0.109",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "scale-encode"
|
|
|
|
version = "0.1.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "15546e5efbb45f0fc2291f7e202dee8623274c5d8bbfdf9c6886cc8b44a7ced3"
|
2023-01-20 16:00:18 +00:00
|
|
|
dependencies = [
|
|
|
|
"parity-scale-codec",
|
2023-04-15 09:23:57 +00:00
|
|
|
"primitive-types",
|
2023-01-20 16:00:18 +00:00
|
|
|
"scale-bits",
|
2023-04-15 09:23:57 +00:00
|
|
|
"scale-encode-derive",
|
2023-01-20 16:00:18 +00:00
|
|
|
"scale-info",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
2023-04-15 09:23:57 +00:00
|
|
|
[[package]]
|
|
|
|
name = "scale-encode-derive"
|
|
|
|
version = "0.1.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "dd983cf0a9effd76138554ead18a6de542d1af175ac12fd5e91836c5c0268082"
|
|
|
|
dependencies = [
|
|
|
|
"darling",
|
|
|
|
"proc-macro-crate",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn 1.0.109",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "scale-info"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.8.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "ad560913365790f17cbf12479491169f01b9d46d29cfc7422bf8c64bdc61b731"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"bitvec 1.0.1",
|
|
|
|
"cfg-if",
|
|
|
|
"derive_more",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info-derive",
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "scale-info-derive"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.8.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "19df9bd9ace6cc2fe19387c96ce677e823e07d017ceed253e7bb3d1d1bd9c73b"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-12-07 23:05:06 +00:00
|
|
|
"proc-macro-crate",
|
2022-07-16 21:49:35 +00:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-01-20 16:00:18 +00:00
|
|
|
[[package]]
|
|
|
|
name = "scale-value"
|
2023-04-15 09:23:57 +00:00
|
|
|
version = "0.7.0"
|
2023-01-20 16:00:18 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-15 09:23:57 +00:00
|
|
|
checksum = "11f549769261561e6764218f847e500588f9a79a289de49ce92f9e26642a3574"
|
2023-01-20 16:00:18 +00:00
|
|
|
dependencies = [
|
|
|
|
"either",
|
|
|
|
"frame-metadata",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-bits",
|
|
|
|
"scale-decode",
|
2023-04-15 09:23:57 +00:00
|
|
|
"scale-encode",
|
2023-01-20 16:00:18 +00:00
|
|
|
"scale-info",
|
|
|
|
"serde",
|
|
|
|
"thiserror",
|
|
|
|
"yap",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "schannel"
|
2023-01-16 15:42:31 +00:00
|
|
|
version = "0.1.21"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-16 15:42:31 +00:00
|
|
|
checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-01-16 15:42:31 +00:00
|
|
|
"windows-sys 0.42.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-03-06 12:39:43 +00:00
|
|
|
[[package]]
|
|
|
|
name = "schnellru"
|
|
|
|
version = "0.2.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d"
|
|
|
|
dependencies = [
|
|
|
|
"ahash 0.8.3",
|
|
|
|
"cfg-if",
|
|
|
|
"hashbrown 0.13.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2022-10-29 08:54:42 +00:00
|
|
|
[[package]]
|
|
|
|
name = "schnorr-signatures"
|
2023-03-21 00:28:41 +00:00
|
|
|
version = "0.4.0"
|
2022-10-29 08:54:42 +00:00
|
|
|
dependencies = [
|
|
|
|
"ciphersuite",
|
|
|
|
"dalek-ff-group",
|
2023-03-02 15:04:18 +00:00
|
|
|
"flexible-transcript",
|
|
|
|
"hex",
|
2022-10-29 08:54:42 +00:00
|
|
|
"multiexp",
|
|
|
|
"rand_core 0.6.4",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2023-04-22 08:38:47 +00:00
|
|
|
"std-shims",
|
2022-10-29 08:54:42 +00:00
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "schnorrkel"
|
2023-04-08 08:44:28 +00:00
|
|
|
version = "0.10.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-08 08:44:28 +00:00
|
|
|
checksum = "844b7645371e6ecdf61ff246ba1958c29e802881a749ae3fb1993675d210d28d"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"arrayref",
|
2023-04-08 08:44:28 +00:00
|
|
|
"arrayvec",
|
|
|
|
"curve25519-dalek-ng",
|
|
|
|
"merlin",
|
|
|
|
"rand_core 0.6.4",
|
|
|
|
"serde_bytes",
|
|
|
|
"sha2 0.9.9",
|
|
|
|
"subtle-ng",
|
2022-07-16 21:49:35 +00:00
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "scopeguard"
|
|
|
|
version = "1.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
|
|
|
|
2022-10-20 05:05:36 +00:00
|
|
|
[[package]]
|
|
|
|
name = "scratch"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "1.0.5"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1"
|
2022-10-20 05:05:36 +00:00
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "scrypt"
|
2022-12-07 23:05:06 +00:00
|
|
|
version = "0.10.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-07 23:05:06 +00:00
|
|
|
checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"hmac 0.12.1",
|
2022-12-07 23:05:06 +00:00
|
|
|
"pbkdf2 0.11.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"salsa20",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sct"
|
|
|
|
version = "0.6.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce"
|
|
|
|
dependencies = [
|
|
|
|
"ring",
|
|
|
|
"untrusted",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sct"
|
|
|
|
version = "0.7.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4"
|
|
|
|
dependencies = [
|
|
|
|
"ring",
|
|
|
|
"untrusted",
|
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sdp"
|
|
|
|
version = "0.5.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4d22a5ef407871893fd72b4562ee15e4742269b173959db4b8df6f538c414e13"
|
|
|
|
dependencies = [
|
|
|
|
"rand 0.8.5",
|
|
|
|
"substring",
|
|
|
|
"thiserror",
|
|
|
|
"url",
|
|
|
|
]
|
|
|
|
|
2023-01-17 07:35:22 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sealed"
|
|
|
|
version = "0.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6b5e421024b5e5edfbaa8e60ecf90bda9dbffc602dbb230e6028763f85f0c68c"
|
|
|
|
dependencies = [
|
|
|
|
"heck 0.3.3",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2023-01-17 07:35:22 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sec1"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928"
|
|
|
|
dependencies = [
|
2023-03-25 04:45:33 +00:00
|
|
|
"base16ct 0.1.1",
|
|
|
|
"der 0.6.1",
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2023-03-25 04:45:33 +00:00
|
|
|
"pkcs8 0.9.0",
|
|
|
|
"subtle",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sec1"
|
2023-04-10 04:27:17 +00:00
|
|
|
version = "0.7.2"
|
2023-03-25 04:45:33 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-10 04:27:17 +00:00
|
|
|
checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e"
|
2023-03-25 04:45:33 +00:00
|
|
|
dependencies = [
|
|
|
|
"base16ct 0.2.0",
|
2023-07-02 00:27:03 +00:00
|
|
|
"der 0.7.7",
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
|
|
|
"pkcs8 0.10.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"subtle",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "secp256k1"
|
2023-04-09 06:31:10 +00:00
|
|
|
version = "0.27.0"
|
2022-07-17 21:17:23 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 06:31:10 +00:00
|
|
|
checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f"
|
2022-07-17 21:17:23 +00:00
|
|
|
dependencies = [
|
2023-01-31 12:48:14 +00:00
|
|
|
"bitcoin_hashes",
|
|
|
|
"rand 0.8.5",
|
2022-08-16 07:44:32 +00:00
|
|
|
"secp256k1-sys",
|
2023-01-31 12:48:14 +00:00
|
|
|
"serde",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "secp256k1-sys"
|
2023-04-09 06:31:10 +00:00
|
|
|
version = "0.8.1"
|
2022-07-17 21:17:23 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 06:31:10 +00:00
|
|
|
checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e"
|
2022-07-17 21:17:23 +00:00
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "secrecy"
|
|
|
|
version = "0.8.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e"
|
|
|
|
dependencies = [
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "security-framework"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.9.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"bitflags 1.3.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"core-foundation",
|
|
|
|
"core-foundation-sys",
|
|
|
|
"libc",
|
|
|
|
"security-framework-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "security-framework-sys"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.9.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"core-foundation-sys",
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "semver"
|
|
|
|
version = "0.6.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537"
|
|
|
|
dependencies = [
|
|
|
|
"semver-parser",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "semver"
|
2023-03-16 23:37:32 +00:00
|
|
|
version = "1.0.17"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-16 23:37:32 +00:00
|
|
|
checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "semver-parser"
|
|
|
|
version = "0.7.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
|
|
|
|
2023-03-25 04:45:33 +00:00
|
|
|
[[package]]
|
|
|
|
name = "send_wrapper"
|
|
|
|
version = "0.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "send_wrapper"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.6.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73"
|
2022-07-18 00:56:10 +00:00
|
|
|
|
|
|
|
[[package]]
|
2023-01-20 16:00:18 +00:00
|
|
|
name = "serai-client"
|
2022-07-18 00:56:10 +00:00
|
|
|
version = "0.1.0"
|
|
|
|
dependencies = [
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"bitcoin",
|
|
|
|
"ciphersuite",
|
2023-05-13 06:02:47 +00:00
|
|
|
"frost-schnorrkel",
|
2022-07-18 07:06:07 +00:00
|
|
|
"lazy_static",
|
2023-05-13 06:02:47 +00:00
|
|
|
"modular-frost",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"monero-serai",
|
2022-07-18 00:56:10 +00:00
|
|
|
"parity-scale-codec",
|
2023-01-28 06:47:13 +00:00
|
|
|
"rand_core 0.6.4",
|
2022-07-18 00:56:10 +00:00
|
|
|
"scale-info",
|
2023-01-20 16:00:18 +00:00
|
|
|
"serai-runtime",
|
2023-01-28 06:47:13 +00:00
|
|
|
"sp-core",
|
2023-01-20 16:00:18 +00:00
|
|
|
"subxt",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
2023-05-13 06:02:47 +00:00
|
|
|
"zeroize",
|
2022-07-18 00:56:10 +00:00
|
|
|
]
|
|
|
|
|
2023-04-14 15:41:01 +00:00
|
|
|
[[package]]
|
|
|
|
name = "serai-db"
|
|
|
|
version = "0.1.0"
|
|
|
|
|
2023-07-01 12:53:46 +00:00
|
|
|
[[package]]
|
|
|
|
name = "serai-message-queue"
|
|
|
|
version = "0.1.0"
|
|
|
|
dependencies = [
|
|
|
|
"ciphersuite",
|
|
|
|
"flexible-transcript",
|
|
|
|
"hex",
|
|
|
|
"jsonrpsee",
|
|
|
|
"lazy_static",
|
|
|
|
"log",
|
|
|
|
"schnorr-signatures",
|
|
|
|
"serai-db",
|
|
|
|
"serai-primitives",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"tokio",
|
|
|
|
]
|
|
|
|
|
2023-04-22 08:38:47 +00:00
|
|
|
[[package]]
|
|
|
|
name = "serai-no-std"
|
|
|
|
version = "0.1.0"
|
|
|
|
dependencies = [
|
|
|
|
"ciphersuite",
|
|
|
|
"dalek-ff-group",
|
2023-05-13 03:24:47 +00:00
|
|
|
"dkg",
|
2023-05-13 08:20:13 +00:00
|
|
|
"dleq",
|
2023-04-22 08:38:47 +00:00
|
|
|
"flexible-transcript",
|
|
|
|
"minimal-ed448",
|
|
|
|
"monero-generators",
|
2023-06-29 08:14:29 +00:00
|
|
|
"monero-serai",
|
2023-04-22 08:38:47 +00:00
|
|
|
"multiexp",
|
|
|
|
"schnorr-signatures",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "serai-node"
|
|
|
|
version = "0.1.0"
|
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"clap",
|
2022-07-16 21:49:35 +00:00
|
|
|
"frame-benchmarking",
|
|
|
|
"frame-benchmarking-cli",
|
2023-03-26 12:43:01 +00:00
|
|
|
"futures",
|
2022-07-16 21:49:35 +00:00
|
|
|
"jsonrpsee",
|
|
|
|
"pallet-transaction-payment-rpc",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sc-authority-discovery",
|
Initial Tendermint implementation (#145)
* Machine without timeouts
* Time code
* Move substrate/consensus/tendermint to substrate/tendermint
* Delete the old paper doc
* Refactor out external parts to generics
Also creates a dedicated file for the message log.
* Refactor <V, B> to type V, type B
* Successfully compiling
* Calculate timeouts
* Fix test
* Finish timeouts
* Misc cleanup
* Define a signature scheme trait
* Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde
doesn't natively support borsh, nor SCALE, and while there is a serde
SCALE crate, it's old. While it may be complete, it's not worth working
with.
While we could still grab bincode, and a variety of other formats, it
wasn't worth it to go custom and for Serai, we'll be using SCALE almost
everywhere anyways.
* Implement usage of the signature scheme
* Make the infinite test non-infinite
* Provide a dedicated signature in Precommit of just the block hash
Greatly simplifies verifying when syncing.
* Dedicated Commit object
Restores sig aggregation API.
* Tidy README
* Document tendermint
* Sign the ID directly instead of its SCALE encoding
For a hash, which is fixed-size, these should be the same yet this helps
move past the dependency on SCALE. It also, for any type where the two
values are different, smooths integration.
* Litany of bug fixes
Also attempts to make the code more readable while updating/correcting
documentation.
* Remove async recursion
Greatly increases safety as well by ensuring only one message is
processed at once.
* Correct timing issues
1) Commit didn't include the round, leaving the clock in question.
2) Machines started with a local time, instead of a proper start time.
3) Machines immediately started the next block instead of waiting for
the block time.
* Replace MultiSignature with sr25519::Signature
* Minor SignatureScheme API changes
* Map TM SignatureScheme to Substrate's sr25519
* Initial work on an import queue
* Properly use check_block
* Rename import to import_queue
* Implement tendermint_machine::Block for Substrate Blocks
Unfortunately, this immediately makes Tendermint machine capable of
deployment as crate since it uses a git reference. In the future, a
Cargo.toml patch section for serai/substrate should be investigated.
This is being done regardless as it's the quickest way forward and this
is for Serai.
* Dummy Weights
* Move documentation to the top of the file
* Move logic into TendermintImport itself
Multiple traits exist to verify/handle blocks. I'm unsure exactly when
each will be called in the pipeline, so the easiest solution is to have
every step run every check.
That would be extremely computationally expensive if we ran EVERY check,
yet we rely on Substrate for execution (and according checks), which are
limited to just the actual import function.
Since we're calling this code from many places, it makes sense for it to
be consolidated under TendermintImport.
* BlockImport, JustificationImport, Verifier, and import_queue function
* Update consensus/lib.rs from PoW to Tendermint
Not possible to be used as the previous consensus could. It will not
produce blocks nor does it currenly even instantiate a machine. This is
just he next step.
* Update Cargo.tomls for substrate packages
* Tendermint SelectChain
This is incompatible with Substrate's expectations, yet should be valid
for ours
* Move the node over to the new SelectChain
* Minor tweaks
* Update SelectChain documentation
* Remove substrate/node lib.rs
This shouldn't be used as a library AFAIK. While runtime should be, and
arguably should even be published, I have yet to see node in the same
way. Helps tighten API boundaries.
* Remove unused macro_use
* Replace panicking todos with stubs and // TODO
Enables progress.
* Reduce chain_spec and use more accurate naming
* Implement block proposal logic
* Modularize to get_proposal
* Trigger block importing
Doesn't wait for the response yet, which it needs to.
* Get the result of block importing
* Split import_queue into a series of files
* Provide a way to create the machine
The BasicQueue returned obscures the TendermintImport struct.
Accordingly, a Future scoped with access is returned upwards, which when
awaited will create the machine. This makes creating the machine
optional while maintaining scope boundaries.
Is sufficient to create a 1-node net which produces and finalizes
blocks.
* Don't import justifications multiple times
Also don't broadcast blocks which were solely proposed.
* Correct justication import pipeline
Removes JustificationImport as it should never be used.
* Announce blocks
By claiming File, they're not sent ovber the P2P network before they
have a justification, as desired. Unfortunately, they never were. This
works around that.
* Add an assert to verify proposed children aren't best
* Consolidate C and I generics into a TendermintClient trait alias
* Expand sanity checks
Substrate doesn't expect nor officially support children with less work
than their parents. It's a trick used here. Accordingly, ensure the
trick's validity.
* When resetting, use the end time of the round which was committed to
The machine reset to the end time of the current round. For a delayed
network connection, a machine may move ahead in rounds and only later
realize a prior round succeeded. Despite acknowledging that round's
success, it would maintain its delay when moving to the next block,
bricking it.
Done by tracking the end time for each round as they occur.
* Move Commit from including the round to including the round's end_time
The round was usable to build the current clock in an accumulated
fashion, relative to the previous round. The end time is the absolute
metric of it, which can be used to calculate the round number (with all
previous end times).
Substrate now builds off the best block, not genesis, using the end time
included in the justification to start its machine in a synchronized
state.
Knowing the end time of a round, or the round in which block was
committed to, is necessary for nodes to sync up with Tendermint.
Encoding it in the commit ensures it's long lasting and makes it readily
available, without the load of an entire transaction.
* Add a TODO on Tendermint
* Misc bug fixes
* More misc bug fixes
* Clean up lock acquisition
* Merge weights and signing scheme into validators, documenting needed changes
* Add pallet sessions to runtime, create pallet-tendermint
* Update node to use pallet sessions
* Update support URL
* Partial work on correcting pallet calls
* Redo Tendermint folder structure
* TendermintApi, compilation fixes
* Fix the stub round robin
At some point, the modulus was removed causing it to exceed the
validators list and stop proposing.
* Use the validators list from the session pallet
* Basic Gossip Validator
* Correct Substrate Tendermint start block
The Tendermint machine uses the passed in number as the block's being
worked on number. Substrate passed in the already finalized block's
number.
Also updates misc comments.
* Clean generics in Tendermint with a monolith with associated types
* Remove the Future triggering the machine for an async fn
Enables passing data in, such as the network.
* Move TendermintMachine from start_num, time to last_num, time
Provides an explicitly clear API clearer to program around.
Also adds additional time code to handle an edge case.
* Connect the Tendermint machine to a GossipEngine
* Connect broadcast
* Remove machine from TendermintImport
It's not used there at all.
* Merge Verifier into block_import.rs
These two files were largely the same, just hooking into sync structs
with almost identical imports. As this project shapes up, removing dead
weight is appreciated.
* Create a dedicated file for being a Tendermint authority
* Deleted comment code related to PoW
* Move serai_runtime specific code from tendermint/client to node
Renames serai-consensus to sc_tendermint
* Consolidate file structure in sc_tendermint
* Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in
general.
* Consolidate references to sr25519 in sc_tendermint
* Add documentation to public structs/functions in sc_tendermint
* Add another missing comment
* Make sign asynchronous
Some relation to https://github.com/serai-dex/serai/issues/95.
* Move sc_tendermint to async sign
* Implement proper checking of inherents
* Take in a Keystore and validator ID
* Remove unnecessary PhantomDatas
* Update node to latest sc_tendermint
* Configure node for a multi-node testnet
* Fix handling of the GossipEngine
* Use a rounded genesis to obtain sufficient synchrony within the Docker env
* Correct Serai d-f names in Docker
* Remove an attempt at caching I don't believe would ever hit
* Add an already in chain check to block import
While the inner should do this for us, we call verify_order on our end
*before* inner to ensure sequential import. Accordingly, we need to
provide our own check.
Removes errors of "non-sequential import" when trying to re-import an
existing block.
* Update the consensus documentation
It was incredibly out of date.
* Add a _ to the validator arg in slash
* Make the dev profile a local testnet profile
Restores a dev profile which only has one validator, locally running.
* Reduce Arcs in TendermintMachine, split Signer from SignatureScheme
* Update sc_tendermint per previous commit
* Restore cache
* Remove error case which shouldn't be an error
* Stop returning errors on already existing blocks entirely
* Correct Dave, Eve, and Ferdie to not run as validators
* Rename dev to devnet
--dev still works thanks to the |. Acheieves a personal preference of
mine with some historical meaning.
* Add message expiry to the Tendermint gossip
* Localize the LibP2P protocol to the blockchain
Follows convention by doing so. Theoretically enables running multiple
blockchains over a single LibP2P connection.
* Add a version to sp-runtime in tendermint-machine
* Add missing trait
* Bump Substrate dependency
Fixes #147.
* Implement Schnorr half-aggregation from https://eprint.iacr.org/2021/350.pdf
Relevant to https://github.com/serai-dex/serai/issues/99.
* cargo update (tendermint)
* Move from polling loops to a pure IO model for sc_tendermint's gossip
* Correct protocol name handling
* Use futures mpsc instead of tokio
* Timeout futures
* Move from a yielding loop to select in tendermint-machine
* Update Substrate to the new TendermintHandle
* Use futures pin instead of tokio
* Only recheck blocks with non-fatal inherent transaction errors
* Update to the latest substrate
* Separate the block processing time from the latency
* Add notes to the runtime
* Don't spam slash
Also adds a slash condition of failing to propose.
* Support running TendermintMachine when not a validator
This supports validators who leave the current set, without crashing
their nodes, along with nodes trying to become validators (who will now
seamlessly transition in).
* Properly define and pass around the block size
* Correct the Duration timing
The proposer will build it, send it, then process it (on the first
round). Accordingly, it's / 3, not / 2, as / 2 only accounted for the
latter events.
* Correct time-adjustment code on round skip
* Have the machine respond to advances made by an external sync loop
* Clean up time code in tendermint-machine
* BlockData and RoundData structs
* Rename Round to RoundNumber
* Move BlockData to a new file
* Move Round to an Option due to the pseudo-uninitialized state we create
Before the addition of RoundData, we always created the round, and on
.round(0), simply created it again. With RoundData, and the changes to
the time code, we used round 0, time 0, the latter being incorrect yet
not an issue due to lack of misuse.
Now, if we do misuse it, it'll panic.
* Clear the Queue instead of draining and filtering
There shouldn't ever be a message which passes the filter under the
current design.
* BlockData::new
* Move more code into block.rs
Introduces type-aliases to obtain Data/Message/SignedMessage solely from
a Network object.
Fixes a bug regarding stepping when you're not an active validator.
* Have verify_precommit_signature return if it verified the signature
Also fixes a bug where invalid precommit signatures were left standing
and therefore contributing to commits.
* Remove the precommit signature hash
It cached signatures per-block. Precommit signatures are bound to each
round. This would lead to forming invalid commits when a commit should
be formed. Under debug, the machine would catch that and panic. On
release, it'd have everyone who wasn't a validator fail to continue
syncing.
* Slight doc changes
Also flattens the message handling function by replacing an if
containing all following code in the function with an early return for
the else case.
* Always produce notifications for finalized blocks via origin overrides
* Correct weird formatting
* Update to the latest tendermint-machine
* Manually step the Tendermint machine when we synced a block over the network
* Ignore finality notifications for old blocks
* Remove a TODO resolved in 8c51bc011d03c8d54ded05011e7f4d1a01e9f873
* Add a TODO comment to slash
Enables searching for the case-sensitive phrase and finding it.
* cargo fmt
* Use a tmp DB for Serai in Docker
* Remove panic on slash
As we move towards protonet, this can happen (if a node goes offline),
yet it happening brings down the entire net right now.
* Add log::error on slash
* created shared volume between containers
* Complete the sh scripts
* Pass in the genesis time to Substrate
* Correct block announcements
They were announced, yet not marked best.
* Correct pupulate_end_time
It was used as inclusive yet didn't work inclusively.
* Correct gossip channel jumping when a block is synced via Substrate
* Use a looser check in import_future
This triggered so it needs to be accordingly relaxed.
* Correct race conditions between add_block and step
Also corrects a <= to <.
* Update cargo deny
* rename genesis-service to genesis
* Update Cargo.lock
* Correct runtime Cargo.toml whitespace
* Correct typo
* Document recheck
* Misc lints
* Fix prev commit
* Resolve low-hanging review comments
* Mark genesis/entry-dev.sh as executable
* Prevent a commit from including the same signature multiple times
Yanks tendermint-machine 0.1.0 accordingly.
* Update to latest nightly clippy
* Improve documentation
* Use clearer variable names
* Add log statements
* Pair more log statements
* Clean TendermintAuthority::authority as possible
Merges it into new. It has way too many arguments, yet there's no clear path at
consolidation there, unfortunately.
Additionally provides better scoping within itself.
* Fix #158
Doesn't use lock_import_and_run for reasons commented (lack of async).
* Rename guard to lock
* Have the devnet use the current time as the genesis
Possible since it's only a single node, not requiring synchronization.
* Fix gossiping
I really don't know what side effect this avoids and I can't say I care at this
point.
* Misc lints
Co-authored-by: vrx00 <vrx00@proton.me>
Co-authored-by: TheArchitect108 <TheArchitect108@protonmail.com>
2022-12-03 23:38:02 +00:00
|
|
|
"sc-basic-authorship",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-cli",
|
|
|
|
"sc-client-api",
|
|
|
|
"sc-consensus",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sc-consensus-babe",
|
|
|
|
"sc-consensus-grandpa",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-executor",
|
Initial Tendermint implementation (#145)
* Machine without timeouts
* Time code
* Move substrate/consensus/tendermint to substrate/tendermint
* Delete the old paper doc
* Refactor out external parts to generics
Also creates a dedicated file for the message log.
* Refactor <V, B> to type V, type B
* Successfully compiling
* Calculate timeouts
* Fix test
* Finish timeouts
* Misc cleanup
* Define a signature scheme trait
* Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde
doesn't natively support borsh, nor SCALE, and while there is a serde
SCALE crate, it's old. While it may be complete, it's not worth working
with.
While we could still grab bincode, and a variety of other formats, it
wasn't worth it to go custom and for Serai, we'll be using SCALE almost
everywhere anyways.
* Implement usage of the signature scheme
* Make the infinite test non-infinite
* Provide a dedicated signature in Precommit of just the block hash
Greatly simplifies verifying when syncing.
* Dedicated Commit object
Restores sig aggregation API.
* Tidy README
* Document tendermint
* Sign the ID directly instead of its SCALE encoding
For a hash, which is fixed-size, these should be the same yet this helps
move past the dependency on SCALE. It also, for any type where the two
values are different, smooths integration.
* Litany of bug fixes
Also attempts to make the code more readable while updating/correcting
documentation.
* Remove async recursion
Greatly increases safety as well by ensuring only one message is
processed at once.
* Correct timing issues
1) Commit didn't include the round, leaving the clock in question.
2) Machines started with a local time, instead of a proper start time.
3) Machines immediately started the next block instead of waiting for
the block time.
* Replace MultiSignature with sr25519::Signature
* Minor SignatureScheme API changes
* Map TM SignatureScheme to Substrate's sr25519
* Initial work on an import queue
* Properly use check_block
* Rename import to import_queue
* Implement tendermint_machine::Block for Substrate Blocks
Unfortunately, this immediately makes Tendermint machine capable of
deployment as crate since it uses a git reference. In the future, a
Cargo.toml patch section for serai/substrate should be investigated.
This is being done regardless as it's the quickest way forward and this
is for Serai.
* Dummy Weights
* Move documentation to the top of the file
* Move logic into TendermintImport itself
Multiple traits exist to verify/handle blocks. I'm unsure exactly when
each will be called in the pipeline, so the easiest solution is to have
every step run every check.
That would be extremely computationally expensive if we ran EVERY check,
yet we rely on Substrate for execution (and according checks), which are
limited to just the actual import function.
Since we're calling this code from many places, it makes sense for it to
be consolidated under TendermintImport.
* BlockImport, JustificationImport, Verifier, and import_queue function
* Update consensus/lib.rs from PoW to Tendermint
Not possible to be used as the previous consensus could. It will not
produce blocks nor does it currenly even instantiate a machine. This is
just he next step.
* Update Cargo.tomls for substrate packages
* Tendermint SelectChain
This is incompatible with Substrate's expectations, yet should be valid
for ours
* Move the node over to the new SelectChain
* Minor tweaks
* Update SelectChain documentation
* Remove substrate/node lib.rs
This shouldn't be used as a library AFAIK. While runtime should be, and
arguably should even be published, I have yet to see node in the same
way. Helps tighten API boundaries.
* Remove unused macro_use
* Replace panicking todos with stubs and // TODO
Enables progress.
* Reduce chain_spec and use more accurate naming
* Implement block proposal logic
* Modularize to get_proposal
* Trigger block importing
Doesn't wait for the response yet, which it needs to.
* Get the result of block importing
* Split import_queue into a series of files
* Provide a way to create the machine
The BasicQueue returned obscures the TendermintImport struct.
Accordingly, a Future scoped with access is returned upwards, which when
awaited will create the machine. This makes creating the machine
optional while maintaining scope boundaries.
Is sufficient to create a 1-node net which produces and finalizes
blocks.
* Don't import justifications multiple times
Also don't broadcast blocks which were solely proposed.
* Correct justication import pipeline
Removes JustificationImport as it should never be used.
* Announce blocks
By claiming File, they're not sent ovber the P2P network before they
have a justification, as desired. Unfortunately, they never were. This
works around that.
* Add an assert to verify proposed children aren't best
* Consolidate C and I generics into a TendermintClient trait alias
* Expand sanity checks
Substrate doesn't expect nor officially support children with less work
than their parents. It's a trick used here. Accordingly, ensure the
trick's validity.
* When resetting, use the end time of the round which was committed to
The machine reset to the end time of the current round. For a delayed
network connection, a machine may move ahead in rounds and only later
realize a prior round succeeded. Despite acknowledging that round's
success, it would maintain its delay when moving to the next block,
bricking it.
Done by tracking the end time for each round as they occur.
* Move Commit from including the round to including the round's end_time
The round was usable to build the current clock in an accumulated
fashion, relative to the previous round. The end time is the absolute
metric of it, which can be used to calculate the round number (with all
previous end times).
Substrate now builds off the best block, not genesis, using the end time
included in the justification to start its machine in a synchronized
state.
Knowing the end time of a round, or the round in which block was
committed to, is necessary for nodes to sync up with Tendermint.
Encoding it in the commit ensures it's long lasting and makes it readily
available, without the load of an entire transaction.
* Add a TODO on Tendermint
* Misc bug fixes
* More misc bug fixes
* Clean up lock acquisition
* Merge weights and signing scheme into validators, documenting needed changes
* Add pallet sessions to runtime, create pallet-tendermint
* Update node to use pallet sessions
* Update support URL
* Partial work on correcting pallet calls
* Redo Tendermint folder structure
* TendermintApi, compilation fixes
* Fix the stub round robin
At some point, the modulus was removed causing it to exceed the
validators list and stop proposing.
* Use the validators list from the session pallet
* Basic Gossip Validator
* Correct Substrate Tendermint start block
The Tendermint machine uses the passed in number as the block's being
worked on number. Substrate passed in the already finalized block's
number.
Also updates misc comments.
* Clean generics in Tendermint with a monolith with associated types
* Remove the Future triggering the machine for an async fn
Enables passing data in, such as the network.
* Move TendermintMachine from start_num, time to last_num, time
Provides an explicitly clear API clearer to program around.
Also adds additional time code to handle an edge case.
* Connect the Tendermint machine to a GossipEngine
* Connect broadcast
* Remove machine from TendermintImport
It's not used there at all.
* Merge Verifier into block_import.rs
These two files were largely the same, just hooking into sync structs
with almost identical imports. As this project shapes up, removing dead
weight is appreciated.
* Create a dedicated file for being a Tendermint authority
* Deleted comment code related to PoW
* Move serai_runtime specific code from tendermint/client to node
Renames serai-consensus to sc_tendermint
* Consolidate file structure in sc_tendermint
* Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in
general.
* Consolidate references to sr25519 in sc_tendermint
* Add documentation to public structs/functions in sc_tendermint
* Add another missing comment
* Make sign asynchronous
Some relation to https://github.com/serai-dex/serai/issues/95.
* Move sc_tendermint to async sign
* Implement proper checking of inherents
* Take in a Keystore and validator ID
* Remove unnecessary PhantomDatas
* Update node to latest sc_tendermint
* Configure node for a multi-node testnet
* Fix handling of the GossipEngine
* Use a rounded genesis to obtain sufficient synchrony within the Docker env
* Correct Serai d-f names in Docker
* Remove an attempt at caching I don't believe would ever hit
* Add an already in chain check to block import
While the inner should do this for us, we call verify_order on our end
*before* inner to ensure sequential import. Accordingly, we need to
provide our own check.
Removes errors of "non-sequential import" when trying to re-import an
existing block.
* Update the consensus documentation
It was incredibly out of date.
* Add a _ to the validator arg in slash
* Make the dev profile a local testnet profile
Restores a dev profile which only has one validator, locally running.
* Reduce Arcs in TendermintMachine, split Signer from SignatureScheme
* Update sc_tendermint per previous commit
* Restore cache
* Remove error case which shouldn't be an error
* Stop returning errors on already existing blocks entirely
* Correct Dave, Eve, and Ferdie to not run as validators
* Rename dev to devnet
--dev still works thanks to the |. Acheieves a personal preference of
mine with some historical meaning.
* Add message expiry to the Tendermint gossip
* Localize the LibP2P protocol to the blockchain
Follows convention by doing so. Theoretically enables running multiple
blockchains over a single LibP2P connection.
* Add a version to sp-runtime in tendermint-machine
* Add missing trait
* Bump Substrate dependency
Fixes #147.
* Implement Schnorr half-aggregation from https://eprint.iacr.org/2021/350.pdf
Relevant to https://github.com/serai-dex/serai/issues/99.
* cargo update (tendermint)
* Move from polling loops to a pure IO model for sc_tendermint's gossip
* Correct protocol name handling
* Use futures mpsc instead of tokio
* Timeout futures
* Move from a yielding loop to select in tendermint-machine
* Update Substrate to the new TendermintHandle
* Use futures pin instead of tokio
* Only recheck blocks with non-fatal inherent transaction errors
* Update to the latest substrate
* Separate the block processing time from the latency
* Add notes to the runtime
* Don't spam slash
Also adds a slash condition of failing to propose.
* Support running TendermintMachine when not a validator
This supports validators who leave the current set, without crashing
their nodes, along with nodes trying to become validators (who will now
seamlessly transition in).
* Properly define and pass around the block size
* Correct the Duration timing
The proposer will build it, send it, then process it (on the first
round). Accordingly, it's / 3, not / 2, as / 2 only accounted for the
latter events.
* Correct time-adjustment code on round skip
* Have the machine respond to advances made by an external sync loop
* Clean up time code in tendermint-machine
* BlockData and RoundData structs
* Rename Round to RoundNumber
* Move BlockData to a new file
* Move Round to an Option due to the pseudo-uninitialized state we create
Before the addition of RoundData, we always created the round, and on
.round(0), simply created it again. With RoundData, and the changes to
the time code, we used round 0, time 0, the latter being incorrect yet
not an issue due to lack of misuse.
Now, if we do misuse it, it'll panic.
* Clear the Queue instead of draining and filtering
There shouldn't ever be a message which passes the filter under the
current design.
* BlockData::new
* Move more code into block.rs
Introduces type-aliases to obtain Data/Message/SignedMessage solely from
a Network object.
Fixes a bug regarding stepping when you're not an active validator.
* Have verify_precommit_signature return if it verified the signature
Also fixes a bug where invalid precommit signatures were left standing
and therefore contributing to commits.
* Remove the precommit signature hash
It cached signatures per-block. Precommit signatures are bound to each
round. This would lead to forming invalid commits when a commit should
be formed. Under debug, the machine would catch that and panic. On
release, it'd have everyone who wasn't a validator fail to continue
syncing.
* Slight doc changes
Also flattens the message handling function by replacing an if
containing all following code in the function with an early return for
the else case.
* Always produce notifications for finalized blocks via origin overrides
* Correct weird formatting
* Update to the latest tendermint-machine
* Manually step the Tendermint machine when we synced a block over the network
* Ignore finality notifications for old blocks
* Remove a TODO resolved in 8c51bc011d03c8d54ded05011e7f4d1a01e9f873
* Add a TODO comment to slash
Enables searching for the case-sensitive phrase and finding it.
* cargo fmt
* Use a tmp DB for Serai in Docker
* Remove panic on slash
As we move towards protonet, this can happen (if a node goes offline),
yet it happening brings down the entire net right now.
* Add log::error on slash
* created shared volume between containers
* Complete the sh scripts
* Pass in the genesis time to Substrate
* Correct block announcements
They were announced, yet not marked best.
* Correct pupulate_end_time
It was used as inclusive yet didn't work inclusively.
* Correct gossip channel jumping when a block is synced via Substrate
* Use a looser check in import_future
This triggered so it needs to be accordingly relaxed.
* Correct race conditions between add_block and step
Also corrects a <= to <.
* Update cargo deny
* rename genesis-service to genesis
* Update Cargo.lock
* Correct runtime Cargo.toml whitespace
* Correct typo
* Document recheck
* Misc lints
* Fix prev commit
* Resolve low-hanging review comments
* Mark genesis/entry-dev.sh as executable
* Prevent a commit from including the same signature multiple times
Yanks tendermint-machine 0.1.0 accordingly.
* Update to latest nightly clippy
* Improve documentation
* Use clearer variable names
* Add log statements
* Pair more log statements
* Clean TendermintAuthority::authority as possible
Merges it into new. It has way too many arguments, yet there's no clear path at
consolidation there, unfortunately.
Additionally provides better scoping within itself.
* Fix #158
Doesn't use lock_import_and_run for reasons commented (lack of async).
* Rename guard to lock
* Have the devnet use the current time as the genesis
Possible since it's only a single node, not requiring synchronization.
* Fix gossiping
I really don't know what side effect this avoids and I can't say I care at this
point.
* Misc lints
Co-authored-by: vrx00 <vrx00@proton.me>
Co-authored-by: TheArchitect108 <TheArchitect108@protonmail.com>
2022-12-03 23:38:02 +00:00
|
|
|
"sc-network",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sc-network-common",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sc-rpc-api",
|
|
|
|
"sc-service",
|
|
|
|
"sc-telemetry",
|
|
|
|
"sc-transaction-pool",
|
|
|
|
"sc-transaction-pool-api",
|
|
|
|
"serai-runtime",
|
|
|
|
"sp-api",
|
|
|
|
"sp-block-builder",
|
|
|
|
"sp-blockchain",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sp-consensus-babe",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-core",
|
|
|
|
"sp-inherents",
|
2023-03-26 22:57:49 +00:00
|
|
|
"sp-io",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-keyring",
|
|
|
|
"sp-runtime",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sp-timestamp",
|
2022-07-16 21:49:35 +00:00
|
|
|
"substrate-build-script-utils",
|
|
|
|
"substrate-frame-rpc-system",
|
|
|
|
]
|
|
|
|
|
2023-01-05 03:52:41 +00:00
|
|
|
[[package]]
|
|
|
|
name = "serai-primitives"
|
|
|
|
version = "0.1.0"
|
|
|
|
dependencies = [
|
2023-03-25 05:30:53 +00:00
|
|
|
"lazy_static",
|
2023-01-05 03:52:41 +00:00
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"serde",
|
|
|
|
"sp-core",
|
2023-01-28 06:47:13 +00:00
|
|
|
"sp-runtime",
|
2022-11-11 03:35:09 +00:00
|
|
|
"zeroize",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "serai-runtime"
|
|
|
|
version = "0.1.0"
|
|
|
|
dependencies = [
|
|
|
|
"frame-benchmarking",
|
|
|
|
"frame-executive",
|
|
|
|
"frame-support",
|
|
|
|
"frame-system",
|
|
|
|
"frame-system-rpc-runtime-api",
|
2023-01-20 16:00:18 +00:00
|
|
|
"in-instructions-pallet",
|
2023-01-06 00:36:49 +00:00
|
|
|
"pallet-assets",
|
2023-03-26 12:43:01 +00:00
|
|
|
"pallet-authority-discovery",
|
|
|
|
"pallet-babe",
|
2022-07-16 21:49:35 +00:00
|
|
|
"pallet-balances",
|
2023-03-26 12:43:01 +00:00
|
|
|
"pallet-grandpa",
|
Initial Tendermint implementation (#145)
* Machine without timeouts
* Time code
* Move substrate/consensus/tendermint to substrate/tendermint
* Delete the old paper doc
* Refactor out external parts to generics
Also creates a dedicated file for the message log.
* Refactor <V, B> to type V, type B
* Successfully compiling
* Calculate timeouts
* Fix test
* Finish timeouts
* Misc cleanup
* Define a signature scheme trait
* Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde
doesn't natively support borsh, nor SCALE, and while there is a serde
SCALE crate, it's old. While it may be complete, it's not worth working
with.
While we could still grab bincode, and a variety of other formats, it
wasn't worth it to go custom and for Serai, we'll be using SCALE almost
everywhere anyways.
* Implement usage of the signature scheme
* Make the infinite test non-infinite
* Provide a dedicated signature in Precommit of just the block hash
Greatly simplifies verifying when syncing.
* Dedicated Commit object
Restores sig aggregation API.
* Tidy README
* Document tendermint
* Sign the ID directly instead of its SCALE encoding
For a hash, which is fixed-size, these should be the same yet this helps
move past the dependency on SCALE. It also, for any type where the two
values are different, smooths integration.
* Litany of bug fixes
Also attempts to make the code more readable while updating/correcting
documentation.
* Remove async recursion
Greatly increases safety as well by ensuring only one message is
processed at once.
* Correct timing issues
1) Commit didn't include the round, leaving the clock in question.
2) Machines started with a local time, instead of a proper start time.
3) Machines immediately started the next block instead of waiting for
the block time.
* Replace MultiSignature with sr25519::Signature
* Minor SignatureScheme API changes
* Map TM SignatureScheme to Substrate's sr25519
* Initial work on an import queue
* Properly use check_block
* Rename import to import_queue
* Implement tendermint_machine::Block for Substrate Blocks
Unfortunately, this immediately makes Tendermint machine capable of
deployment as crate since it uses a git reference. In the future, a
Cargo.toml patch section for serai/substrate should be investigated.
This is being done regardless as it's the quickest way forward and this
is for Serai.
* Dummy Weights
* Move documentation to the top of the file
* Move logic into TendermintImport itself
Multiple traits exist to verify/handle blocks. I'm unsure exactly when
each will be called in the pipeline, so the easiest solution is to have
every step run every check.
That would be extremely computationally expensive if we ran EVERY check,
yet we rely on Substrate for execution (and according checks), which are
limited to just the actual import function.
Since we're calling this code from many places, it makes sense for it to
be consolidated under TendermintImport.
* BlockImport, JustificationImport, Verifier, and import_queue function
* Update consensus/lib.rs from PoW to Tendermint
Not possible to be used as the previous consensus could. It will not
produce blocks nor does it currenly even instantiate a machine. This is
just he next step.
* Update Cargo.tomls for substrate packages
* Tendermint SelectChain
This is incompatible with Substrate's expectations, yet should be valid
for ours
* Move the node over to the new SelectChain
* Minor tweaks
* Update SelectChain documentation
* Remove substrate/node lib.rs
This shouldn't be used as a library AFAIK. While runtime should be, and
arguably should even be published, I have yet to see node in the same
way. Helps tighten API boundaries.
* Remove unused macro_use
* Replace panicking todos with stubs and // TODO
Enables progress.
* Reduce chain_spec and use more accurate naming
* Implement block proposal logic
* Modularize to get_proposal
* Trigger block importing
Doesn't wait for the response yet, which it needs to.
* Get the result of block importing
* Split import_queue into a series of files
* Provide a way to create the machine
The BasicQueue returned obscures the TendermintImport struct.
Accordingly, a Future scoped with access is returned upwards, which when
awaited will create the machine. This makes creating the machine
optional while maintaining scope boundaries.
Is sufficient to create a 1-node net which produces and finalizes
blocks.
* Don't import justifications multiple times
Also don't broadcast blocks which were solely proposed.
* Correct justication import pipeline
Removes JustificationImport as it should never be used.
* Announce blocks
By claiming File, they're not sent ovber the P2P network before they
have a justification, as desired. Unfortunately, they never were. This
works around that.
* Add an assert to verify proposed children aren't best
* Consolidate C and I generics into a TendermintClient trait alias
* Expand sanity checks
Substrate doesn't expect nor officially support children with less work
than their parents. It's a trick used here. Accordingly, ensure the
trick's validity.
* When resetting, use the end time of the round which was committed to
The machine reset to the end time of the current round. For a delayed
network connection, a machine may move ahead in rounds and only later
realize a prior round succeeded. Despite acknowledging that round's
success, it would maintain its delay when moving to the next block,
bricking it.
Done by tracking the end time for each round as they occur.
* Move Commit from including the round to including the round's end_time
The round was usable to build the current clock in an accumulated
fashion, relative to the previous round. The end time is the absolute
metric of it, which can be used to calculate the round number (with all
previous end times).
Substrate now builds off the best block, not genesis, using the end time
included in the justification to start its machine in a synchronized
state.
Knowing the end time of a round, or the round in which block was
committed to, is necessary for nodes to sync up with Tendermint.
Encoding it in the commit ensures it's long lasting and makes it readily
available, without the load of an entire transaction.
* Add a TODO on Tendermint
* Misc bug fixes
* More misc bug fixes
* Clean up lock acquisition
* Merge weights and signing scheme into validators, documenting needed changes
* Add pallet sessions to runtime, create pallet-tendermint
* Update node to use pallet sessions
* Update support URL
* Partial work on correcting pallet calls
* Redo Tendermint folder structure
* TendermintApi, compilation fixes
* Fix the stub round robin
At some point, the modulus was removed causing it to exceed the
validators list and stop proposing.
* Use the validators list from the session pallet
* Basic Gossip Validator
* Correct Substrate Tendermint start block
The Tendermint machine uses the passed in number as the block's being
worked on number. Substrate passed in the already finalized block's
number.
Also updates misc comments.
* Clean generics in Tendermint with a monolith with associated types
* Remove the Future triggering the machine for an async fn
Enables passing data in, such as the network.
* Move TendermintMachine from start_num, time to last_num, time
Provides an explicitly clear API clearer to program around.
Also adds additional time code to handle an edge case.
* Connect the Tendermint machine to a GossipEngine
* Connect broadcast
* Remove machine from TendermintImport
It's not used there at all.
* Merge Verifier into block_import.rs
These two files were largely the same, just hooking into sync structs
with almost identical imports. As this project shapes up, removing dead
weight is appreciated.
* Create a dedicated file for being a Tendermint authority
* Deleted comment code related to PoW
* Move serai_runtime specific code from tendermint/client to node
Renames serai-consensus to sc_tendermint
* Consolidate file structure in sc_tendermint
* Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in
general.
* Consolidate references to sr25519 in sc_tendermint
* Add documentation to public structs/functions in sc_tendermint
* Add another missing comment
* Make sign asynchronous
Some relation to https://github.com/serai-dex/serai/issues/95.
* Move sc_tendermint to async sign
* Implement proper checking of inherents
* Take in a Keystore and validator ID
* Remove unnecessary PhantomDatas
* Update node to latest sc_tendermint
* Configure node for a multi-node testnet
* Fix handling of the GossipEngine
* Use a rounded genesis to obtain sufficient synchrony within the Docker env
* Correct Serai d-f names in Docker
* Remove an attempt at caching I don't believe would ever hit
* Add an already in chain check to block import
While the inner should do this for us, we call verify_order on our end
*before* inner to ensure sequential import. Accordingly, we need to
provide our own check.
Removes errors of "non-sequential import" when trying to re-import an
existing block.
* Update the consensus documentation
It was incredibly out of date.
* Add a _ to the validator arg in slash
* Make the dev profile a local testnet profile
Restores a dev profile which only has one validator, locally running.
* Reduce Arcs in TendermintMachine, split Signer from SignatureScheme
* Update sc_tendermint per previous commit
* Restore cache
* Remove error case which shouldn't be an error
* Stop returning errors on already existing blocks entirely
* Correct Dave, Eve, and Ferdie to not run as validators
* Rename dev to devnet
--dev still works thanks to the |. Acheieves a personal preference of
mine with some historical meaning.
* Add message expiry to the Tendermint gossip
* Localize the LibP2P protocol to the blockchain
Follows convention by doing so. Theoretically enables running multiple
blockchains over a single LibP2P connection.
* Add a version to sp-runtime in tendermint-machine
* Add missing trait
* Bump Substrate dependency
Fixes #147.
* Implement Schnorr half-aggregation from https://eprint.iacr.org/2021/350.pdf
Relevant to https://github.com/serai-dex/serai/issues/99.
* cargo update (tendermint)
* Move from polling loops to a pure IO model for sc_tendermint's gossip
* Correct protocol name handling
* Use futures mpsc instead of tokio
* Timeout futures
* Move from a yielding loop to select in tendermint-machine
* Update Substrate to the new TendermintHandle
* Use futures pin instead of tokio
* Only recheck blocks with non-fatal inherent transaction errors
* Update to the latest substrate
* Separate the block processing time from the latency
* Add notes to the runtime
* Don't spam slash
Also adds a slash condition of failing to propose.
* Support running TendermintMachine when not a validator
This supports validators who leave the current set, without crashing
their nodes, along with nodes trying to become validators (who will now
seamlessly transition in).
* Properly define and pass around the block size
* Correct the Duration timing
The proposer will build it, send it, then process it (on the first
round). Accordingly, it's / 3, not / 2, as / 2 only accounted for the
latter events.
* Correct time-adjustment code on round skip
* Have the machine respond to advances made by an external sync loop
* Clean up time code in tendermint-machine
* BlockData and RoundData structs
* Rename Round to RoundNumber
* Move BlockData to a new file
* Move Round to an Option due to the pseudo-uninitialized state we create
Before the addition of RoundData, we always created the round, and on
.round(0), simply created it again. With RoundData, and the changes to
the time code, we used round 0, time 0, the latter being incorrect yet
not an issue due to lack of misuse.
Now, if we do misuse it, it'll panic.
* Clear the Queue instead of draining and filtering
There shouldn't ever be a message which passes the filter under the
current design.
* BlockData::new
* Move more code into block.rs
Introduces type-aliases to obtain Data/Message/SignedMessage solely from
a Network object.
Fixes a bug regarding stepping when you're not an active validator.
* Have verify_precommit_signature return if it verified the signature
Also fixes a bug where invalid precommit signatures were left standing
and therefore contributing to commits.
* Remove the precommit signature hash
It cached signatures per-block. Precommit signatures are bound to each
round. This would lead to forming invalid commits when a commit should
be formed. Under debug, the machine would catch that and panic. On
release, it'd have everyone who wasn't a validator fail to continue
syncing.
* Slight doc changes
Also flattens the message handling function by replacing an if
containing all following code in the function with an early return for
the else case.
* Always produce notifications for finalized blocks via origin overrides
* Correct weird formatting
* Update to the latest tendermint-machine
* Manually step the Tendermint machine when we synced a block over the network
* Ignore finality notifications for old blocks
* Remove a TODO resolved in 8c51bc011d03c8d54ded05011e7f4d1a01e9f873
* Add a TODO comment to slash
Enables searching for the case-sensitive phrase and finding it.
* cargo fmt
* Use a tmp DB for Serai in Docker
* Remove panic on slash
As we move towards protonet, this can happen (if a node goes offline),
yet it happening brings down the entire net right now.
* Add log::error on slash
* created shared volume between containers
* Complete the sh scripts
* Pass in the genesis time to Substrate
* Correct block announcements
They were announced, yet not marked best.
* Correct pupulate_end_time
It was used as inclusive yet didn't work inclusively.
* Correct gossip channel jumping when a block is synced via Substrate
* Use a looser check in import_future
This triggered so it needs to be accordingly relaxed.
* Correct race conditions between add_block and step
Also corrects a <= to <.
* Update cargo deny
* rename genesis-service to genesis
* Update Cargo.lock
* Correct runtime Cargo.toml whitespace
* Correct typo
* Document recheck
* Misc lints
* Fix prev commit
* Resolve low-hanging review comments
* Mark genesis/entry-dev.sh as executable
* Prevent a commit from including the same signature multiple times
Yanks tendermint-machine 0.1.0 accordingly.
* Update to latest nightly clippy
* Improve documentation
* Use clearer variable names
* Add log statements
* Pair more log statements
* Clean TendermintAuthority::authority as possible
Merges it into new. It has way too many arguments, yet there's no clear path at
consolidation there, unfortunately.
Additionally provides better scoping within itself.
* Fix #158
Doesn't use lock_import_and_run for reasons commented (lack of async).
* Rename guard to lock
* Have the devnet use the current time as the genesis
Possible since it's only a single node, not requiring synchronization.
* Fix gossiping
I really don't know what side effect this avoids and I can't say I care at this
point.
* Misc lints
Co-authored-by: vrx00 <vrx00@proton.me>
Co-authored-by: TheArchitect108 <TheArchitect108@protonmail.com>
2022-12-03 23:38:02 +00:00
|
|
|
"pallet-session",
|
2023-03-26 12:43:01 +00:00
|
|
|
"pallet-timestamp",
|
2022-07-16 21:49:35 +00:00
|
|
|
"pallet-transaction-payment",
|
|
|
|
"pallet-transaction-payment-rpc-runtime-api",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
2023-01-06 00:36:49 +00:00
|
|
|
"serai-primitives",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-api",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sp-authority-discovery",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-block-builder",
|
2023-03-26 12:43:01 +00:00
|
|
|
"sp-consensus-babe",
|
|
|
|
"sp-consensus-grandpa",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-core",
|
|
|
|
"sp-inherents",
|
|
|
|
"sp-offchain",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-session",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-transaction-pool",
|
|
|
|
"sp-version",
|
|
|
|
"substrate-wasm-builder",
|
2023-01-28 06:47:13 +00:00
|
|
|
"tokens-pallet",
|
2023-01-05 03:52:41 +00:00
|
|
|
"validator-sets-pallet",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "serde"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "1.0.164"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"serde_derive",
|
|
|
|
]
|
|
|
|
|
2023-01-17 07:35:22 +00:00
|
|
|
[[package]]
|
|
|
|
name = "serde-big-array"
|
|
|
|
version = "0.4.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3323f09a748af288c3dc2474ea6803ee81f118321775bffa3ac8f7e65c5e90e7"
|
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
2023-04-08 08:44:28 +00:00
|
|
|
[[package]]
|
|
|
|
name = "serde_bytes"
|
|
|
|
version = "0.11.9"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294"
|
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "serde_derive"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "1.0.164"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "serde_json"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "1.0.99"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "46266871c240a00b8f503b877622fe33430b3c7d963bdc0f2adc511e54a1eae3"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-10-20 05:05:36 +00:00
|
|
|
"itoa",
|
2022-07-16 21:49:35 +00:00
|
|
|
"ryu",
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
2023-03-25 04:45:33 +00:00
|
|
|
[[package]]
|
|
|
|
name = "serde_spanned"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.6.3"
|
2023-03-25 04:45:33 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186"
|
2023-03-25 04:45:33 +00:00
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "serde_urlencoded"
|
|
|
|
version = "0.7.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
|
|
|
|
dependencies = [
|
|
|
|
"form_urlencoded",
|
2022-10-20 05:05:36 +00:00
|
|
|
"itoa",
|
2022-07-16 21:49:35 +00:00
|
|
|
"ryu",
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sha-1"
|
2022-08-16 07:44:32 +00:00
|
|
|
version = "0.9.8"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-08-16 07:44:32 +00:00
|
|
|
checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-08-16 07:44:32 +00:00
|
|
|
"block-buffer 0.9.0",
|
|
|
|
"cfg-if",
|
|
|
|
"cpufeatures",
|
|
|
|
"digest 0.9.0",
|
2023-04-08 08:44:28 +00:00
|
|
|
"opaque-debug",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sha1"
|
2022-09-18 19:30:38 +00:00
|
|
|
version = "0.10.5"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-09-18 19:30:38 +00:00
|
|
|
checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"cpufeatures",
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sha2"
|
|
|
|
version = "0.9.9"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800"
|
|
|
|
dependencies = [
|
|
|
|
"block-buffer 0.9.0",
|
|
|
|
"cfg-if",
|
|
|
|
"cpufeatures",
|
|
|
|
"digest 0.9.0",
|
2023-04-08 08:44:28 +00:00
|
|
|
"opaque-debug",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sha2"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.10.7"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"cpufeatures",
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sha3"
|
2023-05-10 11:34:07 +00:00
|
|
|
version = "0.10.8"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-10 11:34:07 +00:00
|
|
|
checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
"keccak",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sharded-slab"
|
|
|
|
version = "0.1.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31"
|
|
|
|
dependencies = [
|
|
|
|
"lazy_static",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "shlex"
|
|
|
|
version = "1.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "signal-hook-registry"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "1.4.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "signature"
|
2022-10-20 05:05:36 +00:00
|
|
|
version = "1.6.4"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-10-20 05:05:36 +00:00
|
|
|
checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2022-09-18 19:30:38 +00:00
|
|
|
"rand_core 0.6.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-03-06 13:22:04 +00:00
|
|
|
[[package]]
|
|
|
|
name = "signature"
|
2023-04-08 08:44:28 +00:00
|
|
|
version = "2.1.0"
|
2023-03-06 13:22:04 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-08 08:44:28 +00:00
|
|
|
checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500"
|
2023-03-06 13:22:04 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2023-03-06 13:22:04 +00:00
|
|
|
"rand_core 0.6.4",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "simba"
|
2023-04-08 08:44:28 +00:00
|
|
|
version = "0.8.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-08 08:44:28 +00:00
|
|
|
checksum = "061507c94fc6ab4ba1c9a0305018408e312e17c041eb63bef8aa726fa33aceae"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"approx",
|
|
|
|
"num-complex",
|
|
|
|
"num-traits",
|
|
|
|
"paste",
|
2023-03-06 12:39:43 +00:00
|
|
|
"wide",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "siphasher"
|
|
|
|
version = "0.3.10"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "slab"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.4.8"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d"
|
2022-07-22 16:36:30 +00:00
|
|
|
dependencies = [
|
|
|
|
"autocfg",
|
|
|
|
]
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "slice-group-by"
|
2023-05-10 11:34:07 +00:00
|
|
|
version = "0.3.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-10 11:34:07 +00:00
|
|
|
checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "smallvec"
|
2022-10-20 05:05:36 +00:00
|
|
|
version = "1.10.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-10-20 05:05:36 +00:00
|
|
|
checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "snap"
|
2022-11-21 07:23:38 +00:00
|
|
|
version = "1.1.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-11-21 07:23:38 +00:00
|
|
|
checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "snow"
|
2023-04-09 06:31:10 +00:00
|
|
|
version = "0.9.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 06:31:10 +00:00
|
|
|
checksum = "5ccba027ba85743e09d15c03296797cad56395089b832b48b5a5217880f57733"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-01-16 15:42:31 +00:00
|
|
|
"aes-gcm 0.9.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
"blake2",
|
|
|
|
"chacha20poly1305",
|
2023-04-09 06:31:10 +00:00
|
|
|
"curve25519-dalek 4.0.0-rc.1",
|
2022-09-18 19:30:38 +00:00
|
|
|
"rand_core 0.6.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
"ring",
|
2023-01-05 03:52:41 +00:00
|
|
|
"rustc_version",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "socket2"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.4.9"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
2023-06-22 10:25:30 +00:00
|
|
|
[[package]]
|
|
|
|
name = "socket2"
|
|
|
|
version = "0.5.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"windows-sys 0.48.0",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "soketto"
|
|
|
|
version = "0.7.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2"
|
|
|
|
dependencies = [
|
2022-10-22 01:40:50 +00:00
|
|
|
"base64 0.13.1",
|
2022-07-16 21:49:35 +00:00
|
|
|
"bytes",
|
|
|
|
"flate2",
|
|
|
|
"futures",
|
2023-01-04 08:17:36 +00:00
|
|
|
"http",
|
2022-07-16 21:49:35 +00:00
|
|
|
"httparse",
|
|
|
|
"log",
|
|
|
|
"rand 0.8.5",
|
2022-09-18 19:30:38 +00:00
|
|
|
"sha-1",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "solang-parser"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.3.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "4a94494913728908efa7a25a2dd2e4f037e714897985c24273c40596638ed909"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"itertools",
|
|
|
|
"lalrpop",
|
|
|
|
"lalrpop-util",
|
|
|
|
"phf",
|
2023-04-14 01:05:18 +00:00
|
|
|
"thiserror",
|
2022-07-16 21:49:35 +00:00
|
|
|
"unicode-xid",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-api"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"hash-db",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
2023-05-01 07:17:37 +00:00
|
|
|
"scale-info",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-api-proc-macro",
|
|
|
|
"sp-core",
|
2023-05-01 07:17:37 +00:00
|
|
|
"sp-metadata-ir",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-runtime",
|
|
|
|
"sp-state-machine",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-09-29 18:33:09 +00:00
|
|
|
"sp-trie",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-version",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-api-proc-macro"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-03-26 12:43:01 +00:00
|
|
|
"Inflector",
|
2022-07-16 21:49:35 +00:00
|
|
|
"blake2",
|
2023-03-26 12:43:01 +00:00
|
|
|
"expander",
|
2022-12-07 23:05:06 +00:00
|
|
|
"proc-macro-crate",
|
2022-07-16 21:49:35 +00:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-application-crypto"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "7.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"serde",
|
|
|
|
"sp-core",
|
|
|
|
"sp-io",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-arithmetic"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "6.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"integer-sqrt",
|
|
|
|
"num-traits",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"serde",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"static_assertions",
|
|
|
|
]
|
|
|
|
|
2023-03-26 12:43:01 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sp-authority-discovery"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2023-03-26 12:43:01 +00:00
|
|
|
dependencies = [
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"sp-api",
|
|
|
|
"sp-application-crypto",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-std 5.0.0",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sp-block-builder"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"parity-scale-codec",
|
|
|
|
"sp-api",
|
|
|
|
"sp-inherents",
|
|
|
|
"sp-runtime",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-blockchain"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"futures",
|
|
|
|
"log",
|
2023-04-09 06:31:10 +00:00
|
|
|
"lru 0.9.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"parity-scale-codec",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"sp-api",
|
|
|
|
"sp-consensus",
|
|
|
|
"sp-database",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-state-machine",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-consensus"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"futures",
|
|
|
|
"log",
|
|
|
|
"sp-core",
|
|
|
|
"sp-inherents",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-state-machine",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
2023-03-26 12:43:01 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sp-consensus-babe"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2023-03-26 12:43:01 +00:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"serde",
|
|
|
|
"sp-api",
|
|
|
|
"sp-application-crypto",
|
|
|
|
"sp-consensus",
|
|
|
|
"sp-consensus-slots",
|
|
|
|
"sp-core",
|
|
|
|
"sp-inherents",
|
|
|
|
"sp-keystore",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-std 5.0.0",
|
|
|
|
"sp-timestamp",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-consensus-grandpa"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2023-03-26 12:43:01 +00:00
|
|
|
dependencies = [
|
|
|
|
"finality-grandpa",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"serde",
|
|
|
|
"sp-api",
|
|
|
|
"sp-application-crypto",
|
|
|
|
"sp-core",
|
|
|
|
"sp-keystore",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-std 5.0.0",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-consensus-slots"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2023-03-26 12:43:01 +00:00
|
|
|
dependencies = [
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"serde",
|
|
|
|
"sp-std 5.0.0",
|
|
|
|
"sp-timestamp",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sp-core"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "7.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-09-29 18:33:09 +00:00
|
|
|
"array-bytes",
|
2023-06-28 18:57:58 +00:00
|
|
|
"bitflags 1.3.2",
|
2022-09-29 18:33:09 +00:00
|
|
|
"blake2",
|
2023-03-06 12:39:43 +00:00
|
|
|
"bounded-collections",
|
2023-03-31 06:34:52 +00:00
|
|
|
"bs58",
|
2022-07-16 21:49:35 +00:00
|
|
|
"dyn-clonable",
|
2022-09-29 18:33:09 +00:00
|
|
|
"ed25519-zebra",
|
2022-07-16 21:49:35 +00:00
|
|
|
"futures",
|
|
|
|
"hash-db",
|
|
|
|
"hash256-std-hasher",
|
2023-01-05 03:52:41 +00:00
|
|
|
"impl-serde",
|
2022-07-16 21:49:35 +00:00
|
|
|
"lazy_static",
|
|
|
|
"libsecp256k1",
|
|
|
|
"log",
|
2023-04-08 08:44:28 +00:00
|
|
|
"merlin",
|
2022-07-16 21:49:35 +00:00
|
|
|
"parity-scale-codec",
|
|
|
|
"parking_lot 0.12.1",
|
2023-05-01 07:17:37 +00:00
|
|
|
"paste",
|
2022-12-07 23:05:06 +00:00
|
|
|
"primitive-types",
|
2023-01-16 15:42:31 +00:00
|
|
|
"rand 0.8.5",
|
2022-07-16 21:49:35 +00:00
|
|
|
"regex",
|
|
|
|
"scale-info",
|
|
|
|
"schnorrkel",
|
2022-08-16 07:44:32 +00:00
|
|
|
"secp256k1",
|
2022-07-16 21:49:35 +00:00
|
|
|
"secrecy",
|
|
|
|
"serde",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-core-hashing 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-debug-derive",
|
|
|
|
"sp-externalities",
|
|
|
|
"sp-runtime-interface",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-storage",
|
|
|
|
"ss58-registry",
|
|
|
|
"substrate-bip39",
|
|
|
|
"thiserror",
|
|
|
|
"tiny-bip39",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-core-hashing"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "5.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-03-26 12:43:01 +00:00
|
|
|
"blake2b_simd",
|
2022-07-16 21:49:35 +00:00
|
|
|
"byteorder",
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
|
|
|
"sha2 0.10.7",
|
2022-10-20 05:05:36 +00:00
|
|
|
"sha3",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
|
|
|
"twox-hash",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-core-hashing"
|
2023-04-15 09:23:57 +00:00
|
|
|
version = "8.0.0"
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-15 09:23:57 +00:00
|
|
|
checksum = "27449abdfbe41b473e625bce8113745e81d65777dd1d5a8462cf24137930dad8"
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
dependencies = [
|
2023-04-15 09:23:57 +00:00
|
|
|
"blake2b_simd",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"byteorder",
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
|
|
|
"sha2 0.10.7",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sha3",
|
2023-04-15 09:23:57 +00:00
|
|
|
"sp-std 7.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"twox-hash",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-core-hashing-proc-macro"
|
|
|
|
version = "5.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-core-hashing 5.0.0",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-database"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"kvdb",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-debug-derive"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "5.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-externalities"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "0.13.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"environmental",
|
|
|
|
"parity-scale-codec",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-storage",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-inherents"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"impl-trait-for-tuples",
|
|
|
|
"parity-scale-codec",
|
2023-03-06 12:39:43 +00:00
|
|
|
"scale-info",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-core",
|
|
|
|
"sp-runtime",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-io"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "7.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-09-29 18:33:09 +00:00
|
|
|
"bytes",
|
2023-01-16 15:42:31 +00:00
|
|
|
"ed25519",
|
2023-01-04 08:17:36 +00:00
|
|
|
"ed25519-dalek",
|
2022-07-16 21:49:35 +00:00
|
|
|
"futures",
|
|
|
|
"libsecp256k1",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
2023-03-31 06:34:52 +00:00
|
|
|
"rustversion",
|
2022-08-16 07:44:32 +00:00
|
|
|
"secp256k1",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-core",
|
|
|
|
"sp-externalities",
|
|
|
|
"sp-keystore",
|
|
|
|
"sp-runtime-interface",
|
|
|
|
"sp-state-machine",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-tracing",
|
|
|
|
"sp-trie",
|
|
|
|
"tracing",
|
|
|
|
"tracing-core",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-keyring"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "7.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"lazy_static",
|
|
|
|
"sp-core",
|
|
|
|
"sp-runtime",
|
2022-08-16 07:44:32 +00:00
|
|
|
"strum",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-keystore"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "0.13.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"futures",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"sp-core",
|
|
|
|
"sp-externalities",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-maybe-compressed-blob"
|
|
|
|
version = "4.1.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"thiserror",
|
2023-04-09 06:31:10 +00:00
|
|
|
"zstd 0.12.3+zstd.1.5.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-05-01 07:17:37 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sp-metadata-ir"
|
|
|
|
version = "0.1.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2023-05-01 07:17:37 +00:00
|
|
|
dependencies = [
|
|
|
|
"frame-metadata",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"sp-std 5.0.0",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sp-offchain"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"sp-api",
|
|
|
|
"sp-core",
|
|
|
|
"sp-runtime",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-panic-handler"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "5.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"backtrace",
|
|
|
|
"lazy_static",
|
|
|
|
"regex",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-rpc"
|
|
|
|
version = "6.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"rustc-hash",
|
|
|
|
"serde",
|
|
|
|
"sp-core",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-runtime"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "7.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"either",
|
|
|
|
"hash256-std-hasher",
|
|
|
|
"impl-trait-for-tuples",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"paste",
|
2023-01-16 15:42:31 +00:00
|
|
|
"rand 0.8.5",
|
2022-07-16 21:49:35 +00:00
|
|
|
"scale-info",
|
|
|
|
"serde",
|
|
|
|
"sp-application-crypto",
|
|
|
|
"sp-arithmetic",
|
|
|
|
"sp-core",
|
|
|
|
"sp-io",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-09-29 18:33:09 +00:00
|
|
|
"sp-weights",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-runtime-interface"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "7.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-09-29 18:33:09 +00:00
|
|
|
"bytes",
|
2022-07-16 21:49:35 +00:00
|
|
|
"impl-trait-for-tuples",
|
|
|
|
"parity-scale-codec",
|
2022-12-07 23:05:06 +00:00
|
|
|
"primitive-types",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-externalities",
|
|
|
|
"sp-runtime-interface-proc-macro",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-storage",
|
|
|
|
"sp-tracing",
|
|
|
|
"sp-wasm-interface",
|
|
|
|
"static_assertions",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-runtime-interface-proc-macro"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "6.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"Inflector",
|
2022-12-07 23:05:06 +00:00
|
|
|
"proc-macro-crate",
|
2022-07-16 21:49:35 +00:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-session"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"sp-api",
|
|
|
|
"sp-core",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-staking",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-staking"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
2023-05-01 07:17:37 +00:00
|
|
|
"serde",
|
2023-01-04 08:17:36 +00:00
|
|
|
"sp-core",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-runtime",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-state-machine"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "0.13.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"hash-db",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"parking_lot 0.12.1",
|
2023-01-16 15:42:31 +00:00
|
|
|
"rand 0.8.5",
|
2022-07-16 21:49:35 +00:00
|
|
|
"smallvec",
|
|
|
|
"sp-core",
|
|
|
|
"sp-externalities",
|
|
|
|
"sp-panic-handler",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-trie",
|
|
|
|
"thiserror",
|
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
2023-06-28 18:57:58 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sp-statement-store"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2023-06-28 18:57:58 +00:00
|
|
|
dependencies = [
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"sp-api",
|
|
|
|
"sp-application-crypto",
|
|
|
|
"sp-core",
|
|
|
|
"sp-externalities",
|
|
|
|
"sp-runtime",
|
|
|
|
"sp-runtime-interface",
|
|
|
|
"sp-std 5.0.0",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sp-std"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "5.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sp-std"
|
2023-04-15 09:23:57 +00:00
|
|
|
version = "7.0.0"
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-15 09:23:57 +00:00
|
|
|
checksum = "1de8eef39962b5b97478719c493bed2926cf70cb621005bbf68ebe58252ff986"
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sp-storage"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "7.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-01-05 03:52:41 +00:00
|
|
|
"impl-serde",
|
2022-07-16 21:49:35 +00:00
|
|
|
"parity-scale-codec",
|
|
|
|
"ref-cast",
|
|
|
|
"serde",
|
|
|
|
"sp-debug-derive",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-timestamp"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"futures-timer",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"sp-inherents",
|
|
|
|
"sp-runtime",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-tracing"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "6.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"parity-scale-codec",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"tracing",
|
|
|
|
"tracing-core",
|
|
|
|
"tracing-subscriber",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-transaction-pool"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"sp-api",
|
|
|
|
"sp-runtime",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-transaction-storage-proof"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"sp-core",
|
|
|
|
"sp-inherents",
|
|
|
|
"sp-runtime",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-trie",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-trie"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "7.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-03-06 12:39:43 +00:00
|
|
|
"ahash 0.8.3",
|
2022-07-16 21:49:35 +00:00
|
|
|
"hash-db",
|
2023-03-26 12:43:01 +00:00
|
|
|
"hashbrown 0.13.2",
|
2022-09-29 18:33:09 +00:00
|
|
|
"lazy_static",
|
2022-07-16 21:49:35 +00:00
|
|
|
"memory-db",
|
2022-09-29 18:33:09 +00:00
|
|
|
"nohash-hasher",
|
2022-07-16 21:49:35 +00:00
|
|
|
"parity-scale-codec",
|
2022-09-29 18:33:09 +00:00
|
|
|
"parking_lot 0.12.1",
|
2022-07-16 21:49:35 +00:00
|
|
|
"scale-info",
|
2023-03-06 12:39:43 +00:00
|
|
|
"schnellru",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-core",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
2022-09-29 18:33:09 +00:00
|
|
|
"tracing",
|
2022-07-16 21:49:35 +00:00
|
|
|
"trie-db",
|
|
|
|
"trie-root",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-version"
|
|
|
|
version = "5.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-01-05 03:52:41 +00:00
|
|
|
"impl-serde",
|
2022-07-16 21:49:35 +00:00
|
|
|
"parity-scale-codec",
|
2022-11-11 04:59:20 +00:00
|
|
|
"parity-wasm",
|
2022-07-16 21:49:35 +00:00
|
|
|
"scale-info",
|
|
|
|
"serde",
|
|
|
|
"sp-core-hashing-proc-macro",
|
|
|
|
"sp-runtime",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"sp-version-proc-macro",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-version-proc-macro"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"parity-scale-codec",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sp-wasm-interface"
|
2023-01-04 08:17:36 +00:00
|
|
|
version = "7.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-03-06 12:39:43 +00:00
|
|
|
"anyhow",
|
2022-07-16 21:49:35 +00:00
|
|
|
"impl-trait-for-tuples",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"wasmi",
|
|
|
|
"wasmtime",
|
|
|
|
]
|
|
|
|
|
2022-09-29 18:33:09 +00:00
|
|
|
[[package]]
|
|
|
|
name = "sp-weights"
|
|
|
|
version = "4.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-09-29 18:33:09 +00:00
|
|
|
dependencies = [
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"serde",
|
|
|
|
"smallvec",
|
|
|
|
"sp-arithmetic",
|
|
|
|
"sp-core",
|
|
|
|
"sp-debug-derive",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"sp-std 5.0.0",
|
2022-09-29 18:33:09 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "spin"
|
|
|
|
version = "0.5.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
|
|
|
|
|
2023-06-29 01:16:33 +00:00
|
|
|
[[package]]
|
|
|
|
name = "spin"
|
|
|
|
version = "0.9.8"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
|
|
|
|
dependencies = [
|
|
|
|
"lock_api",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "spki"
|
|
|
|
version = "0.6.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b"
|
|
|
|
dependencies = [
|
|
|
|
"base64ct",
|
2023-03-25 04:45:33 +00:00
|
|
|
"der 0.6.1",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "spki"
|
2023-05-10 11:34:07 +00:00
|
|
|
version = "0.7.2"
|
2023-03-25 04:45:33 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-10 11:34:07 +00:00
|
|
|
checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a"
|
2023-03-25 04:45:33 +00:00
|
|
|
dependencies = [
|
|
|
|
"base64ct",
|
2023-07-02 00:27:03 +00:00
|
|
|
"der 0.7.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ss58-registry"
|
2023-05-01 07:17:37 +00:00
|
|
|
version = "1.40.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-01 07:17:37 +00:00
|
|
|
checksum = "eb47a8ad42e5fc72d5b1eb104a5546937eaf39843499948bb666d6e93c62423b"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"Inflector",
|
|
|
|
"num-format",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"unicode-xid",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "stable_deref_trait"
|
|
|
|
version = "1.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "static_assertions"
|
|
|
|
version = "1.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
|
|
|
|
|
2022-09-29 18:33:09 +00:00
|
|
|
[[package]]
|
|
|
|
name = "static_init"
|
|
|
|
version = "1.0.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8a2a1c578e98c1c16fc3b8ec1328f7659a500737d7a0c6d625e73e830ff9c1f6"
|
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"bitflags 1.3.2",
|
2022-09-29 18:33:09 +00:00
|
|
|
"cfg_aliases",
|
|
|
|
"libc",
|
|
|
|
"parking_lot 0.11.2",
|
2022-12-21 04:12:26 +00:00
|
|
|
"parking_lot_core 0.8.6",
|
2022-09-29 18:33:09 +00:00
|
|
|
"static_init_macro",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "static_init_macro"
|
|
|
|
version = "1.0.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "70a2595fc3aa78f2d0e45dd425b22282dd863273761cc77780914b2cf3003acf"
|
|
|
|
dependencies = [
|
|
|
|
"cfg_aliases",
|
|
|
|
"memchr",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-09-29 18:33:09 +00:00
|
|
|
]
|
|
|
|
|
2023-04-22 08:38:47 +00:00
|
|
|
[[package]]
|
|
|
|
name = "std-shims"
|
|
|
|
version = "0.1.0"
|
|
|
|
dependencies = [
|
2023-06-29 01:16:33 +00:00
|
|
|
"hashbrown 0.14.0",
|
|
|
|
"spin 0.9.8",
|
2023-04-22 08:38:47 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "string_cache"
|
2023-03-11 09:49:05 +00:00
|
|
|
version = "0.8.7"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-11 09:49:05 +00:00
|
|
|
checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"new_debug_unreachable",
|
|
|
|
"once_cell",
|
|
|
|
"parking_lot 0.12.1",
|
2023-03-17 00:16:57 +00:00
|
|
|
"phf_shared 0.10.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"precomputed-hash",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "strsim"
|
|
|
|
version = "0.10.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "strum"
|
|
|
|
version = "0.24.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f"
|
|
|
|
dependencies = [
|
2022-08-16 07:44:32 +00:00
|
|
|
"strum_macros",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "strum_macros"
|
2022-08-16 07:44:32 +00:00
|
|
|
version = "0.24.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-08-16 07:44:32 +00:00
|
|
|
checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-03-06 12:39:43 +00:00
|
|
|
"heck 0.4.1",
|
2022-07-16 21:49:35 +00:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"rustversion",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "stun"
|
|
|
|
version = "0.4.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a7e94b1ec00bad60e6410e058b52f1c66de3dc5fe4d62d09b3e52bb7d3b73e25"
|
|
|
|
dependencies = [
|
|
|
|
"base64 0.13.1",
|
|
|
|
"crc",
|
|
|
|
"lazy_static",
|
2023-05-10 11:34:07 +00:00
|
|
|
"md-5",
|
2023-01-16 15:42:31 +00:00
|
|
|
"rand 0.8.5",
|
|
|
|
"ring",
|
|
|
|
"subtle",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
"url",
|
|
|
|
"webrtc-util",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "substrate-bip39"
|
|
|
|
version = "0.4.4"
|
2023-04-08 08:44:28 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate-bip39#47377295477c30970a16c4deb5620515721648dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"hmac 0.12.1",
|
|
|
|
"pbkdf2 0.12.1",
|
2022-07-16 21:49:35 +00:00
|
|
|
"schnorrkel",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "substrate-build-script-utils"
|
|
|
|
version = "3.0.0"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-04-09 06:31:10 +00:00
|
|
|
"platforms",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "substrate-frame-rpc-system"
|
|
|
|
version = "4.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"frame-system-rpc-runtime-api",
|
|
|
|
"futures",
|
|
|
|
"jsonrpsee",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"sc-rpc-api",
|
|
|
|
"sc-transaction-pool-api",
|
|
|
|
"sp-api",
|
|
|
|
"sp-block-builder",
|
|
|
|
"sp-blockchain",
|
|
|
|
"sp-core",
|
|
|
|
"sp-runtime",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "substrate-prometheus-endpoint"
|
|
|
|
version = "0.10.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"hyper",
|
|
|
|
"log",
|
|
|
|
"prometheus",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "substrate-wasm-builder"
|
|
|
|
version = "5.0.0-dev"
|
2023-07-02 00:27:03 +00:00
|
|
|
source = "git+https://github.com/serai-dex/substrate#4b81dab20bed5fb232e3daf6290f43c169d709dd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-04-15 07:27:45 +00:00
|
|
|
"anstyle",
|
2022-07-16 21:49:35 +00:00
|
|
|
"build-helper",
|
2023-03-06 12:39:43 +00:00
|
|
|
"cargo_metadata",
|
2022-07-16 21:49:35 +00:00
|
|
|
"filetime",
|
|
|
|
"sp-maybe-compressed-blob",
|
2022-08-16 07:44:32 +00:00
|
|
|
"strum",
|
2022-07-16 21:49:35 +00:00
|
|
|
"tempfile",
|
2023-06-28 18:57:58 +00:00
|
|
|
"toml 0.7.5",
|
2022-07-16 21:49:35 +00:00
|
|
|
"walkdir",
|
2022-11-11 04:59:20 +00:00
|
|
|
"wasm-opt",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "substring"
|
|
|
|
version = "1.4.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "42ee6433ecef213b2e72f587ef64a2f5943e7cd16fbd82dbe8bc07486c534c86"
|
|
|
|
dependencies = [
|
|
|
|
"autocfg",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "subtle"
|
|
|
|
version = "2.4.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
|
|
|
|
|
2023-04-08 08:44:28 +00:00
|
|
|
[[package]]
|
|
|
|
name = "subtle-ng"
|
|
|
|
version = "2.5.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142"
|
|
|
|
|
2023-01-20 16:00:18 +00:00
|
|
|
[[package]]
|
|
|
|
name = "subxt"
|
2023-04-15 09:23:57 +00:00
|
|
|
version = "0.28.0"
|
2023-01-20 16:00:18 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-15 09:23:57 +00:00
|
|
|
checksum = "53b9c4ddefcb2d87eb18a6336f65635c29208f766d0deefaa2a1a19f7426a993"
|
2023-01-20 16:00:18 +00:00
|
|
|
dependencies = [
|
2023-03-25 04:45:33 +00:00
|
|
|
"base58",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"blake2",
|
2023-01-20 16:00:18 +00:00
|
|
|
"derivative",
|
2023-04-15 09:23:57 +00:00
|
|
|
"either",
|
2023-01-20 16:00:18 +00:00
|
|
|
"frame-metadata",
|
|
|
|
"futures",
|
2023-06-22 10:25:30 +00:00
|
|
|
"getrandom 0.2.10",
|
2023-01-20 16:00:18 +00:00
|
|
|
"hex",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"impl-serde",
|
2023-01-20 16:00:18 +00:00
|
|
|
"jsonrpsee",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"parking_lot 0.12.1",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"primitive-types",
|
|
|
|
"scale-bits",
|
2023-01-20 16:00:18 +00:00
|
|
|
"scale-decode",
|
2023-04-15 09:23:57 +00:00
|
|
|
"scale-encode",
|
2023-01-20 16:00:18 +00:00
|
|
|
"scale-info",
|
|
|
|
"scale-value",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
2023-04-15 09:23:57 +00:00
|
|
|
"sp-core-hashing 8.0.0",
|
2023-01-20 16:00:18 +00:00
|
|
|
"subxt-macro",
|
|
|
|
"subxt-metadata",
|
|
|
|
"thiserror",
|
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "subxt-codegen"
|
2023-04-15 09:23:57 +00:00
|
|
|
version = "0.28.0"
|
2023-01-20 16:00:18 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-15 09:23:57 +00:00
|
|
|
checksum = "e924f41069e9273236398ff89662d6d336468a5d94faac812129d44547db0e7f"
|
2023-01-20 16:00:18 +00:00
|
|
|
dependencies = [
|
|
|
|
"darling",
|
|
|
|
"frame-metadata",
|
2023-03-06 12:39:43 +00:00
|
|
|
"heck 0.4.1",
|
2023-01-20 16:00:18 +00:00
|
|
|
"hex",
|
|
|
|
"jsonrpsee",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"scale-info",
|
|
|
|
"subxt-metadata",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2023-04-15 09:23:57 +00:00
|
|
|
"thiserror",
|
2023-01-20 16:00:18 +00:00
|
|
|
"tokio",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "subxt-macro"
|
2023-04-15 09:23:57 +00:00
|
|
|
version = "0.28.0"
|
2023-01-20 16:00:18 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-15 09:23:57 +00:00
|
|
|
checksum = "ced0b043a069ee039f8700d3dfda01be156e4229c82277c305bc8e79a7dd855d"
|
2023-01-20 16:00:18 +00:00
|
|
|
dependencies = [
|
|
|
|
"darling",
|
|
|
|
"proc-macro-error",
|
|
|
|
"subxt-codegen",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2023-01-20 16:00:18 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "subxt-metadata"
|
2023-04-15 09:23:57 +00:00
|
|
|
version = "0.28.0"
|
2023-01-20 16:00:18 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-15 09:23:57 +00:00
|
|
|
checksum = "18be3b8f4308fe7369ee1df66ae59c2eca79de20eab57b0f41c75736e843300f"
|
2023-01-20 16:00:18 +00:00
|
|
|
dependencies = [
|
|
|
|
"frame-metadata",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
2023-04-15 09:23:57 +00:00
|
|
|
"sp-core-hashing 8.0.0",
|
2023-01-20 16:00:18 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "svm-rs"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.2.23"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "3a04fc4f5cd35c700153b233f5575ccb3237e0f941fa5049d9e98254d10bf2fe"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"fs2",
|
|
|
|
"hex",
|
|
|
|
"home",
|
|
|
|
"once_cell",
|
|
|
|
"reqwest",
|
2023-03-16 23:37:32 +00:00
|
|
|
"semver 1.0.17",
|
2022-07-16 21:49:35 +00:00
|
|
|
"serde",
|
|
|
|
"serde_json",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
|
|
|
"url",
|
|
|
|
"zip",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "syn"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "1.0.109"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"unicode-ident",
|
|
|
|
]
|
|
|
|
|
2023-03-25 04:45:33 +00:00
|
|
|
[[package]]
|
|
|
|
name = "syn"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "2.0.22"
|
2023-03-25 04:45:33 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "2efbeae7acf4eabd6bcdcbd11c92f45231ddda7539edc7806bd1a04a03b24616"
|
2023-03-25 04:45:33 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"unicode-ident",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "synstructure"
|
|
|
|
version = "0.12.6"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-03-25 04:45:33 +00:00
|
|
|
"syn 1.0.109",
|
2022-07-16 21:49:35 +00:00
|
|
|
"unicode-xid",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "system-configuration"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.5.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"bitflags 1.3.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"core-foundation",
|
|
|
|
"system-configuration-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "system-configuration-sys"
|
|
|
|
version = "0.5.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9"
|
|
|
|
dependencies = [
|
|
|
|
"core-foundation-sys",
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tap"
|
|
|
|
version = "1.0.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "target-lexicon"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.12.8"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "1b1c7f239eb94671427157bd93b3694320f3668d4e1eff08c7285366fd777fac"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tempfile"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "3.6.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"autocfg",
|
2022-07-16 21:49:35 +00:00
|
|
|
"cfg-if",
|
|
|
|
"fastrand",
|
2023-03-31 06:34:52 +00:00
|
|
|
"redox_syscall 0.3.5",
|
2023-07-02 00:27:03 +00:00
|
|
|
"rustix 0.37.21",
|
2023-06-22 10:25:30 +00:00
|
|
|
"windows-sys 0.48.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
Initial Tendermint implementation (#145)
* Machine without timeouts
* Time code
* Move substrate/consensus/tendermint to substrate/tendermint
* Delete the old paper doc
* Refactor out external parts to generics
Also creates a dedicated file for the message log.
* Refactor <V, B> to type V, type B
* Successfully compiling
* Calculate timeouts
* Fix test
* Finish timeouts
* Misc cleanup
* Define a signature scheme trait
* Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde
doesn't natively support borsh, nor SCALE, and while there is a serde
SCALE crate, it's old. While it may be complete, it's not worth working
with.
While we could still grab bincode, and a variety of other formats, it
wasn't worth it to go custom and for Serai, we'll be using SCALE almost
everywhere anyways.
* Implement usage of the signature scheme
* Make the infinite test non-infinite
* Provide a dedicated signature in Precommit of just the block hash
Greatly simplifies verifying when syncing.
* Dedicated Commit object
Restores sig aggregation API.
* Tidy README
* Document tendermint
* Sign the ID directly instead of its SCALE encoding
For a hash, which is fixed-size, these should be the same yet this helps
move past the dependency on SCALE. It also, for any type where the two
values are different, smooths integration.
* Litany of bug fixes
Also attempts to make the code more readable while updating/correcting
documentation.
* Remove async recursion
Greatly increases safety as well by ensuring only one message is
processed at once.
* Correct timing issues
1) Commit didn't include the round, leaving the clock in question.
2) Machines started with a local time, instead of a proper start time.
3) Machines immediately started the next block instead of waiting for
the block time.
* Replace MultiSignature with sr25519::Signature
* Minor SignatureScheme API changes
* Map TM SignatureScheme to Substrate's sr25519
* Initial work on an import queue
* Properly use check_block
* Rename import to import_queue
* Implement tendermint_machine::Block for Substrate Blocks
Unfortunately, this immediately makes Tendermint machine capable of
deployment as crate since it uses a git reference. In the future, a
Cargo.toml patch section for serai/substrate should be investigated.
This is being done regardless as it's the quickest way forward and this
is for Serai.
* Dummy Weights
* Move documentation to the top of the file
* Move logic into TendermintImport itself
Multiple traits exist to verify/handle blocks. I'm unsure exactly when
each will be called in the pipeline, so the easiest solution is to have
every step run every check.
That would be extremely computationally expensive if we ran EVERY check,
yet we rely on Substrate for execution (and according checks), which are
limited to just the actual import function.
Since we're calling this code from many places, it makes sense for it to
be consolidated under TendermintImport.
* BlockImport, JustificationImport, Verifier, and import_queue function
* Update consensus/lib.rs from PoW to Tendermint
Not possible to be used as the previous consensus could. It will not
produce blocks nor does it currenly even instantiate a machine. This is
just he next step.
* Update Cargo.tomls for substrate packages
* Tendermint SelectChain
This is incompatible with Substrate's expectations, yet should be valid
for ours
* Move the node over to the new SelectChain
* Minor tweaks
* Update SelectChain documentation
* Remove substrate/node lib.rs
This shouldn't be used as a library AFAIK. While runtime should be, and
arguably should even be published, I have yet to see node in the same
way. Helps tighten API boundaries.
* Remove unused macro_use
* Replace panicking todos with stubs and // TODO
Enables progress.
* Reduce chain_spec and use more accurate naming
* Implement block proposal logic
* Modularize to get_proposal
* Trigger block importing
Doesn't wait for the response yet, which it needs to.
* Get the result of block importing
* Split import_queue into a series of files
* Provide a way to create the machine
The BasicQueue returned obscures the TendermintImport struct.
Accordingly, a Future scoped with access is returned upwards, which when
awaited will create the machine. This makes creating the machine
optional while maintaining scope boundaries.
Is sufficient to create a 1-node net which produces and finalizes
blocks.
* Don't import justifications multiple times
Also don't broadcast blocks which were solely proposed.
* Correct justication import pipeline
Removes JustificationImport as it should never be used.
* Announce blocks
By claiming File, they're not sent ovber the P2P network before they
have a justification, as desired. Unfortunately, they never were. This
works around that.
* Add an assert to verify proposed children aren't best
* Consolidate C and I generics into a TendermintClient trait alias
* Expand sanity checks
Substrate doesn't expect nor officially support children with less work
than their parents. It's a trick used here. Accordingly, ensure the
trick's validity.
* When resetting, use the end time of the round which was committed to
The machine reset to the end time of the current round. For a delayed
network connection, a machine may move ahead in rounds and only later
realize a prior round succeeded. Despite acknowledging that round's
success, it would maintain its delay when moving to the next block,
bricking it.
Done by tracking the end time for each round as they occur.
* Move Commit from including the round to including the round's end_time
The round was usable to build the current clock in an accumulated
fashion, relative to the previous round. The end time is the absolute
metric of it, which can be used to calculate the round number (with all
previous end times).
Substrate now builds off the best block, not genesis, using the end time
included in the justification to start its machine in a synchronized
state.
Knowing the end time of a round, or the round in which block was
committed to, is necessary for nodes to sync up with Tendermint.
Encoding it in the commit ensures it's long lasting and makes it readily
available, without the load of an entire transaction.
* Add a TODO on Tendermint
* Misc bug fixes
* More misc bug fixes
* Clean up lock acquisition
* Merge weights and signing scheme into validators, documenting needed changes
* Add pallet sessions to runtime, create pallet-tendermint
* Update node to use pallet sessions
* Update support URL
* Partial work on correcting pallet calls
* Redo Tendermint folder structure
* TendermintApi, compilation fixes
* Fix the stub round robin
At some point, the modulus was removed causing it to exceed the
validators list and stop proposing.
* Use the validators list from the session pallet
* Basic Gossip Validator
* Correct Substrate Tendermint start block
The Tendermint machine uses the passed in number as the block's being
worked on number. Substrate passed in the already finalized block's
number.
Also updates misc comments.
* Clean generics in Tendermint with a monolith with associated types
* Remove the Future triggering the machine for an async fn
Enables passing data in, such as the network.
* Move TendermintMachine from start_num, time to last_num, time
Provides an explicitly clear API clearer to program around.
Also adds additional time code to handle an edge case.
* Connect the Tendermint machine to a GossipEngine
* Connect broadcast
* Remove machine from TendermintImport
It's not used there at all.
* Merge Verifier into block_import.rs
These two files were largely the same, just hooking into sync structs
with almost identical imports. As this project shapes up, removing dead
weight is appreciated.
* Create a dedicated file for being a Tendermint authority
* Deleted comment code related to PoW
* Move serai_runtime specific code from tendermint/client to node
Renames serai-consensus to sc_tendermint
* Consolidate file structure in sc_tendermint
* Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in
general.
* Consolidate references to sr25519 in sc_tendermint
* Add documentation to public structs/functions in sc_tendermint
* Add another missing comment
* Make sign asynchronous
Some relation to https://github.com/serai-dex/serai/issues/95.
* Move sc_tendermint to async sign
* Implement proper checking of inherents
* Take in a Keystore and validator ID
* Remove unnecessary PhantomDatas
* Update node to latest sc_tendermint
* Configure node for a multi-node testnet
* Fix handling of the GossipEngine
* Use a rounded genesis to obtain sufficient synchrony within the Docker env
* Correct Serai d-f names in Docker
* Remove an attempt at caching I don't believe would ever hit
* Add an already in chain check to block import
While the inner should do this for us, we call verify_order on our end
*before* inner to ensure sequential import. Accordingly, we need to
provide our own check.
Removes errors of "non-sequential import" when trying to re-import an
existing block.
* Update the consensus documentation
It was incredibly out of date.
* Add a _ to the validator arg in slash
* Make the dev profile a local testnet profile
Restores a dev profile which only has one validator, locally running.
* Reduce Arcs in TendermintMachine, split Signer from SignatureScheme
* Update sc_tendermint per previous commit
* Restore cache
* Remove error case which shouldn't be an error
* Stop returning errors on already existing blocks entirely
* Correct Dave, Eve, and Ferdie to not run as validators
* Rename dev to devnet
--dev still works thanks to the |. Acheieves a personal preference of
mine with some historical meaning.
* Add message expiry to the Tendermint gossip
* Localize the LibP2P protocol to the blockchain
Follows convention by doing so. Theoretically enables running multiple
blockchains over a single LibP2P connection.
* Add a version to sp-runtime in tendermint-machine
* Add missing trait
* Bump Substrate dependency
Fixes #147.
* Implement Schnorr half-aggregation from https://eprint.iacr.org/2021/350.pdf
Relevant to https://github.com/serai-dex/serai/issues/99.
* cargo update (tendermint)
* Move from polling loops to a pure IO model for sc_tendermint's gossip
* Correct protocol name handling
* Use futures mpsc instead of tokio
* Timeout futures
* Move from a yielding loop to select in tendermint-machine
* Update Substrate to the new TendermintHandle
* Use futures pin instead of tokio
* Only recheck blocks with non-fatal inherent transaction errors
* Update to the latest substrate
* Separate the block processing time from the latency
* Add notes to the runtime
* Don't spam slash
Also adds a slash condition of failing to propose.
* Support running TendermintMachine when not a validator
This supports validators who leave the current set, without crashing
their nodes, along with nodes trying to become validators (who will now
seamlessly transition in).
* Properly define and pass around the block size
* Correct the Duration timing
The proposer will build it, send it, then process it (on the first
round). Accordingly, it's / 3, not / 2, as / 2 only accounted for the
latter events.
* Correct time-adjustment code on round skip
* Have the machine respond to advances made by an external sync loop
* Clean up time code in tendermint-machine
* BlockData and RoundData structs
* Rename Round to RoundNumber
* Move BlockData to a new file
* Move Round to an Option due to the pseudo-uninitialized state we create
Before the addition of RoundData, we always created the round, and on
.round(0), simply created it again. With RoundData, and the changes to
the time code, we used round 0, time 0, the latter being incorrect yet
not an issue due to lack of misuse.
Now, if we do misuse it, it'll panic.
* Clear the Queue instead of draining and filtering
There shouldn't ever be a message which passes the filter under the
current design.
* BlockData::new
* Move more code into block.rs
Introduces type-aliases to obtain Data/Message/SignedMessage solely from
a Network object.
Fixes a bug regarding stepping when you're not an active validator.
* Have verify_precommit_signature return if it verified the signature
Also fixes a bug where invalid precommit signatures were left standing
and therefore contributing to commits.
* Remove the precommit signature hash
It cached signatures per-block. Precommit signatures are bound to each
round. This would lead to forming invalid commits when a commit should
be formed. Under debug, the machine would catch that and panic. On
release, it'd have everyone who wasn't a validator fail to continue
syncing.
* Slight doc changes
Also flattens the message handling function by replacing an if
containing all following code in the function with an early return for
the else case.
* Always produce notifications for finalized blocks via origin overrides
* Correct weird formatting
* Update to the latest tendermint-machine
* Manually step the Tendermint machine when we synced a block over the network
* Ignore finality notifications for old blocks
* Remove a TODO resolved in 8c51bc011d03c8d54ded05011e7f4d1a01e9f873
* Add a TODO comment to slash
Enables searching for the case-sensitive phrase and finding it.
* cargo fmt
* Use a tmp DB for Serai in Docker
* Remove panic on slash
As we move towards protonet, this can happen (if a node goes offline),
yet it happening brings down the entire net right now.
* Add log::error on slash
* created shared volume between containers
* Complete the sh scripts
* Pass in the genesis time to Substrate
* Correct block announcements
They were announced, yet not marked best.
* Correct pupulate_end_time
It was used as inclusive yet didn't work inclusively.
* Correct gossip channel jumping when a block is synced via Substrate
* Use a looser check in import_future
This triggered so it needs to be accordingly relaxed.
* Correct race conditions between add_block and step
Also corrects a <= to <.
* Update cargo deny
* rename genesis-service to genesis
* Update Cargo.lock
* Correct runtime Cargo.toml whitespace
* Correct typo
* Document recheck
* Misc lints
* Fix prev commit
* Resolve low-hanging review comments
* Mark genesis/entry-dev.sh as executable
* Prevent a commit from including the same signature multiple times
Yanks tendermint-machine 0.1.0 accordingly.
* Update to latest nightly clippy
* Improve documentation
* Use clearer variable names
* Add log statements
* Pair more log statements
* Clean TendermintAuthority::authority as possible
Merges it into new. It has way too many arguments, yet there's no clear path at
consolidation there, unfortunately.
Additionally provides better scoping within itself.
* Fix #158
Doesn't use lock_import_and_run for reasons commented (lack of async).
* Rename guard to lock
* Have the devnet use the current time as the genesis
Possible since it's only a single node, not requiring synchronization.
* Fix gossiping
I really don't know what side effect this avoids and I can't say I care at this
point.
* Misc lints
Co-authored-by: vrx00 <vrx00@proton.me>
Co-authored-by: TheArchitect108 <TheArchitect108@protonmail.com>
2022-12-03 23:38:02 +00:00
|
|
|
[[package]]
|
|
|
|
name = "tendermint-machine"
|
2022-12-05 22:26:28 +00:00
|
|
|
version = "0.2.0"
|
Initial Tendermint implementation (#145)
* Machine without timeouts
* Time code
* Move substrate/consensus/tendermint to substrate/tendermint
* Delete the old paper doc
* Refactor out external parts to generics
Also creates a dedicated file for the message log.
* Refactor <V, B> to type V, type B
* Successfully compiling
* Calculate timeouts
* Fix test
* Finish timeouts
* Misc cleanup
* Define a signature scheme trait
* Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde
doesn't natively support borsh, nor SCALE, and while there is a serde
SCALE crate, it's old. While it may be complete, it's not worth working
with.
While we could still grab bincode, and a variety of other formats, it
wasn't worth it to go custom and for Serai, we'll be using SCALE almost
everywhere anyways.
* Implement usage of the signature scheme
* Make the infinite test non-infinite
* Provide a dedicated signature in Precommit of just the block hash
Greatly simplifies verifying when syncing.
* Dedicated Commit object
Restores sig aggregation API.
* Tidy README
* Document tendermint
* Sign the ID directly instead of its SCALE encoding
For a hash, which is fixed-size, these should be the same yet this helps
move past the dependency on SCALE. It also, for any type where the two
values are different, smooths integration.
* Litany of bug fixes
Also attempts to make the code more readable while updating/correcting
documentation.
* Remove async recursion
Greatly increases safety as well by ensuring only one message is
processed at once.
* Correct timing issues
1) Commit didn't include the round, leaving the clock in question.
2) Machines started with a local time, instead of a proper start time.
3) Machines immediately started the next block instead of waiting for
the block time.
* Replace MultiSignature with sr25519::Signature
* Minor SignatureScheme API changes
* Map TM SignatureScheme to Substrate's sr25519
* Initial work on an import queue
* Properly use check_block
* Rename import to import_queue
* Implement tendermint_machine::Block for Substrate Blocks
Unfortunately, this immediately makes Tendermint machine capable of
deployment as crate since it uses a git reference. In the future, a
Cargo.toml patch section for serai/substrate should be investigated.
This is being done regardless as it's the quickest way forward and this
is for Serai.
* Dummy Weights
* Move documentation to the top of the file
* Move logic into TendermintImport itself
Multiple traits exist to verify/handle blocks. I'm unsure exactly when
each will be called in the pipeline, so the easiest solution is to have
every step run every check.
That would be extremely computationally expensive if we ran EVERY check,
yet we rely on Substrate for execution (and according checks), which are
limited to just the actual import function.
Since we're calling this code from many places, it makes sense for it to
be consolidated under TendermintImport.
* BlockImport, JustificationImport, Verifier, and import_queue function
* Update consensus/lib.rs from PoW to Tendermint
Not possible to be used as the previous consensus could. It will not
produce blocks nor does it currenly even instantiate a machine. This is
just he next step.
* Update Cargo.tomls for substrate packages
* Tendermint SelectChain
This is incompatible with Substrate's expectations, yet should be valid
for ours
* Move the node over to the new SelectChain
* Minor tweaks
* Update SelectChain documentation
* Remove substrate/node lib.rs
This shouldn't be used as a library AFAIK. While runtime should be, and
arguably should even be published, I have yet to see node in the same
way. Helps tighten API boundaries.
* Remove unused macro_use
* Replace panicking todos with stubs and // TODO
Enables progress.
* Reduce chain_spec and use more accurate naming
* Implement block proposal logic
* Modularize to get_proposal
* Trigger block importing
Doesn't wait for the response yet, which it needs to.
* Get the result of block importing
* Split import_queue into a series of files
* Provide a way to create the machine
The BasicQueue returned obscures the TendermintImport struct.
Accordingly, a Future scoped with access is returned upwards, which when
awaited will create the machine. This makes creating the machine
optional while maintaining scope boundaries.
Is sufficient to create a 1-node net which produces and finalizes
blocks.
* Don't import justifications multiple times
Also don't broadcast blocks which were solely proposed.
* Correct justication import pipeline
Removes JustificationImport as it should never be used.
* Announce blocks
By claiming File, they're not sent ovber the P2P network before they
have a justification, as desired. Unfortunately, they never were. This
works around that.
* Add an assert to verify proposed children aren't best
* Consolidate C and I generics into a TendermintClient trait alias
* Expand sanity checks
Substrate doesn't expect nor officially support children with less work
than their parents. It's a trick used here. Accordingly, ensure the
trick's validity.
* When resetting, use the end time of the round which was committed to
The machine reset to the end time of the current round. For a delayed
network connection, a machine may move ahead in rounds and only later
realize a prior round succeeded. Despite acknowledging that round's
success, it would maintain its delay when moving to the next block,
bricking it.
Done by tracking the end time for each round as they occur.
* Move Commit from including the round to including the round's end_time
The round was usable to build the current clock in an accumulated
fashion, relative to the previous round. The end time is the absolute
metric of it, which can be used to calculate the round number (with all
previous end times).
Substrate now builds off the best block, not genesis, using the end time
included in the justification to start its machine in a synchronized
state.
Knowing the end time of a round, or the round in which block was
committed to, is necessary for nodes to sync up with Tendermint.
Encoding it in the commit ensures it's long lasting and makes it readily
available, without the load of an entire transaction.
* Add a TODO on Tendermint
* Misc bug fixes
* More misc bug fixes
* Clean up lock acquisition
* Merge weights and signing scheme into validators, documenting needed changes
* Add pallet sessions to runtime, create pallet-tendermint
* Update node to use pallet sessions
* Update support URL
* Partial work on correcting pallet calls
* Redo Tendermint folder structure
* TendermintApi, compilation fixes
* Fix the stub round robin
At some point, the modulus was removed causing it to exceed the
validators list and stop proposing.
* Use the validators list from the session pallet
* Basic Gossip Validator
* Correct Substrate Tendermint start block
The Tendermint machine uses the passed in number as the block's being
worked on number. Substrate passed in the already finalized block's
number.
Also updates misc comments.
* Clean generics in Tendermint with a monolith with associated types
* Remove the Future triggering the machine for an async fn
Enables passing data in, such as the network.
* Move TendermintMachine from start_num, time to last_num, time
Provides an explicitly clear API clearer to program around.
Also adds additional time code to handle an edge case.
* Connect the Tendermint machine to a GossipEngine
* Connect broadcast
* Remove machine from TendermintImport
It's not used there at all.
* Merge Verifier into block_import.rs
These two files were largely the same, just hooking into sync structs
with almost identical imports. As this project shapes up, removing dead
weight is appreciated.
* Create a dedicated file for being a Tendermint authority
* Deleted comment code related to PoW
* Move serai_runtime specific code from tendermint/client to node
Renames serai-consensus to sc_tendermint
* Consolidate file structure in sc_tendermint
* Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in
general.
* Consolidate references to sr25519 in sc_tendermint
* Add documentation to public structs/functions in sc_tendermint
* Add another missing comment
* Make sign asynchronous
Some relation to https://github.com/serai-dex/serai/issues/95.
* Move sc_tendermint to async sign
* Implement proper checking of inherents
* Take in a Keystore and validator ID
* Remove unnecessary PhantomDatas
* Update node to latest sc_tendermint
* Configure node for a multi-node testnet
* Fix handling of the GossipEngine
* Use a rounded genesis to obtain sufficient synchrony within the Docker env
* Correct Serai d-f names in Docker
* Remove an attempt at caching I don't believe would ever hit
* Add an already in chain check to block import
While the inner should do this for us, we call verify_order on our end
*before* inner to ensure sequential import. Accordingly, we need to
provide our own check.
Removes errors of "non-sequential import" when trying to re-import an
existing block.
* Update the consensus documentation
It was incredibly out of date.
* Add a _ to the validator arg in slash
* Make the dev profile a local testnet profile
Restores a dev profile which only has one validator, locally running.
* Reduce Arcs in TendermintMachine, split Signer from SignatureScheme
* Update sc_tendermint per previous commit
* Restore cache
* Remove error case which shouldn't be an error
* Stop returning errors on already existing blocks entirely
* Correct Dave, Eve, and Ferdie to not run as validators
* Rename dev to devnet
--dev still works thanks to the |. Acheieves a personal preference of
mine with some historical meaning.
* Add message expiry to the Tendermint gossip
* Localize the LibP2P protocol to the blockchain
Follows convention by doing so. Theoretically enables running multiple
blockchains over a single LibP2P connection.
* Add a version to sp-runtime in tendermint-machine
* Add missing trait
* Bump Substrate dependency
Fixes #147.
* Implement Schnorr half-aggregation from https://eprint.iacr.org/2021/350.pdf
Relevant to https://github.com/serai-dex/serai/issues/99.
* cargo update (tendermint)
* Move from polling loops to a pure IO model for sc_tendermint's gossip
* Correct protocol name handling
* Use futures mpsc instead of tokio
* Timeout futures
* Move from a yielding loop to select in tendermint-machine
* Update Substrate to the new TendermintHandle
* Use futures pin instead of tokio
* Only recheck blocks with non-fatal inherent transaction errors
* Update to the latest substrate
* Separate the block processing time from the latency
* Add notes to the runtime
* Don't spam slash
Also adds a slash condition of failing to propose.
* Support running TendermintMachine when not a validator
This supports validators who leave the current set, without crashing
their nodes, along with nodes trying to become validators (who will now
seamlessly transition in).
* Properly define and pass around the block size
* Correct the Duration timing
The proposer will build it, send it, then process it (on the first
round). Accordingly, it's / 3, not / 2, as / 2 only accounted for the
latter events.
* Correct time-adjustment code on round skip
* Have the machine respond to advances made by an external sync loop
* Clean up time code in tendermint-machine
* BlockData and RoundData structs
* Rename Round to RoundNumber
* Move BlockData to a new file
* Move Round to an Option due to the pseudo-uninitialized state we create
Before the addition of RoundData, we always created the round, and on
.round(0), simply created it again. With RoundData, and the changes to
the time code, we used round 0, time 0, the latter being incorrect yet
not an issue due to lack of misuse.
Now, if we do misuse it, it'll panic.
* Clear the Queue instead of draining and filtering
There shouldn't ever be a message which passes the filter under the
current design.
* BlockData::new
* Move more code into block.rs
Introduces type-aliases to obtain Data/Message/SignedMessage solely from
a Network object.
Fixes a bug regarding stepping when you're not an active validator.
* Have verify_precommit_signature return if it verified the signature
Also fixes a bug where invalid precommit signatures were left standing
and therefore contributing to commits.
* Remove the precommit signature hash
It cached signatures per-block. Precommit signatures are bound to each
round. This would lead to forming invalid commits when a commit should
be formed. Under debug, the machine would catch that and panic. On
release, it'd have everyone who wasn't a validator fail to continue
syncing.
* Slight doc changes
Also flattens the message handling function by replacing an if
containing all following code in the function with an early return for
the else case.
* Always produce notifications for finalized blocks via origin overrides
* Correct weird formatting
* Update to the latest tendermint-machine
* Manually step the Tendermint machine when we synced a block over the network
* Ignore finality notifications for old blocks
* Remove a TODO resolved in 8c51bc011d03c8d54ded05011e7f4d1a01e9f873
* Add a TODO comment to slash
Enables searching for the case-sensitive phrase and finding it.
* cargo fmt
* Use a tmp DB for Serai in Docker
* Remove panic on slash
As we move towards protonet, this can happen (if a node goes offline),
yet it happening brings down the entire net right now.
* Add log::error on slash
* created shared volume between containers
* Complete the sh scripts
* Pass in the genesis time to Substrate
* Correct block announcements
They were announced, yet not marked best.
* Correct pupulate_end_time
It was used as inclusive yet didn't work inclusively.
* Correct gossip channel jumping when a block is synced via Substrate
* Use a looser check in import_future
This triggered so it needs to be accordingly relaxed.
* Correct race conditions between add_block and step
Also corrects a <= to <.
* Update cargo deny
* rename genesis-service to genesis
* Update Cargo.lock
* Correct runtime Cargo.toml whitespace
* Correct typo
* Document recheck
* Misc lints
* Fix prev commit
* Resolve low-hanging review comments
* Mark genesis/entry-dev.sh as executable
* Prevent a commit from including the same signature multiple times
Yanks tendermint-machine 0.1.0 accordingly.
* Update to latest nightly clippy
* Improve documentation
* Use clearer variable names
* Add log statements
* Pair more log statements
* Clean TendermintAuthority::authority as possible
Merges it into new. It has way too many arguments, yet there's no clear path at
consolidation there, unfortunately.
Additionally provides better scoping within itself.
* Fix #158
Doesn't use lock_import_and_run for reasons commented (lack of async).
* Rename guard to lock
* Have the devnet use the current time as the genesis
Possible since it's only a single node, not requiring synchronization.
* Fix gossiping
I really don't know what side effect this avoids and I can't say I care at this
point.
* Misc lints
Co-authored-by: vrx00 <vrx00@proton.me>
Co-authored-by: TheArchitect108 <TheArchitect108@protonmail.com>
2022-12-03 23:38:02 +00:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"futures",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "term"
|
|
|
|
version = "0.7.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f"
|
|
|
|
dependencies = [
|
|
|
|
"dirs-next",
|
|
|
|
"rustversion",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "termcolor"
|
2023-01-16 15:42:31 +00:00
|
|
|
version = "1.2.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-16 15:42:31 +00:00
|
|
|
checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"winapi-util",
|
|
|
|
]
|
|
|
|
|
2022-10-20 05:05:36 +00:00
|
|
|
[[package]]
|
|
|
|
name = "termtree"
|
2023-03-16 23:37:32 +00:00
|
|
|
version = "0.4.1"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-16 23:37:32 +00:00
|
|
|
checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76"
|
2022-10-20 05:05:36 +00:00
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "thiserror"
|
2023-03-25 04:45:33 +00:00
|
|
|
version = "1.0.40"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-25 04:45:33 +00:00
|
|
|
checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"thiserror-impl",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "thiserror-impl"
|
2023-03-25 04:45:33 +00:00
|
|
|
version = "1.0.40"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-25 04:45:33 +00:00
|
|
|
checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "thousands"
|
|
|
|
version = "0.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "thread_local"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "1.1.7"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-03-06 12:39:43 +00:00
|
|
|
"cfg-if",
|
2022-07-16 21:49:35 +00:00
|
|
|
"once_cell",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "threadpool"
|
|
|
|
version = "1.8.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa"
|
|
|
|
dependencies = [
|
|
|
|
"num_cpus",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tikv-jemalloc-sys"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.5.3+5.3.0-patched"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "a678df20055b43e57ef8cddde41cdfda9a3c1a060b67f4c5836dfb1d78543ba8"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "time"
|
2022-12-07 22:56:53 +00:00
|
|
|
version = "0.1.45"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-07 22:56:53 +00:00
|
|
|
checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"wasi 0.10.0+wasi-snapshot-preview1",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "time"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.3.22"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-10-20 05:05:36 +00:00
|
|
|
"itoa",
|
2022-11-04 12:07:37 +00:00
|
|
|
"serde",
|
|
|
|
"time-core",
|
2022-07-16 21:49:35 +00:00
|
|
|
"time-macros",
|
|
|
|
]
|
|
|
|
|
2022-11-04 12:07:37 +00:00
|
|
|
[[package]]
|
|
|
|
name = "time-core"
|
2023-05-10 11:34:07 +00:00
|
|
|
version = "0.1.1"
|
2022-11-04 12:07:37 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-10 11:34:07 +00:00
|
|
|
checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb"
|
2022-11-04 12:07:37 +00:00
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "time-macros"
|
2023-05-10 11:34:07 +00:00
|
|
|
version = "0.2.9"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-10 11:34:07 +00:00
|
|
|
checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b"
|
2022-11-04 12:07:37 +00:00
|
|
|
dependencies = [
|
|
|
|
"time-core",
|
|
|
|
]
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tiny-bip39"
|
2023-01-16 15:42:31 +00:00
|
|
|
version = "1.0.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-16 15:42:31 +00:00
|
|
|
checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
2023-01-16 15:42:31 +00:00
|
|
|
"hmac 0.12.1",
|
2022-07-16 21:49:35 +00:00
|
|
|
"once_cell",
|
2023-01-16 15:42:31 +00:00
|
|
|
"pbkdf2 0.11.0",
|
|
|
|
"rand 0.8.5",
|
2022-07-16 21:49:35 +00:00
|
|
|
"rustc-hash",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
|
|
|
"unicode-normalization",
|
|
|
|
"wasm-bindgen",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tiny-keccak"
|
|
|
|
version = "2.0.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237"
|
|
|
|
dependencies = [
|
|
|
|
"crunchy",
|
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "tinytemplate"
|
|
|
|
version = "1.2.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc"
|
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "tinyvec"
|
|
|
|
version = "1.6.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
|
|
|
|
dependencies = [
|
|
|
|
"tinyvec_macros",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tinyvec_macros"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.1.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
2023-01-28 06:47:13 +00:00
|
|
|
[[package]]
|
|
|
|
name = "tokens-pallet"
|
|
|
|
version = "0.1.0"
|
|
|
|
dependencies = [
|
|
|
|
"frame-support",
|
|
|
|
"frame-system",
|
|
|
|
"pallet-assets",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"serai-primitives",
|
|
|
|
"tokens-primitives",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tokens-primitives"
|
|
|
|
version = "0.1.0"
|
|
|
|
dependencies = [
|
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"serai-primitives",
|
|
|
|
"serde",
|
|
|
|
"sp-runtime",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"zeroize",
|
2023-01-28 06:47:13 +00:00
|
|
|
]
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tokio"
|
2023-07-02 00:27:03 +00:00
|
|
|
version = "1.29.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-07-02 00:27:03 +00:00
|
|
|
checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"autocfg",
|
2023-06-28 18:57:58 +00:00
|
|
|
"backtrace",
|
2022-07-16 21:49:35 +00:00
|
|
|
"bytes",
|
|
|
|
"libc",
|
|
|
|
"mio",
|
|
|
|
"num_cpus",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"pin-project-lite 0.2.9",
|
|
|
|
"signal-hook-registry",
|
2023-06-22 10:25:30 +00:00
|
|
|
"socket2 0.4.9",
|
2022-07-16 21:49:35 +00:00
|
|
|
"tokio-macros",
|
2023-05-01 07:17:37 +00:00
|
|
|
"windows-sys 0.48.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tokio-macros"
|
2023-05-01 07:17:37 +00:00
|
|
|
version = "2.1.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-01 07:17:37 +00:00
|
|
|
checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tokio-native-tls"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.3.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"native-tls",
|
|
|
|
"tokio",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tokio-rustls"
|
|
|
|
version = "0.23.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59"
|
|
|
|
dependencies = [
|
2023-01-16 15:42:31 +00:00
|
|
|
"rustls 0.20.8",
|
2022-07-16 21:49:35 +00:00
|
|
|
"tokio",
|
2023-01-16 15:42:31 +00:00
|
|
|
"webpki 0.22.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-06-22 10:25:30 +00:00
|
|
|
[[package]]
|
|
|
|
name = "tokio-rustls"
|
|
|
|
version = "0.24.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081"
|
|
|
|
dependencies = [
|
|
|
|
"rustls 0.21.2",
|
|
|
|
"tokio",
|
|
|
|
]
|
|
|
|
|
2023-01-17 07:35:22 +00:00
|
|
|
[[package]]
|
|
|
|
name = "tokio-socks"
|
|
|
|
version = "0.5.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "51165dfa029d2a65969413a6cc96f354b86b464498702f174a4efa13608fd8c0"
|
|
|
|
dependencies = [
|
|
|
|
"either",
|
|
|
|
"futures-util",
|
|
|
|
"thiserror",
|
2022-07-16 21:49:35 +00:00
|
|
|
"tokio",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tokio-stream"
|
2023-05-01 07:17:37 +00:00
|
|
|
version = "0.1.14"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-01 07:17:37 +00:00
|
|
|
checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"futures-core",
|
|
|
|
"pin-project-lite 0.2.9",
|
|
|
|
"tokio",
|
2023-01-16 15:42:31 +00:00
|
|
|
"tokio-util",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tokio-util"
|
2023-05-01 07:17:37 +00:00
|
|
|
version = "0.7.8"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-01 07:17:37 +00:00
|
|
|
checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"futures-core",
|
|
|
|
"futures-io",
|
|
|
|
"futures-sink",
|
|
|
|
"pin-project-lite 0.2.9",
|
|
|
|
"tokio",
|
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "toml"
|
2023-01-28 06:47:13 +00:00
|
|
|
version = "0.5.11"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-28 06:47:13 +00:00
|
|
|
checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
2023-03-25 04:45:33 +00:00
|
|
|
[[package]]
|
|
|
|
name = "toml"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.7.5"
|
2023-03-25 04:45:33 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "1ebafdf5ad1220cb59e7d17cf4d2c72015297b75b19a10472f99b89225089240"
|
2023-03-25 04:45:33 +00:00
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
"serde_spanned",
|
|
|
|
"toml_datetime",
|
|
|
|
"toml_edit",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "toml_datetime"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.6.3"
|
2023-03-25 04:45:33 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b"
|
2023-03-25 04:45:33 +00:00
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "toml_edit"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.19.11"
|
2023-03-25 04:45:33 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "266f016b7f039eec8a1a80dfe6156b633d208b9fccca5e4db1d6775b0c4e34a7"
|
2023-03-25 04:45:33 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"indexmap 2.0.0",
|
2023-03-25 04:45:33 +00:00
|
|
|
"serde",
|
|
|
|
"serde_spanned",
|
|
|
|
"toml_datetime",
|
|
|
|
"winnow",
|
|
|
|
]
|
|
|
|
|
2023-01-04 08:17:36 +00:00
|
|
|
[[package]]
|
|
|
|
name = "tower"
|
|
|
|
version = "0.4.13"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"
|
|
|
|
dependencies = [
|
|
|
|
"tower-layer",
|
|
|
|
"tower-service",
|
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tower-http"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.4.1"
|
2023-01-04 08:17:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "a8bd22a874a2d0b70452d5597b12c537331d49060824a95f49f108994f94aa4c"
|
2023-01-04 08:17:36 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"bitflags 2.3.3",
|
2023-01-04 08:17:36 +00:00
|
|
|
"bytes",
|
|
|
|
"futures-core",
|
|
|
|
"futures-util",
|
|
|
|
"http",
|
|
|
|
"http-body",
|
|
|
|
"http-range-header",
|
|
|
|
"pin-project-lite 0.2.9",
|
|
|
|
"tower-layer",
|
|
|
|
"tower-service",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tower-layer"
|
|
|
|
version = "0.3.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "tower-service"
|
|
|
|
version = "0.3.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tracing"
|
2022-10-20 05:05:36 +00:00
|
|
|
version = "0.1.37"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-10-20 05:05:36 +00:00
|
|
|
checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
2023-01-04 08:17:36 +00:00
|
|
|
"log",
|
2022-07-16 21:49:35 +00:00
|
|
|
"pin-project-lite 0.2.9",
|
|
|
|
"tracing-attributes",
|
|
|
|
"tracing-core",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tracing-attributes"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.1.26"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tracing-core"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.1.31"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"once_cell",
|
|
|
|
"valuable",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tracing-futures"
|
|
|
|
version = "0.2.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2"
|
|
|
|
dependencies = [
|
|
|
|
"pin-project",
|
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tracing-log"
|
|
|
|
version = "0.1.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922"
|
|
|
|
dependencies = [
|
|
|
|
"lazy_static",
|
|
|
|
"log",
|
|
|
|
"tracing-core",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tracing-serde"
|
|
|
|
version = "0.1.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1"
|
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
"tracing-core",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tracing-subscriber"
|
|
|
|
version = "0.2.25"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71"
|
|
|
|
dependencies = [
|
|
|
|
"ansi_term",
|
|
|
|
"chrono",
|
|
|
|
"lazy_static",
|
|
|
|
"matchers",
|
|
|
|
"parking_lot 0.11.2",
|
|
|
|
"regex",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"sharded-slab",
|
|
|
|
"smallvec",
|
|
|
|
"thread_local",
|
|
|
|
"tracing",
|
|
|
|
"tracing-core",
|
|
|
|
"tracing-log",
|
|
|
|
"tracing-serde",
|
|
|
|
]
|
|
|
|
|
2023-04-11 14:18:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "tributary-chain"
|
|
|
|
version = "0.1.0"
|
|
|
|
dependencies = [
|
2023-04-14 01:05:18 +00:00
|
|
|
"async-trait",
|
2023-04-11 23:04:53 +00:00
|
|
|
"blake2",
|
|
|
|
"ciphersuite",
|
2023-04-14 01:05:18 +00:00
|
|
|
"flexible-transcript",
|
|
|
|
"futures",
|
|
|
|
"hex",
|
|
|
|
"log",
|
|
|
|
"parity-scale-codec",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"rand_chacha 0.3.1",
|
2023-04-11 23:04:53 +00:00
|
|
|
"schnorr-signatures",
|
2023-04-14 18:11:19 +00:00
|
|
|
"serai-db",
|
2023-04-14 01:05:18 +00:00
|
|
|
"subtle",
|
2023-04-11 14:18:31 +00:00
|
|
|
"tendermint-machine",
|
2023-04-11 23:04:53 +00:00
|
|
|
"thiserror",
|
2023-04-14 01:05:18 +00:00
|
|
|
"tokio",
|
2023-04-12 12:51:40 +00:00
|
|
|
"zeroize",
|
2023-04-11 14:18:31 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "trie-db"
|
2023-03-26 12:43:01 +00:00
|
|
|
version = "0.27.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-26 12:43:01 +00:00
|
|
|
checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"hash-db",
|
2023-03-06 12:39:43 +00:00
|
|
|
"hashbrown 0.13.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"log",
|
|
|
|
"rustc-hex",
|
|
|
|
"smallvec",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "trie-root"
|
2023-03-26 12:43:01 +00:00
|
|
|
version = "0.18.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-26 12:43:01 +00:00
|
|
|
checksum = "d4ed310ef5ab98f5fa467900ed906cb9232dd5376597e00fd4cba2a449d06c0b"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"hash-db",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "trust-dns-proto"
|
2022-10-20 05:05:36 +00:00
|
|
|
version = "0.22.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-10-20 05:05:36 +00:00
|
|
|
checksum = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"cfg-if",
|
|
|
|
"data-encoding",
|
|
|
|
"enum-as-inner",
|
|
|
|
"futures-channel",
|
|
|
|
"futures-io",
|
|
|
|
"futures-util",
|
2022-09-18 19:30:38 +00:00
|
|
|
"idna 0.2.3",
|
2022-07-16 21:49:35 +00:00
|
|
|
"ipnet",
|
|
|
|
"lazy_static",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"smallvec",
|
2023-06-22 10:25:30 +00:00
|
|
|
"socket2 0.4.9",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
|
|
|
"tinyvec",
|
2023-01-04 08:17:36 +00:00
|
|
|
"tokio",
|
2022-10-20 05:05:36 +00:00
|
|
|
"tracing",
|
2022-07-16 21:49:35 +00:00
|
|
|
"url",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "trust-dns-resolver"
|
2022-10-20 05:05:36 +00:00
|
|
|
version = "0.22.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-10-20 05:05:36 +00:00
|
|
|
checksum = "aff21aa4dcefb0a1afbfac26deb0adc93888c7d295fb63ab273ef276ba2b7cfe"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"futures-util",
|
|
|
|
"ipconfig",
|
|
|
|
"lazy_static",
|
|
|
|
"lru-cache",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"resolv-conf",
|
|
|
|
"smallvec",
|
|
|
|
"thiserror",
|
2023-01-04 08:17:36 +00:00
|
|
|
"tokio",
|
2022-10-20 05:05:36 +00:00
|
|
|
"tracing",
|
2022-07-16 21:49:35 +00:00
|
|
|
"trust-dns-proto",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "try-lock"
|
2023-01-08 14:10:17 +00:00
|
|
|
version = "0.2.4"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-08 14:10:17 +00:00
|
|
|
checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tt-call"
|
2022-12-21 04:12:26 +00:00
|
|
|
version = "1.0.9"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-21 04:12:26 +00:00
|
|
|
checksum = "f4f195fd851901624eee5a58c4bb2b4f06399148fcd0ed336e6f1cb60a9881df"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "turn"
|
|
|
|
version = "0.6.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4712ee30d123ec7ae26d1e1b218395a16c87cdbaf4b3925d170d684af62ea5e8"
|
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"base64 0.13.1",
|
|
|
|
"futures",
|
|
|
|
"log",
|
2023-05-10 11:34:07 +00:00
|
|
|
"md-5",
|
2023-01-16 15:42:31 +00:00
|
|
|
"rand 0.8.5",
|
|
|
|
"ring",
|
|
|
|
"stun",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
"webrtc-util",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "twox-hash"
|
|
|
|
version = "1.6.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
2023-06-22 10:25:30 +00:00
|
|
|
"digest 0.10.7",
|
2022-07-16 21:49:35 +00:00
|
|
|
"rand 0.8.5",
|
|
|
|
"static_assertions",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "typenum"
|
2022-12-07 22:56:53 +00:00
|
|
|
version = "1.16.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-07 22:56:53 +00:00
|
|
|
checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ucd-trie"
|
2022-09-18 19:30:38 +00:00
|
|
|
version = "0.1.5"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-09-18 19:30:38 +00:00
|
|
|
checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "uint"
|
2022-12-07 22:56:53 +00:00
|
|
|
version = "0.9.5"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-07 22:56:53 +00:00
|
|
|
checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"byteorder",
|
|
|
|
"crunchy",
|
|
|
|
"hex",
|
|
|
|
"static_assertions",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "unicode-bidi"
|
2023-03-25 04:45:33 +00:00
|
|
|
version = "0.3.13"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-25 04:45:33 +00:00
|
|
|
checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "unicode-ident"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "1.0.9"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "unicode-normalization"
|
2022-09-18 19:30:38 +00:00
|
|
|
version = "0.1.22"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-09-18 19:30:38 +00:00
|
|
|
checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"tinyvec",
|
|
|
|
]
|
|
|
|
|
2022-12-07 23:05:06 +00:00
|
|
|
[[package]]
|
|
|
|
name = "unicode-segmentation"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "1.10.1"
|
2022-12-07 23:05:06 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"
|
2022-12-07 23:05:06 +00:00
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "unicode-width"
|
2022-09-18 19:30:38 +00:00
|
|
|
version = "0.1.10"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-09-18 19:30:38 +00:00
|
|
|
checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "unicode-xid"
|
2022-09-18 19:30:38 +00:00
|
|
|
version = "0.2.4"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-09-18 19:30:38 +00:00
|
|
|
checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "universal-hash"
|
|
|
|
version = "0.4.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05"
|
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"generic-array",
|
2022-07-16 21:49:35 +00:00
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
2023-03-06 12:39:43 +00:00
|
|
|
[[package]]
|
|
|
|
name = "universal-hash"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.5.1"
|
2023-03-06 12:39:43 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea"
|
2023-03-06 12:39:43 +00:00
|
|
|
dependencies = [
|
|
|
|
"crypto-common",
|
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "unsigned-varint"
|
|
|
|
version = "0.7.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d86a8dc7f45e4c1b0d30e43038c38f274e77af056aa5f74b93c2cf9eb3c1c836"
|
|
|
|
dependencies = [
|
|
|
|
"asynchronous-codec",
|
|
|
|
"bytes",
|
|
|
|
"futures-io",
|
|
|
|
"futures-util",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "untrusted"
|
|
|
|
version = "0.7.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "url"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "2.4.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"form_urlencoded",
|
2023-06-22 10:25:30 +00:00
|
|
|
"idna 0.4.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"percent-encoding",
|
|
|
|
]
|
|
|
|
|
2023-03-31 06:34:52 +00:00
|
|
|
[[package]]
|
|
|
|
name = "utf8parse"
|
|
|
|
version = "0.2.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "uuid"
|
|
|
|
version = "0.8.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
|
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"getrandom 0.2.10",
|
2022-07-16 21:49:35 +00:00
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2023-01-16 15:42:31 +00:00
|
|
|
name = "uuid"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "1.4.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be"
|
2023-01-16 15:42:31 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"getrandom 0.2.10",
|
2023-01-16 15:42:31 +00:00
|
|
|
]
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
2023-01-05 03:52:41 +00:00
|
|
|
name = "validator-sets-pallet"
|
|
|
|
version = "0.1.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-01-05 03:52:41 +00:00
|
|
|
"frame-support",
|
|
|
|
"frame-system",
|
2023-05-13 06:02:47 +00:00
|
|
|
"hashbrown 0.13.2",
|
2023-01-05 03:52:41 +00:00
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
|
|
|
"serai-primitives",
|
2023-05-13 06:02:47 +00:00
|
|
|
"sp-application-crypto",
|
2023-03-28 09:45:54 +00:00
|
|
|
"sp-core",
|
2023-06-28 18:57:58 +00:00
|
|
|
"sp-std 5.0.0",
|
2023-01-05 03:52:41 +00:00
|
|
|
"validator-sets-primitives",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "validator-sets-primitives"
|
|
|
|
version = "0.1.0"
|
|
|
|
dependencies = [
|
2023-05-13 08:20:13 +00:00
|
|
|
"ciphersuite",
|
|
|
|
"dkg",
|
2023-01-05 03:52:41 +00:00
|
|
|
"parity-scale-codec",
|
|
|
|
"scale-info",
|
2023-03-25 04:45:33 +00:00
|
|
|
"serai-primitives",
|
2023-01-05 03:52:41 +00:00
|
|
|
"serde",
|
2023-03-31 00:24:11 +00:00
|
|
|
"sp-core",
|
2023-05-13 08:20:13 +00:00
|
|
|
"sp-std 5.0.0",
|
Processor (#259)
* Initial work on a message box
* Finish message-box (untested)
* Expand documentation
* Embed the recipient in the signature challenge
Prevents a message from A -> B from being read as from A -> C.
* Update documentation by bifurcating sender/receiver
* Panic on receiving an invalid signature
If we've received an invalid signature in an authenticated system, a
service is malicious, critically faulty (equivalent to malicious), or
the message layer has been compromised (or is otherwise critically
faulty).
Please note a receiver who handles a message they shouldn't will trigger
this. That falls under being critically faulty.
* Documentation and helper methods
SecureMessage::new and SecureMessage::serialize.
Secure Debug for MessageBox.
* Have SecureMessage not be serialized by default
Allows passing around in-memory, if desired, and moves the error from
decrypt to new (which performs deserialization).
Decrypt no longer has an error since it panics if given an invalid
signature, due to this being intranet code.
* Explain and improve nonce handling
Includes a missing zeroize call.
* Rebase to latest develop
Updates to transcript 0.2.0.
* Add a test for the MessageBox
* Export PrivateKey and PublicKey
* Also test serialization
* Add a key_gen binary to message_box
* Have SecureMessage support Serde
* Add encrypt_to_bytes and decrypt_from_bytes
* Support String ser via base64
* Rename encrypt/decrypt to encrypt_bytes/decrypt_to_bytes
* Directly operate with values supporting Borsh
* Use bincode instead of Borsh
By staying inside of serde, we'll support many more structs. While
bincode isn't canonical, we don't need canonicity on an authenticated,
internal system.
* Turn PrivateKey, PublicKey into structs
Uses Zeroizing for the PrivateKey per #150.
* from_string functions intended for loading from an env
* Use &str for PublicKey from_string (now from_str)
The PrivateKey takes the String to take ownership of its memory and
zeroize it. That isn't needed with PublicKeys.
* Finish updating from develop
* Resolve warning
* Use ZeroizingAlloc on the key_gen binary
* Move message-box from crypto/ to common/
* Move key serialization functions to ser
* add/remove functions in MessageBox
* Implement Hash on dalek_ff_group Points
* Make MessageBox generic to its key
Exposes a &'static str variant for internal use and a RistrettoPoint
variant for external use.
* Add Private to_string as deprecated
Stub before more competent tooling is deployed.
* Private to_public
* Test both Internal and External MessageBox, only use PublicKey in the pub API
* Remove panics on invalid signatures
Leftover from when this was solely internal which is now unsafe.
* Chicken scratch a Scanner task
* Add a write function to the DKG library
Enables writing directly to a file.
Also modifies serialize to return Zeroizing<Vec<u8>> instead of just Vec<u8>.
* Make dkg::encryption pub
* Remove encryption from MessageBox
* Use a 64-bit block number in Substrate
We use a 64-bit block number in general since u32 only works for 120 years
(with a 1 second block time). As some chains even push the 1 second threshold,
especially ones based on DAG consensus, this becomes potentially as low as 60
years.
While that should still be plenty, it's not worth wondering/debating. Since
Serai uses 64-bit block numbers elsewhere, this ensures consistency.
* Misc crypto lints
* Get the scanner scratch to compile
* Initial scanner test
* First few lines of scheduler
* Further work on scheduler, solidify API
* Define Scheduler TX format
* Branch creation algorithm
* Document when the branch algorithm isn't perfect
* Only scanned confirmed blocks
* Document Coin
* Remove Canonical/ChainNumber from processor
The processor should be abstracted from canonical numbers thanks to the
coordinator, making this unnecessary.
* Add README documenting processor flow
* Use Zeroize on substrate primitives
* Define messages from/to the processor
* Correct over-specified versioning
* Correct build re: in_instructions::primitives
* Debug/some serde in crypto/
* Use a struct for ValidatorSetInstance
* Add a processor key_gen task
Redos DB handling code.
* Replace trait + impl with wrapper struct
* Add a key confirmation flow to the key gen task
* Document concerns on key_gen
* Start on a signer task
* Add Send to FROST traits
* Move processor lib.rs to main.rs
Adds a dummy main to reduce clippy dead_code warnings.
* Further flesh out main.rs
* Move the DB trait to AsRef<[u8]>
* Signer task
* Remove a panic in bitcoin when there's insufficient funds
Unchecked underflow.
* Have Monero's mine_block mine one block, not 10
It was initially a nicety to deal with the 10 block lock. C::CONFIRMATIONS
should be used for that instead.
* Test signer
* Replace channel expects with log statements
The expects weren't problematic and had nicer code. They just clutter test
output.
* Remove the old wallet file
It predates the coordinator design and shouldn't be used.
* Rename tests/scan.rs to tests/scanner.rs
* Add a wallet test
Complements the recently removed wallet file by adding a test for the scanner,
scheduler, and signer together.
* Work on a run function
Triggers a clippy ICE.
* Resolve clippy ICE
The issue was the non-fully specified lambda in signer.
* Add KeyGenEvent and KeyGenOrder
Needed so we get KeyConfirmed messages from the key gen task.
While we could've read the CoordinatorMessage to see that, routing through the
key gen tasks ensures we only handle it once it's been successfully saved to
disk.
* Expand scanner test
* Clarify processor documentation
* Have the Scanner load keys on boot/save outputs to disk
* Use Vec<u8> for Block ID
Much more flexible.
* Panic if we see the same output multiple times
* Have the Scanner DB mark itself as corrupt when doing a multi-put
This REALLY should be a TX. Since we don't have a TX API right now, this at
least offers detection.
* Have DST'd DB keys accept AsRef<[u8]>
* Restore polling all signers
Writes a custom future to do so.
Also loads signers on boot using what the scanner claims are active keys.
* Schedule OutInstructions
Adds a data field to Payment.
Also cleans some dead code.
* Panic if we create an invalid transaction
Saves the TX once it's successfully signed so if we do panic, we have a copy.
* Route coordinator messages to their respective signer
Requires adding key to the SignId.
* Send SignTransaction orders for all plans
* Add a timer to retry sign_plans when prepare_send fails
* Minor fmt'ing
* Basic Fee API
* Move the change key into Plan
* Properly route activation_number
* Remove ScannerEvent::Block
It's not used under current designs
* Nicen logs
* Add utilities to get a block's number
* Have main issue AckBlock
Also has a few misc lints.
* Parse instructions out of outputs
* Tweak TODOs and remove an unwrap
* Update Bitcoin max input/output quantity
* Only read one piece of data from Monero
Due to output randomization, it's infeasible.
* Embed plan IDs into the TXs they create
We need to stop attempting signing if we've already signed a protocol. Ideally,
any one of the participating signers should be able to provide a proof the TX
was successfully signed. We can't just run a second signing protocol though as
a single malicious signer could complete the TX signature, and publish it,
yet not complete the secondary signature.
The TX itself has to be sufficient to show that the TX matches the plan. This
is done by embedding the ID, so matching addresses/amounts plans are
distinguished, and by allowing verification a TX actually matches a set of
addresses/amounts.
For Monero, this will need augmenting with the ephemeral keys (or usage of a
static seed for them).
* Don't use OP_RETURN to encode the plan ID on Bitcoin
We can use the inputs to distinguih identical-output plans without issue.
* Update OP_RETURN data access
It's not required to be the last output.
* Add Eventualities to Monero
An Eventuality is an effective equivalent to a SignableTransaction. That is
declared not by the inputs it spends, yet the outputs it creates.
Eventualities are also bound to a 32-byte RNG seed, enabling usage of a
hash-based identifier in a SignableTransaction, allowing multiple
SignableTransactions with the same output set to have different Eventualities.
In order to prevent triggering the burning bug, the RNG seed is hashed with
the planned-to-be-used inputs' output keys. While this does bind to them, it's
only loosely bound. The TX actually created may use different inputs entirely
if a forgery is crafted (which requires no brute forcing).
Binding to the key images would provide a strong binding, yet would require
knowing the key images, which requires active communication with the spend
key.
The purpose of this is so a multisig can identify if a Transaction the entire
group planned has been executed by a subset of the group or not. Once a plan
is created, it can have an Eventuality made. The Eventuality's extra is able
to be inserted into a HashMap, so all new on-chain transactions can be
trivially checked as potential candidates. Once a potential candidate is found,
a check involving ECC ops can be performed.
While this is arguably a DoS vector, the underlying Monero blockchain would
need to be spammed with transactions to trigger it. Accordingly, it becomes
a Monero blockchain DoS vector, when this code is written on the premise
of the Monero blockchain functioning. Accordingly, it is considered handled.
If a forgery does match, it must have created the exact same outputs the
multisig would've. Accordingly, it's argued the multisig shouldn't mind.
This entire suite of code is only necessary due to the lack of outgoing
view keys, yet it's able to avoid an interactive protocol to communicate
key images on every single received output.
While this could be locked to the multisig feature, there's no practical
benefit to doing so.
* Add support for encoding Monero address to instructions
* Move Serai's Monero address encoding into serai-client
serai-client is meant to be a single library enabling using Serai. While it was
originally written as an RPC client for Serai, apps actually using Serai will
primarily be sending transactions on connected networks. Sending those
transactions require proper {In, Out}Instructions, including proper address
encoding.
Not only has address encoding been moved, yet the subxt client is now behind
a feature. coin integrations have their own features, which are on by default.
primitives are always exposed.
* Reorganize file layout a bit, add feature flags to processor
* Tidy up ETH Dockerfile
* Add Bitcoin address encoding
* Move Bitcoin::Address to serai-client's
* Comment where tweaking needs to happen
* Add an API to check if a plan was completed in a specific TX
This allows any participating signer to submit the TX ID to prevent further
signing attempts.
Also performs some API cleanup.
* Minimize FROST dependencies
* Use a seeded RNG for key gen
* Tweak keys from Key gen
* Test proper usage of Branch/Change addresses
Adds a more descriptive error to an error case in decoys, and pads Monero
payments as needed.
* Also test spending the change output
* Add queued_plans to the Scheduler
queued_plans is for payments to be issued when an amount appears, yet the
amount is currently pre-fee. One the output is actually created, the
Scheduler should be notified of the amount it was created with, moving from
queued_plans to plans under the actual amount.
Also tightens debug_asserts to asserts for invariants which may are at risk of
being exclusive to prod.
* Add missing tweak_keys call
* Correct decoy selection height handling
* Add a few log statements to the scheduler
* Simplify test's get_block_number
* Simplify, while making more robust, branch address handling in Scheduler
* Have fees deducted from payments
Corrects Monero's handling of fees when there's no change address.
Adds a DUST variable, as needed due to 1_00_000_000 not being enough to pay
its fee on Monero.
* Add comment to Monero
* Consolidate BTC/XMR prepare_send code
These aren't fully consolidated. We'd need a SignableTransaction trait for
that. This is a lot cleaner though.
* Ban integrated addresses
The reasoning why is accordingly documented.
* Tidy TODOs/dust handling
* Update README TODO
* Use a determinisitic protocol version in Monero
* Test rebuilt KeyGen machines function as expected
* Use a more robust KeyGen entropy system
* Add DB TXNs
Also load entropy from env
* Add a loop for processing messages from substrate
Allows detecting if we're behind, and if so, waiting to handle the message
* Set Monero MAX_INPUTS properly
The previous number was based on an old hard fork. With the ring size having
increased, transactions have since got larger.
* Distinguish TODOs into TODO and TODO2s
TODO2s are for after protonet
* Zeroize secret share repr in ThresholdCore write
* Work on Eventualities
Adds serialization and stops signing when an eventuality is proven.
* Use a more robust DB key schema
* Update to {k, p}256 0.12
* cargo +nightly clippy
* cargo update
* Slight message-box tweaks
* Update to recent Monero merge
* Add a Coordinator trait for communication with coordinator
* Remove KeyGenHandle for just KeyGen
While KeyGen previously accepted instructions over a channel, this breaks the
ack flow needed for coordinator communication. Now, KeyGen is the direct object
with a handle() function for messages.
Thankfully, this ended up being rather trivial for KeyGen as it has no
background tasks.
* Add a handle function to Signer
Enables determining when it's finished handling a CoordinatorMessage and
therefore creating an acknowledgement.
* Save transactions used to complete eventualities
* Use a more intelligent sleep in the signer
* Emit SignedTransaction with the first ID *we can still get from our node*
* Move Substrate message handling into the new coordinator recv loop
* Add handle function to Scanner
* Remove the plans timer
Enables ensuring the ordring on the handling of plans.
* Remove the outputs function which panicked if a precondition wasn't met
The new API only returns outputs upon satisfaction of the precondition.
* Convert SignerOrder::SignTransaction to a function
* Remove the key_gen object from sign_plans
* Refactor out get_fee/prepare_send into dedicated functions
* Save plans being signed to the DB
* Reload transactions being signed on boot
* Stop reloading TXs being signed (and report it to peers)
* Remove message-box from the processor branch
We don't use it here yet.
* cargo +nightly fmt
* Move back common/zalloc
* Update subxt to 0.27
* Zeroize ^1.5, not 1
* Update GitHub workflow
* Remove usage of SignId in completed
2023-03-17 02:59:40 +00:00
|
|
|
"zeroize",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "valuable"
|
|
|
|
version = "0.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "vcpkg"
|
|
|
|
version = "0.2.15"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "version_check"
|
|
|
|
version = "0.9.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "void"
|
|
|
|
version = "1.0.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "waitgroup"
|
|
|
|
version = "0.1.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d1f50000a783467e6c0200f9d10642f4bc424e39efc1b770203e88b488f79292"
|
|
|
|
dependencies = [
|
|
|
|
"atomic-waker",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "waker-fn"
|
|
|
|
version = "1.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "walkdir"
|
2023-03-16 23:37:32 +00:00
|
|
|
version = "2.3.3"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-16 23:37:32 +00:00
|
|
|
checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"same-file",
|
|
|
|
"winapi-util",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "want"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.3.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"try-lock",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasi"
|
|
|
|
version = "0.9.0+wasi-snapshot-preview1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasi"
|
|
|
|
version = "0.10.0+wasi-snapshot-preview1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasi"
|
|
|
|
version = "0.11.0+wasi-snapshot-preview1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-bindgen"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.2.87"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"wasm-bindgen-macro",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-bindgen-backend"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.2.87"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"bumpalo",
|
|
|
|
"log",
|
2022-08-16 07:44:32 +00:00
|
|
|
"once_cell",
|
2022-07-16 21:49:35 +00:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
"wasm-bindgen-shared",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-bindgen-futures"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.4.37"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"js-sys",
|
|
|
|
"wasm-bindgen",
|
|
|
|
"web-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-bindgen-macro"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.2.87"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"quote",
|
|
|
|
"wasm-bindgen-macro-support",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-bindgen-macro-support"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.2.87"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
"wasm-bindgen-backend",
|
|
|
|
"wasm-bindgen-shared",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-bindgen-shared"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.2.87"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
2022-11-11 04:59:20 +00:00
|
|
|
name = "wasm-instrument"
|
2023-04-09 06:31:10 +00:00
|
|
|
version = "0.4.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 06:31:10 +00:00
|
|
|
checksum = "2a47ecb37b9734d1085eaa5ae1a81e60801fd8c28d4cabdd8aedb982021918bc"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-11-11 04:59:20 +00:00
|
|
|
"parity-wasm",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2022-11-11 04:59:20 +00:00
|
|
|
name = "wasm-opt"
|
2023-04-09 06:31:10 +00:00
|
|
|
version = "0.112.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 06:31:10 +00:00
|
|
|
checksum = "87fef6d0d508f08334e0ab0e6877feb4c0ecb3956bcf2cb950699b22fedf3e9c"
|
2022-11-11 04:59:20 +00:00
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"libc",
|
|
|
|
"strum",
|
|
|
|
"strum_macros",
|
|
|
|
"tempfile",
|
|
|
|
"thiserror",
|
|
|
|
"wasm-opt-cxx-sys",
|
|
|
|
"wasm-opt-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-opt-cxx-sys"
|
2023-04-09 06:31:10 +00:00
|
|
|
version = "0.112.0"
|
2022-11-11 04:59:20 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 06:31:10 +00:00
|
|
|
checksum = "bc816bbc1596c8f2e8127e137a760c798023ef3d378f2ae51f0f1840e2dfa445"
|
2022-11-11 04:59:20 +00:00
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"cxx",
|
|
|
|
"cxx-build",
|
|
|
|
"wasm-opt-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-opt-sys"
|
2023-04-09 06:31:10 +00:00
|
|
|
version = "0.112.0"
|
2022-11-11 04:59:20 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 06:31:10 +00:00
|
|
|
checksum = "40199e4f68ef1071b3c6d0bd8026a12b481865d4b9e49c156932ea9a6234dd14"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-11-11 04:59:20 +00:00
|
|
|
"anyhow",
|
|
|
|
"cc",
|
|
|
|
"cxx",
|
|
|
|
"cxx-build",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-timer"
|
|
|
|
version = "0.2.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f"
|
|
|
|
dependencies = [
|
|
|
|
"futures",
|
|
|
|
"js-sys",
|
|
|
|
"parking_lot 0.11.2",
|
|
|
|
"pin-utils",
|
|
|
|
"wasm-bindgen",
|
|
|
|
"wasm-bindgen-futures",
|
|
|
|
"web-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmi"
|
2022-09-29 18:33:09 +00:00
|
|
|
version = "0.13.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-09-29 18:33:09 +00:00
|
|
|
checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-11-11 04:59:20 +00:00
|
|
|
"parity-wasm",
|
2022-07-16 21:49:35 +00:00
|
|
|
"wasmi-validation",
|
2022-09-29 18:33:09 +00:00
|
|
|
"wasmi_core",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmi-validation"
|
2022-09-29 18:33:09 +00:00
|
|
|
version = "0.5.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b"
|
|
|
|
dependencies = [
|
2022-11-11 04:59:20 +00:00
|
|
|
"parity-wasm",
|
2022-09-29 18:33:09 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmi_core"
|
|
|
|
version = "0.2.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-09-29 18:33:09 +00:00
|
|
|
checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2022-09-29 18:33:09 +00:00
|
|
|
"downcast-rs",
|
2023-06-22 10:25:30 +00:00
|
|
|
"libm 0.2.7",
|
2022-09-29 18:33:09 +00:00
|
|
|
"memory_units",
|
|
|
|
"num-rational",
|
|
|
|
"num-traits",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmparser"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "0.102.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "48134de3d7598219ab9eaf6b91b15d8e50d31da76b8519fe4ecfcec2cf35104b"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-28 18:57:58 +00:00
|
|
|
"indexmap 1.9.3",
|
2023-03-06 12:39:43 +00:00
|
|
|
"url",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "8.0.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "f907fdead3153cb9bfb7a93bbd5b62629472dc06dee83605358c64c52ed3dda9"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"bincode",
|
|
|
|
"cfg-if",
|
2023-06-28 18:57:58 +00:00
|
|
|
"indexmap 1.9.3",
|
2022-07-16 21:49:35 +00:00
|
|
|
"libc",
|
|
|
|
"log",
|
2023-07-02 00:27:03 +00:00
|
|
|
"object 0.30.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
"once_cell",
|
|
|
|
"paste",
|
|
|
|
"psm",
|
|
|
|
"rayon",
|
|
|
|
"serde",
|
|
|
|
"target-lexicon",
|
|
|
|
"wasmparser",
|
|
|
|
"wasmtime-cache",
|
|
|
|
"wasmtime-cranelift",
|
|
|
|
"wasmtime-environ",
|
|
|
|
"wasmtime-jit",
|
|
|
|
"wasmtime-runtime",
|
2023-06-28 18:57:58 +00:00
|
|
|
"windows-sys 0.45.0",
|
2022-09-29 18:33:09 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-asm-macros"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "8.0.1"
|
2022-09-29 18:33:09 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "d3b9daa7c14cd4fa3edbf69de994408d5f4b7b0959ac13fa69d465f6597f810d"
|
2022-09-29 18:33:09 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-cache"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "8.0.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
2023-06-28 18:57:58 +00:00
|
|
|
"base64 0.21.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
"bincode",
|
|
|
|
"directories-next",
|
|
|
|
"file-per-thread-logger",
|
|
|
|
"log",
|
2023-06-22 10:25:30 +00:00
|
|
|
"rustix 0.36.14",
|
2022-07-16 21:49:35 +00:00
|
|
|
"serde",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2023-03-25 04:45:33 +00:00
|
|
|
"toml 0.5.11",
|
2023-06-28 18:57:58 +00:00
|
|
|
"windows-sys 0.45.0",
|
2023-04-09 06:31:10 +00:00
|
|
|
"zstd 0.11.2+zstd.1.5.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-cranelift"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "8.0.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "b1cefde0cce8cb700b1b21b6298a3837dba46521affd7b8c38a9ee2c869eee04"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"cranelift-codegen",
|
|
|
|
"cranelift-entity",
|
|
|
|
"cranelift-frontend",
|
|
|
|
"cranelift-native",
|
|
|
|
"cranelift-wasm",
|
2023-06-28 18:57:58 +00:00
|
|
|
"gimli",
|
2022-07-16 21:49:35 +00:00
|
|
|
"log",
|
2023-07-02 00:27:03 +00:00
|
|
|
"object 0.30.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
"target-lexicon",
|
|
|
|
"thiserror",
|
|
|
|
"wasmparser",
|
2023-06-28 18:57:58 +00:00
|
|
|
"wasmtime-cranelift-shared",
|
|
|
|
"wasmtime-environ",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-cranelift-shared"
|
|
|
|
version = "8.0.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "cd041e382ef5aea1b9fc78442394f1a4f6d676ce457e7076ca4cb3f397882f8b"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"cranelift-codegen",
|
|
|
|
"cranelift-native",
|
|
|
|
"gimli",
|
2023-07-02 00:27:03 +00:00
|
|
|
"object 0.30.4",
|
2023-06-28 18:57:58 +00:00
|
|
|
"target-lexicon",
|
2022-07-16 21:49:35 +00:00
|
|
|
"wasmtime-environ",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-environ"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "8.0.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"cranelift-entity",
|
2023-06-28 18:57:58 +00:00
|
|
|
"gimli",
|
|
|
|
"indexmap 1.9.3",
|
2022-07-16 21:49:35 +00:00
|
|
|
"log",
|
2023-07-02 00:27:03 +00:00
|
|
|
"object 0.30.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
"serde",
|
|
|
|
"target-lexicon",
|
|
|
|
"thiserror",
|
|
|
|
"wasmparser",
|
|
|
|
"wasmtime-types",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-jit"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "8.0.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "0de48df552cfca1c9b750002d3e07b45772dd033b0b206d5c0968496abf31244"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-07-02 00:27:03 +00:00
|
|
|
"addr2line 0.19.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"anyhow",
|
|
|
|
"bincode",
|
|
|
|
"cfg-if",
|
|
|
|
"cpp_demangle",
|
2023-06-28 18:57:58 +00:00
|
|
|
"gimli",
|
2022-07-16 21:49:35 +00:00
|
|
|
"log",
|
2023-07-02 00:27:03 +00:00
|
|
|
"object 0.30.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
"rustc-demangle",
|
|
|
|
"serde",
|
|
|
|
"target-lexicon",
|
|
|
|
"wasmtime-environ",
|
|
|
|
"wasmtime-jit-debug",
|
2023-03-06 12:39:43 +00:00
|
|
|
"wasmtime-jit-icache-coherence",
|
2022-07-16 21:49:35 +00:00
|
|
|
"wasmtime-runtime",
|
2023-06-28 18:57:58 +00:00
|
|
|
"windows-sys 0.45.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-jit-debug"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "8.0.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-07-02 00:27:03 +00:00
|
|
|
"object 0.30.4",
|
2022-09-29 18:33:09 +00:00
|
|
|
"once_cell",
|
2023-06-22 10:25:30 +00:00
|
|
|
"rustix 0.36.14",
|
2023-03-06 12:39:43 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-jit-icache-coherence"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "8.0.1"
|
2023-03-06 12:39:43 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "aecae978b13f7f67efb23bd827373ace4578f2137ec110bbf6a4a7cde4121bbd"
|
2023-03-06 12:39:43 +00:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"libc",
|
2023-06-28 18:57:58 +00:00
|
|
|
"windows-sys 0.45.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-runtime"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "8.0.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"cc",
|
|
|
|
"cfg-if",
|
2023-06-28 18:57:58 +00:00
|
|
|
"indexmap 1.9.3",
|
2022-07-16 21:49:35 +00:00
|
|
|
"libc",
|
|
|
|
"log",
|
|
|
|
"mach",
|
|
|
|
"memfd",
|
2023-06-28 18:57:58 +00:00
|
|
|
"memoffset 0.8.0",
|
2022-09-29 18:33:09 +00:00
|
|
|
"paste",
|
2022-07-16 21:49:35 +00:00
|
|
|
"rand 0.8.5",
|
2023-06-22 10:25:30 +00:00
|
|
|
"rustix 0.36.14",
|
2022-09-29 18:33:09 +00:00
|
|
|
"wasmtime-asm-macros",
|
2022-07-16 21:49:35 +00:00
|
|
|
"wasmtime-environ",
|
|
|
|
"wasmtime-jit-debug",
|
2023-06-28 18:57:58 +00:00
|
|
|
"windows-sys 0.45.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-types"
|
2023-06-28 18:57:58 +00:00
|
|
|
version = "8.0.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 18:57:58 +00:00
|
|
|
checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cranelift-entity",
|
|
|
|
"serde",
|
|
|
|
"thiserror",
|
|
|
|
"wasmparser",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "web-sys"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.3.64"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"js-sys",
|
|
|
|
"wasm-bindgen",
|
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "webpki"
|
|
|
|
version = "0.21.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea"
|
|
|
|
dependencies = [
|
|
|
|
"ring",
|
|
|
|
"untrusted",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "webpki"
|
|
|
|
version = "0.22.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd"
|
|
|
|
dependencies = [
|
|
|
|
"ring",
|
|
|
|
"untrusted",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "webpki-roots"
|
2022-12-21 04:12:26 +00:00
|
|
|
version = "0.22.6"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-12-21 04:12:26 +00:00
|
|
|
checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-01-16 15:42:31 +00:00
|
|
|
"webpki 0.22.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2023-01-16 15:42:31 +00:00
|
|
|
name = "webrtc"
|
|
|
|
version = "0.6.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2d3bc9049bdb2cea52f5fd4f6f728184225bdb867ed0dc2410eab6df5bdd67bb"
|
|
|
|
dependencies = [
|
|
|
|
"arc-swap",
|
|
|
|
"async-trait",
|
|
|
|
"bytes",
|
|
|
|
"hex",
|
|
|
|
"interceptor",
|
|
|
|
"lazy_static",
|
|
|
|
"log",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"rcgen 0.9.3",
|
|
|
|
"regex",
|
|
|
|
"ring",
|
|
|
|
"rtcp",
|
|
|
|
"rtp",
|
|
|
|
"rustls 0.19.1",
|
|
|
|
"sdp",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2023-01-16 15:42:31 +00:00
|
|
|
"stun",
|
|
|
|
"thiserror",
|
2023-06-22 10:25:30 +00:00
|
|
|
"time 0.3.22",
|
2023-01-16 15:42:31 +00:00
|
|
|
"tokio",
|
|
|
|
"turn",
|
|
|
|
"url",
|
|
|
|
"waitgroup",
|
|
|
|
"webrtc-data",
|
|
|
|
"webrtc-dtls",
|
|
|
|
"webrtc-ice",
|
|
|
|
"webrtc-mdns",
|
|
|
|
"webrtc-media",
|
|
|
|
"webrtc-sctp",
|
|
|
|
"webrtc-srtp",
|
|
|
|
"webrtc-util",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "webrtc-data"
|
|
|
|
version = "0.6.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0ef36a4d12baa6e842582fe9ec16a57184ba35e1a09308307b67d43ec8883100"
|
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"derive_builder",
|
|
|
|
"log",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
"webrtc-sctp",
|
|
|
|
"webrtc-util",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "webrtc-dtls"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.7.1"
|
2023-01-16 15:42:31 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "942be5bd85f072c3128396f6e5a9bfb93ca8c1939ded735d177b7bcba9a13d05"
|
2023-01-16 15:42:31 +00:00
|
|
|
dependencies = [
|
|
|
|
"aes 0.6.0",
|
2023-06-22 10:25:30 +00:00
|
|
|
"aes-gcm 0.10.2",
|
2023-01-16 15:42:31 +00:00
|
|
|
"async-trait",
|
|
|
|
"bincode",
|
|
|
|
"block-modes",
|
|
|
|
"byteorder",
|
|
|
|
"ccm",
|
|
|
|
"curve25519-dalek 3.2.0",
|
2023-03-11 09:49:05 +00:00
|
|
|
"der-parser 8.2.0",
|
2023-03-25 04:45:33 +00:00
|
|
|
"elliptic-curve 0.12.3",
|
2023-01-16 15:42:31 +00:00
|
|
|
"hkdf",
|
2023-03-06 12:39:43 +00:00
|
|
|
"hmac 0.12.1",
|
2023-01-16 15:42:31 +00:00
|
|
|
"log",
|
|
|
|
"oid-registry 0.6.1",
|
2023-03-16 20:59:20 +00:00
|
|
|
"p256 0.11.1",
|
2023-01-16 15:42:31 +00:00
|
|
|
"p384",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"rand_core 0.6.4",
|
|
|
|
"rcgen 0.9.3",
|
|
|
|
"ring",
|
|
|
|
"rustls 0.19.1",
|
2023-03-25 04:45:33 +00:00
|
|
|
"sec1 0.3.0",
|
2023-01-16 15:42:31 +00:00
|
|
|
"serde",
|
2023-03-06 12:39:43 +00:00
|
|
|
"sha1",
|
2023-06-22 10:25:30 +00:00
|
|
|
"sha2 0.10.7",
|
2023-03-16 20:59:20 +00:00
|
|
|
"signature 1.6.4",
|
2023-01-16 15:42:31 +00:00
|
|
|
"subtle",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
"webpki 0.21.4",
|
|
|
|
"webrtc-util",
|
2023-04-01 09:44:18 +00:00
|
|
|
"x25519-dalek 2.0.0-pre.1",
|
2023-01-16 15:42:31 +00:00
|
|
|
"x509-parser 0.13.2",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "webrtc-ice"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.9.1"
|
2023-01-16 15:42:31 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "465a03cc11e9a7d7b4f9f99870558fe37a102b65b93f8045392fef7c67b39e80"
|
2023-01-16 15:42:31 +00:00
|
|
|
dependencies = [
|
|
|
|
"arc-swap",
|
|
|
|
"async-trait",
|
|
|
|
"crc",
|
|
|
|
"log",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"stun",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
"turn",
|
|
|
|
"url",
|
2023-06-28 18:57:58 +00:00
|
|
|
"uuid 1.4.0",
|
2023-01-16 15:42:31 +00:00
|
|
|
"waitgroup",
|
|
|
|
"webrtc-mdns",
|
|
|
|
"webrtc-util",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "webrtc-mdns"
|
|
|
|
version = "0.5.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f08dfd7a6e3987e255c4dbe710dde5d94d0f0574f8a21afa95d171376c143106"
|
|
|
|
dependencies = [
|
|
|
|
"log",
|
2023-06-22 10:25:30 +00:00
|
|
|
"socket2 0.4.9",
|
2023-01-16 15:42:31 +00:00
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
"webrtc-util",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "webrtc-media"
|
2023-05-01 07:17:37 +00:00
|
|
|
version = "0.5.1"
|
2023-01-16 15:42:31 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-05-01 07:17:37 +00:00
|
|
|
checksum = "f72e1650a8ae006017d1a5280efb49e2610c19ccc3c0905b03b648aee9554991"
|
2023-01-16 15:42:31 +00:00
|
|
|
dependencies = [
|
|
|
|
"byteorder",
|
|
|
|
"bytes",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"rtp",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "webrtc-sctp"
|
|
|
|
version = "0.7.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0d47adcd9427eb3ede33d5a7f3424038f63c965491beafcc20bc650a2f6679c0"
|
|
|
|
dependencies = [
|
|
|
|
"arc-swap",
|
|
|
|
"async-trait",
|
|
|
|
"bytes",
|
|
|
|
"crc",
|
|
|
|
"log",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
"webrtc-util",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "webrtc-srtp"
|
|
|
|
version = "0.9.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6183edc4c1c6c0175f8812eefdce84dfa0aea9c3ece71c2bf6ddd3c964de3da5"
|
|
|
|
dependencies = [
|
|
|
|
"aead 0.4.3",
|
|
|
|
"aes 0.7.5",
|
|
|
|
"aes-gcm 0.9.4",
|
|
|
|
"async-trait",
|
|
|
|
"byteorder",
|
|
|
|
"bytes",
|
|
|
|
"ctr 0.8.0",
|
|
|
|
"hmac 0.11.0",
|
|
|
|
"log",
|
|
|
|
"rtcp",
|
|
|
|
"rtp",
|
|
|
|
"sha-1",
|
|
|
|
"subtle",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
"webrtc-util",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "webrtc-util"
|
|
|
|
version = "0.7.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-16 15:42:31 +00:00
|
|
|
checksum = "93f1db1727772c05cf7a2cfece52c3aca8045ca1e176cd517d323489aa3c6d87"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-01-16 15:42:31 +00:00
|
|
|
"async-trait",
|
2023-06-28 18:57:58 +00:00
|
|
|
"bitflags 1.3.2",
|
2023-01-16 15:42:31 +00:00
|
|
|
"bytes",
|
2022-07-16 21:49:35 +00:00
|
|
|
"cc",
|
2023-01-16 15:42:31 +00:00
|
|
|
"ipnet",
|
|
|
|
"lazy_static",
|
|
|
|
"libc",
|
|
|
|
"log",
|
2023-03-26 12:43:01 +00:00
|
|
|
"nix",
|
2023-01-16 15:42:31 +00:00
|
|
|
"rand 0.8.5",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
"winapi",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "which"
|
2023-01-28 06:47:13 +00:00
|
|
|
version = "4.4.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-01-28 06:47:13 +00:00
|
|
|
checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"either",
|
|
|
|
"libc",
|
2022-09-18 19:30:38 +00:00
|
|
|
"once_cell",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2023-03-06 12:39:43 +00:00
|
|
|
[[package]]
|
|
|
|
name = "wide"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.7.10"
|
2023-03-06 12:39:43 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "40018623e2dba2602a9790faba8d33f2ebdebf4b86561b83928db735f8784728"
|
2023-03-06 12:39:43 +00:00
|
|
|
dependencies = [
|
|
|
|
"bytemuck",
|
|
|
|
"safe_arch",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "widestring"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "1.0.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8"
|
2022-07-16 21:49:35 +00:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "winapi"
|
|
|
|
version = "0.3.9"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
|
|
|
dependencies = [
|
|
|
|
"winapi-i686-pc-windows-gnu",
|
|
|
|
"winapi-x86_64-pc-windows-gnu",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "winapi-i686-pc-windows-gnu"
|
|
|
|
version = "0.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "winapi-util"
|
|
|
|
version = "0.1.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
|
|
|
|
dependencies = [
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "winapi-x86_64-pc-windows-gnu"
|
|
|
|
version = "0.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "windows"
|
|
|
|
version = "0.34.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "45296b64204227616fdbf2614cefa4c236b98ee64dfaaaa435207ed99fe7829f"
|
|
|
|
dependencies = [
|
|
|
|
"windows_aarch64_msvc 0.34.0",
|
|
|
|
"windows_i686_gnu 0.34.0",
|
|
|
|
"windows_i686_msvc 0.34.0",
|
|
|
|
"windows_x86_64_gnu 0.34.0",
|
|
|
|
"windows_x86_64_msvc 0.34.0",
|
|
|
|
]
|
|
|
|
|
2023-03-25 04:45:33 +00:00
|
|
|
[[package]]
|
|
|
|
name = "windows"
|
2023-04-08 08:44:28 +00:00
|
|
|
version = "0.48.0"
|
2023-03-25 04:45:33 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-08 08:44:28 +00:00
|
|
|
checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
|
2023-03-25 04:45:33 +00:00
|
|
|
dependencies = [
|
2023-06-28 19:04:48 +00:00
|
|
|
"windows-targets 0.48.1",
|
2023-03-25 04:45:33 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "windows-sys"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.42.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"windows_aarch64_gnullvm 0.42.2",
|
2023-03-16 23:37:32 +00:00
|
|
|
"windows_aarch64_msvc 0.42.2",
|
|
|
|
"windows_i686_gnu 0.42.2",
|
|
|
|
"windows_i686_msvc 0.42.2",
|
|
|
|
"windows_x86_64_gnu 0.42.2",
|
2023-04-08 08:44:28 +00:00
|
|
|
"windows_x86_64_gnullvm 0.42.2",
|
2023-03-16 23:37:32 +00:00
|
|
|
"windows_x86_64_msvc 0.42.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
2022-10-20 05:05:36 +00:00
|
|
|
[[package]]
|
|
|
|
name = "windows-sys"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.45.0"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
|
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"windows-targets 0.42.2",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "windows-sys"
|
|
|
|
version = "0.48.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
|
|
|
|
dependencies = [
|
2023-06-28 19:04:48 +00:00
|
|
|
"windows-targets 0.48.1",
|
2023-03-06 12:39:43 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "windows-targets"
|
2023-03-16 23:37:32 +00:00
|
|
|
version = "0.42.2"
|
2023-03-06 12:39:43 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-16 23:37:32 +00:00
|
|
|
checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
|
2022-10-20 05:05:36 +00:00
|
|
|
dependencies = [
|
2023-04-08 08:44:28 +00:00
|
|
|
"windows_aarch64_gnullvm 0.42.2",
|
2023-03-16 23:37:32 +00:00
|
|
|
"windows_aarch64_msvc 0.42.2",
|
|
|
|
"windows_i686_gnu 0.42.2",
|
|
|
|
"windows_i686_msvc 0.42.2",
|
|
|
|
"windows_x86_64_gnu 0.42.2",
|
2023-04-08 08:44:28 +00:00
|
|
|
"windows_x86_64_gnullvm 0.42.2",
|
2023-03-16 23:37:32 +00:00
|
|
|
"windows_x86_64_msvc 0.42.2",
|
2022-10-20 05:05:36 +00:00
|
|
|
]
|
|
|
|
|
2023-04-08 08:44:28 +00:00
|
|
|
[[package]]
|
|
|
|
name = "windows-targets"
|
2023-06-28 19:04:48 +00:00
|
|
|
version = "0.48.1"
|
2023-04-08 08:44:28 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-28 19:04:48 +00:00
|
|
|
checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f"
|
2023-04-08 08:44:28 +00:00
|
|
|
dependencies = [
|
|
|
|
"windows_aarch64_gnullvm 0.48.0",
|
|
|
|
"windows_aarch64_msvc 0.48.0",
|
|
|
|
"windows_i686_gnu 0.48.0",
|
|
|
|
"windows_i686_msvc 0.48.0",
|
|
|
|
"windows_x86_64_gnu 0.48.0",
|
|
|
|
"windows_x86_64_gnullvm 0.48.0",
|
|
|
|
"windows_x86_64_msvc 0.48.0",
|
|
|
|
]
|
|
|
|
|
2022-10-20 05:05:36 +00:00
|
|
|
[[package]]
|
|
|
|
name = "windows_aarch64_gnullvm"
|
2023-03-16 23:37:32 +00:00
|
|
|
version = "0.42.2"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-16 23:37:32 +00:00
|
|
|
checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
|
2022-10-20 05:05:36 +00:00
|
|
|
|
2023-04-08 08:44:28 +00:00
|
|
|
[[package]]
|
|
|
|
name = "windows_aarch64_gnullvm"
|
|
|
|
version = "0.48.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "windows_aarch64_msvc"
|
|
|
|
version = "0.34.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "windows_aarch64_msvc"
|
2023-03-16 23:37:32 +00:00
|
|
|
version = "0.42.2"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-16 23:37:32 +00:00
|
|
|
checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
|
2022-10-20 05:05:36 +00:00
|
|
|
|
2023-04-08 08:44:28 +00:00
|
|
|
[[package]]
|
|
|
|
name = "windows_aarch64_msvc"
|
|
|
|
version = "0.48.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "windows_i686_gnu"
|
|
|
|
version = "0.34.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "windows_i686_gnu"
|
2023-03-16 23:37:32 +00:00
|
|
|
version = "0.42.2"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-16 23:37:32 +00:00
|
|
|
checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
|
2022-10-20 05:05:36 +00:00
|
|
|
|
2023-04-08 08:44:28 +00:00
|
|
|
[[package]]
|
|
|
|
name = "windows_i686_gnu"
|
|
|
|
version = "0.48.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "windows_i686_msvc"
|
|
|
|
version = "0.34.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "windows_i686_msvc"
|
2023-03-16 23:37:32 +00:00
|
|
|
version = "0.42.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-16 23:37:32 +00:00
|
|
|
checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
|
2022-10-20 05:05:36 +00:00
|
|
|
|
2023-04-08 08:44:28 +00:00
|
|
|
[[package]]
|
|
|
|
name = "windows_i686_msvc"
|
|
|
|
version = "0.48.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "windows_x86_64_gnu"
|
|
|
|
version = "0.34.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "windows_x86_64_gnu"
|
2023-03-16 23:37:32 +00:00
|
|
|
version = "0.42.2"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-16 23:37:32 +00:00
|
|
|
checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
|
2022-10-20 05:05:36 +00:00
|
|
|
|
2023-04-08 08:44:28 +00:00
|
|
|
[[package]]
|
|
|
|
name = "windows_x86_64_gnu"
|
|
|
|
version = "0.48.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
|
|
|
|
|
2022-10-20 05:05:36 +00:00
|
|
|
[[package]]
|
|
|
|
name = "windows_x86_64_gnullvm"
|
2023-03-16 23:37:32 +00:00
|
|
|
version = "0.42.2"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-16 23:37:32 +00:00
|
|
|
checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
|
2022-10-20 05:05:36 +00:00
|
|
|
|
2023-04-08 08:44:28 +00:00
|
|
|
[[package]]
|
|
|
|
name = "windows_x86_64_gnullvm"
|
|
|
|
version = "0.48.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "windows_x86_64_msvc"
|
|
|
|
version = "0.34.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "windows_x86_64_msvc"
|
2023-03-16 23:37:32 +00:00
|
|
|
version = "0.42.2"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-16 23:37:32 +00:00
|
|
|
checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
|
2022-10-20 05:05:36 +00:00
|
|
|
|
2023-04-08 08:44:28 +00:00
|
|
|
[[package]]
|
|
|
|
name = "windows_x86_64_msvc"
|
|
|
|
version = "0.48.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
|
|
|
|
|
2023-03-25 04:45:33 +00:00
|
|
|
[[package]]
|
|
|
|
name = "winnow"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.4.7"
|
2023-03-25 04:45:33 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "ca0ace3845f0d96209f0375e6d367e3eb87eb65d27d445bdc9f1843a26f39448"
|
2023-03-25 04:45:33 +00:00
|
|
|
dependencies = [
|
|
|
|
"memchr",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "winreg"
|
|
|
|
version = "0.10.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"
|
|
|
|
dependencies = [
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
2023-06-22 10:25:30 +00:00
|
|
|
[[package]]
|
|
|
|
name = "winreg"
|
|
|
|
version = "0.50.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"windows-sys 0.48.0",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "ws_stream_wasm"
|
2023-03-06 12:39:43 +00:00
|
|
|
version = "0.7.4"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-06 12:39:43 +00:00
|
|
|
checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"async_io_stream",
|
|
|
|
"futures",
|
|
|
|
"js-sys",
|
2023-03-06 12:39:43 +00:00
|
|
|
"log",
|
2022-07-16 21:49:35 +00:00
|
|
|
"pharos",
|
2023-01-05 03:52:41 +00:00
|
|
|
"rustc_version",
|
2023-03-25 04:45:33 +00:00
|
|
|
"send_wrapper 0.6.0",
|
2022-07-16 21:49:35 +00:00
|
|
|
"thiserror",
|
|
|
|
"wasm-bindgen",
|
|
|
|
"wasm-bindgen-futures",
|
|
|
|
"web-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wyz"
|
2022-11-21 07:23:38 +00:00
|
|
|
version = "0.5.1"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-11-21 07:23:38 +00:00
|
|
|
checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"tap",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "x25519-dalek"
|
|
|
|
version = "1.1.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5a0c105152107e3b96f6a00a65e86ce82d9b125230e1c4302940eca58ff71f4f"
|
|
|
|
dependencies = [
|
|
|
|
"curve25519-dalek 3.2.0",
|
|
|
|
"rand_core 0.5.1",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "x25519-dalek"
|
2023-04-01 09:44:18 +00:00
|
|
|
version = "2.0.0-pre.1"
|
2023-01-16 15:42:31 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-01 09:44:18 +00:00
|
|
|
checksum = "e5da623d8af10a62342bcbbb230e33e58a63255a58012f8653c578e54bab48df"
|
2023-01-16 15:42:31 +00:00
|
|
|
dependencies = [
|
2023-04-01 09:44:18 +00:00
|
|
|
"curve25519-dalek 3.2.0",
|
2023-01-16 15:42:31 +00:00
|
|
|
"rand_core 0.6.4",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "x509-parser"
|
|
|
|
version = "0.13.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9fb9bace5b5589ffead1afb76e43e34cff39cd0f3ce7e170ae0c29e53b88eb1c"
|
|
|
|
dependencies = [
|
|
|
|
"asn1-rs 0.3.1",
|
|
|
|
"base64 0.13.1",
|
|
|
|
"data-encoding",
|
|
|
|
"der-parser 7.0.0",
|
|
|
|
"lazy_static",
|
|
|
|
"nom",
|
|
|
|
"oid-registry 0.4.0",
|
|
|
|
"ring",
|
|
|
|
"rusticata-macros",
|
|
|
|
"thiserror",
|
2023-06-22 10:25:30 +00:00
|
|
|
"time 0.3.22",
|
2023-01-16 15:42:31 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "x509-parser"
|
|
|
|
version = "0.14.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8"
|
|
|
|
dependencies = [
|
2023-03-11 09:49:05 +00:00
|
|
|
"asn1-rs 0.5.2",
|
2023-01-16 15:42:31 +00:00
|
|
|
"base64 0.13.1",
|
|
|
|
"data-encoding",
|
2023-03-11 09:49:05 +00:00
|
|
|
"der-parser 8.2.0",
|
2023-01-16 15:42:31 +00:00
|
|
|
"lazy_static",
|
|
|
|
"nom",
|
|
|
|
"oid-registry 0.6.1",
|
|
|
|
"rusticata-macros",
|
|
|
|
"thiserror",
|
2023-06-22 10:25:30 +00:00
|
|
|
"time 0.3.22",
|
2023-01-16 15:42:31 +00:00
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "yamux"
|
2022-08-16 07:44:32 +00:00
|
|
|
version = "0.10.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-08-16 07:44:32 +00:00
|
|
|
checksum = "e5d9ba232399af1783a58d8eb26f6b5006fbefe2dc9ef36bd283324792d03ea5"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"futures",
|
|
|
|
"log",
|
|
|
|
"nohash-hasher",
|
|
|
|
"parking_lot 0.12.1",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"static_assertions",
|
|
|
|
]
|
|
|
|
|
2022-12-07 23:05:06 +00:00
|
|
|
[[package]]
|
|
|
|
name = "yansi"
|
|
|
|
version = "0.5.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec"
|
|
|
|
|
2023-01-20 16:00:18 +00:00
|
|
|
[[package]]
|
|
|
|
name = "yap"
|
2023-04-15 09:23:57 +00:00
|
|
|
version = "0.10.0"
|
2023-01-20 16:00:18 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-15 09:23:57 +00:00
|
|
|
checksum = "e2a7eb6d82a11e4d0b8e6bda8347169aff4ccd8235d039bba7c47482d977dcf7"
|
2023-01-20 16:00:18 +00:00
|
|
|
|
2023-01-16 15:42:31 +00:00
|
|
|
[[package]]
|
|
|
|
name = "yasna"
|
2023-04-08 08:44:28 +00:00
|
|
|
version = "0.5.2"
|
2023-01-16 15:42:31 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-08 08:44:28 +00:00
|
|
|
checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd"
|
2023-01-16 15:42:31 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"time 0.3.22",
|
2023-01-16 15:42:31 +00:00
|
|
|
]
|
|
|
|
|
2022-11-11 05:34:40 +00:00
|
|
|
[[package]]
|
|
|
|
name = "zalloc"
|
|
|
|
version = "0.1.0"
|
|
|
|
dependencies = [
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "zeroize"
|
2023-03-28 08:38:01 +00:00
|
|
|
version = "1.6.0"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-28 08:38:01 +00:00
|
|
|
checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"zeroize_derive",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "zeroize_derive"
|
2023-03-31 06:34:52 +00:00
|
|
|
version = "1.4.2"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-03-31 06:34:52 +00:00
|
|
|
checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-06-28 18:57:58 +00:00
|
|
|
"syn 2.0.22",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "zip"
|
2023-06-22 10:25:30 +00:00
|
|
|
version = "0.6.6"
|
2022-10-20 05:05:36 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-22 10:25:30 +00:00
|
|
|
checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
2023-06-22 10:25:30 +00:00
|
|
|
"aes 0.8.3",
|
2022-07-16 21:49:35 +00:00
|
|
|
"byteorder",
|
|
|
|
"bzip2",
|
2022-11-21 07:23:38 +00:00
|
|
|
"constant_time_eq 0.1.5",
|
2022-07-16 21:49:35 +00:00
|
|
|
"crc32fast",
|
|
|
|
"crossbeam-utils",
|
|
|
|
"flate2",
|
|
|
|
"hmac 0.12.1",
|
|
|
|
"pbkdf2 0.11.0",
|
|
|
|
"sha1",
|
2023-06-22 10:25:30 +00:00
|
|
|
"time 0.3.22",
|
2023-04-09 06:31:10 +00:00
|
|
|
"zstd 0.11.2+zstd.1.5.2",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "zstd"
|
|
|
|
version = "0.11.2+zstd.1.5.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4"
|
|
|
|
dependencies = [
|
2023-04-09 06:31:10 +00:00
|
|
|
"zstd-safe 5.0.2+zstd.1.5.2",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "zstd"
|
|
|
|
version = "0.12.3+zstd.1.5.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "76eea132fb024e0e13fd9c2f5d5d595d8a967aa72382ac2f9d39fcc95afd0806"
|
|
|
|
dependencies = [
|
|
|
|
"zstd-safe 6.0.5+zstd.1.5.4",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "zstd-safe"
|
|
|
|
version = "5.0.2+zstd.1.5.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"zstd-sys",
|
|
|
|
]
|
|
|
|
|
2023-04-09 06:31:10 +00:00
|
|
|
[[package]]
|
|
|
|
name = "zstd-safe"
|
|
|
|
version = "6.0.5+zstd.1.5.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d56d9e60b4b1758206c238a10165fbcae3ca37b01744e394c463463f6529d23b"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"zstd-sys",
|
|
|
|
]
|
|
|
|
|
2022-07-16 21:49:35 +00:00
|
|
|
[[package]]
|
|
|
|
name = "zstd-sys"
|
2023-04-08 08:44:28 +00:00
|
|
|
version = "2.0.8+zstd.1.5.5"
|
2022-07-16 21:49:35 +00:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-08 08:44:28 +00:00
|
|
|
checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c"
|
2022-07-16 21:49:35 +00:00
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
"libc",
|
2023-01-16 15:42:31 +00:00
|
|
|
"pkg-config",
|
2022-07-16 21:49:35 +00:00
|
|
|
]
|