feat: Consensus crate and verification functions. (#152)

* wip executor

* wip

* Cleanup added some checks and structure to executor

* adding additional block/header checks

* add basefee calculation and check

* some cleanup

* Sanity check test

* Test for sanity check

* move verification to consensus crate

* cleanup

* Better Error handling
This commit is contained in:
rakita
2022-11-02 12:59:51 +01:00
committed by GitHub
parent 1ea98d40cf
commit ac2f3fcd8a
26 changed files with 755 additions and 59 deletions

51
Cargo.lock generated
View File

@@ -1568,6 +1568,12 @@ version = "1.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
[[package]]
name = "hash-db"
version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a"
[[package]]
name = "hash32"
version = "0.2.1"
@@ -2619,6 +2625,15 @@ dependencies = [
"spki",
]
[[package]]
name = "plain_hasher"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e19e6491bdde87c2c43d70f4c194bc8a758f2eb732df00f61e43f7362e3b4cc"
dependencies = [
"crunchy",
]
[[package]]
name = "plotters"
version = "0.3.4"
@@ -2989,6 +3004,25 @@ dependencies = [
"codecs-derive",
]
[[package]]
name = "reth-consensus"
version = "0.1.0"
dependencies = [
"async-trait",
"auto_impl",
"eyre",
"hash-db",
"plain_hasher",
"reth-interfaces",
"reth-primitives",
"reth-rlp",
"rlp",
"sha3",
"thiserror",
"tokio",
"triehash",
]
[[package]]
name = "reth-crate-template"
version = "0.1.0"
@@ -3098,11 +3132,18 @@ name = "reth-executor"
version = "0.1.0"
dependencies = [
"async-trait",
"auto_impl",
"eyre",
"hash-db",
"plain_hasher",
"reth-interfaces",
"reth-primitives",
"reth-rlp",
"revm",
"rlp",
"sha3",
"thiserror",
"triehash",
]
[[package]]
@@ -4393,6 +4434,16 @@ dependencies = [
"syn",
]
[[package]]
name = "triehash"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1631b201eb031b563d2e85ca18ec8092508e262a3196ce9bd10a67ec87b9f5c"
dependencies = [
"hash-db",
"rlp",
]
[[package]]
name = "trust-dns-client"
version = "0.20.4"