2023-04-11 14:18:31 +00:00
|
|
|
[package]
|
|
|
|
name = "tributary-chain"
|
|
|
|
version = "0.1.0"
|
|
|
|
description = "A micro-blockchain to provide consensus and ordering to P2P communication"
|
|
|
|
license = "AGPL-3.0-only"
|
|
|
|
repository = "https://github.com/serai-dex/serai/tree/develop/coordinator/tributary"
|
|
|
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
|
|
|
edition = "2021"
|
|
|
|
|
|
|
|
[dependencies]
|
2023-10-31 11:41:23 +00:00
|
|
|
async-trait = { version = "0.1", default-features = false }
|
|
|
|
thiserror = { version = "1", default-features = false }
|
2023-04-11 17:42:18 +00:00
|
|
|
|
2023-10-31 11:41:23 +00:00
|
|
|
subtle = { version = "^2", default-features = false, features = ["std"] }
|
|
|
|
zeroize = { version = "^1.5", default-features = false, features = ["std"] }
|
2023-04-13 22:43:03 +00:00
|
|
|
|
2023-10-31 11:41:23 +00:00
|
|
|
rand = { version = "0.8", default-features = false, features = ["std"] }
|
|
|
|
rand_chacha = { version = "0.3", default-features = false, features = ["std"] }
|
2023-04-11 23:04:53 +00:00
|
|
|
|
2023-10-31 11:41:23 +00:00
|
|
|
blake2 = { version = "0.10", default-features = false, features = ["std"] }
|
|
|
|
transcript = { package = "flexible-transcript", path = "../../crypto/transcript", default-features = false, features = ["std", "recommended"] }
|
2023-04-11 17:42:18 +00:00
|
|
|
|
2023-10-31 11:41:23 +00:00
|
|
|
ciphersuite = { package = "ciphersuite", path = "../../crypto/ciphersuite", default-features = false, features = ["std", "ristretto"] }
|
|
|
|
schnorr = { package = "schnorr-signatures", path = "../../crypto/schnorr", default-features = false, features = ["std"] }
|
2023-04-11 17:42:18 +00:00
|
|
|
|
2023-10-31 11:41:23 +00:00
|
|
|
hex = { version = "0.4", default-features = false, features = ["std"] }
|
|
|
|
log = { version = "0.4", default-features = false, features = ["std"] }
|
2023-04-12 22:04:28 +00:00
|
|
|
|
2023-04-14 18:11:19 +00:00
|
|
|
serai-db = { path = "../../common/db" }
|
|
|
|
|
2023-10-31 11:41:23 +00:00
|
|
|
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["std", "derive"] }
|
2023-12-11 00:32:43 +00:00
|
|
|
futures-util = { version = "0.3", default-features = false, features = ["std", "sink", "channel"] }
|
|
|
|
futures-channel = { version = "0.3", default-features = false, features = ["std", "sink"] }
|
2023-04-11 14:18:31 +00:00
|
|
|
tendermint = { package = "tendermint-machine", path = "./tendermint" }
|
2023-04-11 23:04:53 +00:00
|
|
|
|
2023-10-31 11:41:23 +00:00
|
|
|
tokio = { version = "1", default-features = false, features = ["sync", "time", "rt"] }
|
2023-04-12 22:04:28 +00:00
|
|
|
|
Slash malevolent validators (#294)
* add slash tx
* ignore unsigned tx replays
* verify that provided evidence is valid
* fix clippy + fmt
* move application tx handling to another module
* partially handle the tendermint txs
* fix pr comments
* support unsigned app txs
* add slash target to the votes
* enforce provided, unsigned, signed tx ordering within a block
* bug fixes
* add unit test for tendermint txs
* bug fixes
* update tests for tendermint txs
* add tx ordering test
* tidy up tx ordering test
* cargo +nightly fmt
* Misc fixes from rebasing
* Finish resolving clippy
* Remove sha3 from tendermint-machine
* Resolve a DoS in SlashEvidence's read
Also moves Evidence from Vec<Message> to (Message, Option<Message>). That
should meet all requirements while being a bit safer.
* Make lazy_static a dev-depend for tributary
* Various small tweaks
One use of sort was inefficient, sorting unsigned || signed when unsigned was
already properly sorted. Given how the unsigned TXs were given a nonce of 0, an
unstable sort may swap places with an unsigned TX and a signed TX with a nonce
of 0 (leading to a faulty block).
The extra protection added here sorts signed, then concats.
* Fix Tributary tests I broke, start review on tendermint/tx.rs
* Finish reviewing everything outside tests and empty_signature
* Remove empty_signature
empty_signature led to corrupted local state histories. Unfortunately, the API
is only sane with a signature.
We now use the actual signature, which risks creating a signature over a
malicious message if we have ever have an invariant producing malicious
messages. Prior, we only signed the message after the local machine confirmed
it was okay per the local view of consensus.
This is tolerated/preferred over a corrupt state history since production of
such messages is already an invariant. TODOs are added to make handling of this
theoretical invariant further robust.
* Remove async_sequential for tokio::test
There was no competition for resources forcing them to be run sequentially.
* Modify block order test to be statistically significant without multiple runs
* Clean tests
---------
Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2023-08-21 04:28:23 +00:00
|
|
|
[dev-dependencies]
|
|
|
|
tokio = { version = "1", features = ["macros"] }
|
|
|
|
|
2023-04-11 23:04:53 +00:00
|
|
|
[features]
|
2023-04-13 22:43:03 +00:00
|
|
|
tests = []
|