I'm getting the following build errors off of $ cargo build --release. I had to comment out a part of my ~/.gitconfig run the following updates on Ubuntu 18.04.
sudo apt install pkg-config
sudo apt install libssl-dev
Any idea what needs to happen?
warning: unused manifest key: net
warning: Patch rust_decimal v1.10.2 (https://github.com/paupino/rust-decimal/#d5f1126d)
was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run cargo update
to use the new
version. This may also occur with an optional dependency that is not enabled.
Downloaded anyhow v1.0.38
Downloaded byteorder v1.4.2
Downloaded futures-channel v0.3.12
Downloaded futures-core v0.3.12
Downloaded httparse v1.3.5
Downloaded http v0.2.3
Downloaded getrandom v0.2.2
Downloaded encoding_rs v0.8.28
Downloaded curl-sys v0.4.40+curl-7.75.0
Downloaded itoa v0.4.7
Downloaded log v0.4.14
Downloaded hyper v0.14.4
Downloaded pin-project v1.0.5
Downloaded parity-scale-codec v1.3.6
Downloaded futures-task v0.3.12
Downloaded futures-sink v0.3.12
Downloaded futures-macro v0.3.12
Downloaded futures-executor v0.3.12
Downloaded proc-macro-nested v0.1.7
Downloaded pin-project-lite v0.2.4
Downloaded quote v1.0.8
Downloaded rand_core v0.6.1
Downloaded regex-syntax v0.6.22
Downloaded serde_derive v1.0.123
Downloaded thread_local v1.1.3
Downloaded syn v1.0.60
Downloaded sha2 v0.9.3
Downloaded sha-1 v0.9.3
Downloaded serde_json v1.0.62
Downloaded unicode-normalization v0.1.17
Downloaded tinyvec_macros v0.1.0
Downloaded serde v1.0.123
Downloaded rand v0.8.3
Downloaded futures-util v0.3.12
Downloaded time v0.1.43
Downloaded tower-service v0.3.1
Downloaded pin-project-internal v1.0.5
Downloaded regex v1.4.3
Downloaded tinyvec v1.1.1
Downloaded tokio-util v0.6.3
Downloaded tracing v0.1.23
Downloaded idna v0.2.1
Downloaded libc v0.2.86
Downloaded tokio v1.2.0
Downloaded ring v0.16.20
Downloaded 45 crates (12.9 MB) in 15.82s (largest was ring
at 5.1 MB)
Compiling libc v0.2.86
Compiling syn v1.0.60
Compiling serde_derive v1.0.123
Compiling serde v1.0.123
Compiling getrandom v0.2.2
Compiling itoa v0.4.7
Compiling log v0.4.14
Compiling pin-project-lite v0.2.4
Compiling byteorder v1.4.2
Compiling proc-macro-nested v0.1.7
Compiling serde_json v1.0.62
Compiling futures-core v0.3.12
Compiling futures-sink v0.3.12
Compiling tinyvec_macros v0.1.0
Compiling anyhow v1.0.38
Compiling httparse v1.3.5
Compiling encoding_rs v0.8.28
Compiling tower-service v0.3.1
Compiling regex-syntax v0.6.22
Compiling tokio v1.2.0
Compiling ring v0.16.20
Compiling futures-task v0.3.12
Compiling curl-sys v0.4.40+curl-7.75.0
Compiling thread_local v1.1.3
Compiling futures-channel v0.3.12
Compiling tinyvec v1.1.1
Compiling tracing v0.1.23
Compiling quote v1.0.8
Compiling uint v0.9.0
Compiling want v0.3.0
Compiling sha-1 v0.9.3
Compiling sha2 v0.9.3
Compiling unicode-normalization v0.1.17
Compiling getrandom v0.1.16
Compiling mio v0.7.7
Compiling openssl-sys v0.9.60
Compiling socket2 v0.3.19
Compiling libz-sys v1.1.2
Compiling rand v0.4.6
Compiling time v0.1.43
Compiling rand_core v0.6.1
Compiling rand_core v0.5.1
Compiling regex v1.4.3
Compiling idna v0.2.1
Compiling openssl v0.10.32
Compiling proc-macro-error-attr v1.0.4
Compiling rand_chacha v0.3.0
Compiling ff v0.8.0
Compiling rand_chacha v0.2.2
Compiling signature v1.2.2
Compiling rand v0.3.23
Compiling url v2.2.0
Compiling rand v0.8.3
Compiling Inflector v0.11.4
Compiling group v0.8.0
Compiling rand v0.7.3
Compiling rust-crypto v0.2.36
Compiling native-tls v0.2.7
Compiling fixed-hash v0.7.0
Compiling proc-macro-error v1.0.4
Compiling elliptic-curve v0.8.4
Compiling ecdsa v0.10.2
Compiling k256 v0.7.2
Compiling webpki v0.21.4
Compiling sct v0.6.0
Compiling rustls v0.19.0
Compiling webpki-roots v0.21.0
Compiling curl v0.4.34
Compiling futures-macro v0.3.12
Compiling thiserror-impl v1.0.23
Compiling pin-project-internal v0.4.27
Compiling pin-project-internal v1.0.5
Compiling async-trait v0.1.42
Compiling auto_impl v0.4.1
Compiling futures-util v0.3.12
Compiling thiserror v1.0.23
Compiling futures-executor v0.3.12
Compiling pin-project v0.4.27
Compiling tracing-futures v0.2.4
Compiling pin-project v1.0.5
Compiling bytes v1.0.1
Compiling parity-scale-codec v1.3.6
Compiling impl-serde v0.3.1
Compiling serde_urlencoded v0.7.0
Compiling uuid v0.8.2
Compiling rlp v0.5.0
Compiling http v0.2.3
Compiling input_buffer v0.4.0
Compiling impl-rlp v0.3.0
Compiling ethbloom v0.10.0
Compiling eth-keystore v0.1.0
Compiling serde-aux v2.1.1
Compiling http-body v0.4.0
Compiling tungstenite v0.12.0
Compiling tokio-util v0.6.3
Compiling tokio-rustls v0.22.0
Compiling tokio-native-tls v0.3.0
Compiling tokio-tungstenite v0.13.0
Compiling h2 v0.3.0
Compiling impl-codec v0.4.2
Compiling primitive-types v0.8.0
Compiling ethereum-types v0.10.0
Compiling ethabi-next v13.0.0
Compiling hyper v0.14.4
Compiling ethers-core v0.2.0
Compiling ethers-contract-abigen v0.2.0
Compiling ethers-signers v0.2.0
Compiling hyper-rustls v0.22.1
Compiling reqwest v0.11.0
Compiling ethers-providers v0.2.0
Compiling ethers-middleware v0.2.0
Compiling ethers-contract-derive v0.2.0
Compiling ethers-contract v0.2.0
Compiling ethers v0.2.0
Compiling mev-inspect v0.1.0 (/home/tesa/flashbots/mev-inspect-rs)
error[E0706]: functions in traits cannot be declared async
--> src/cached_provider.rs:57:5
|
57 | async fn trace_block(&self, block: BlockNumber) -> Result<Vec, Self::Error> {
| ^----
| |
| async
because of this
| |
58 | | // check if it exists, else get from the provider
59 | | let mut traces = None;
60 | | if let BlockNumber::Number(block_number) = block {
... |
84 | | }
85 | | }
| |^
|
= note: async
trait functions are not currently supported
= note: consider using the async-trait
crate: https://crates.io/crates/async-trait
error[E0432]: unresolved import thiserror
--> src/types/evaluation.rs:13:5
|
13 | use thiserror::Error;
| ^^^^^^^^^ use of undeclared type or module thiserror
error[E0433]: failed to resolve: use of undeclared type or module serde
--> src/cached_provider.rs:7:5
|
7 | use serde::{de::DeserializeOwned, Serialize};
| ^^^^^ use of undeclared type or module serde
error[E0432]: unresolved import async_trait
--> src/cached_provider.rs:2:5
|
2 | use async_trait::async_trait;
| ^^^^^^^^^^^ use of undeclared type or module async_trait
error[E0432]: unresolved import serde
--> src/cached_provider.rs:7:5
|
7 | use serde::{de::DeserializeOwned, Serialize};
| ^^^^^ use of undeclared type or module serde
error[E0433]: failed to resolve: use of undeclared type or module rust_decimal
--> src/mevdb.rs:3:5
|
3 | use rust_decimal::prelude::*;
| ^^^^^^^^^^^^ use of undeclared type or module rust_decimal
error[E0432]: unresolved import thiserror
--> src/cached_provider.rs:16:5
|
16 | use thiserror::Error;
| ^^^^^^^^^ use of undeclared type or module thiserror
error[E0433]: failed to resolve: use of undeclared type or module tokio_postgres
--> src/mevdb.rs:5:5
|
5 | use tokio_postgres::{config::Config, Client, NoTls};
| ^^^^^^^^^^^^^^ use of undeclared type or module tokio_postgres
error[E0432]: unresolved imports thiserror
, tokio_postgres::config::Config
--> src/mevdb.rs:4:5
|
4 | use thiserror::Error;
| ^^^^^^^^^ use of undeclared type or module thiserror
5 | use tokio_postgres::{config::Config, Client, NoTls};
| ^^^^^^^^^^^^^^
error[E0432]: unresolved import tokio_postgres
--> src/mevdb.rs:5:5
|
5 | use tokio_postgres::{config::Config, Client, NoTls};
| ^^^^^^^^^^^^^^ use of undeclared type or module tokio_postgres
error: cannot determine resolution for the derive macro Error
--> src/types/evaluation.rs:133:17
|
133 | #[derive(Debug, Error)]
| ^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot find attribute error
in this scope
--> src/types/evaluation.rs:138:7
|
138 | #[error(transparent)]
| ^^^^^
error: cannot find attribute error
in this scope
--> src/types/evaluation.rs:140:7
|
140 | #[error("Transaction was not found {0}")]
| ^^^^^
error: cannot find attribute error
in this scope
--> src/types/evaluation.rs:142:7
|
142 | #[error(transparent)]
| ^^^^^
error: cannot determine resolution for the attribute macro async_trait
--> src/cached_provider.rs:47:3
|
47 | #[async_trait]
| ^^^^^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot determine resolution for the derive macro Error
--> src/cached_provider.rs:88:10
|
88 | #[derive(Error, Debug)]
| ^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot find attribute error
in this scope
--> src/cached_provider.rs:91:7
|
91 | #[error("{0}")]
| ^^^^^
error: cannot find attribute error
in this scope
--> src/cached_provider.rs:93:7
|
93 | #[error(transparent)]
| ^^^^^
error: cannot find attribute from
in this scope
--> src/cached_provider.rs:94:15
|
94 | IoError(#[from] std::io::Error),
| ^^^^
error: cannot find attribute error
in this scope
--> src/cached_provider.rs:95:7
|
95 | #[error(transparent)]
| ^^^^^
error: cannot find attribute from
in this scope
--> src/cached_provider.rs:96:28
|
96 | DeserializationError(#[from] serde_json::Error),
| ^^^^
error: cannot determine resolution for the derive macro Error
--> src/mevdb.rs:152:10
|
152 | #[derive(Error, Debug)]
| ^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot find attribute error
in this scope
--> src/mevdb.rs:154:7
|
154 | #[error(transparent)]
| ^^^^^
error: cannot find attribute from
in this scope
--> src/mevdb.rs:155:15
|
155 | Decimal(#[from] rust_decimal::Error),
| ^^^^
error: cannot find attribute error
in this scope
--> src/mevdb.rs:157:7
|
157 | #[error("could not convert u64 to decimal")]
| ^^^^^
error: cannot find attribute error
in this scope
--> src/mevdb.rs:160:7
|
160 | #[error(transparent)]
| ^^^^^
error: cannot find attribute from
in this scope
--> src/mevdb.rs:161:21
|
161 | TokioPostGres(#[from] tokio_postgres::Error),
| ^^^^
error[E0433]: failed to resolve: use of undeclared type or module futures
--> src/inspectors/compound.rs:135:19
|
135 | let res = futures::future::join_all(futs).await;
| ^^^^^^^ use of undeclared type or module futures
error[E0433]: failed to resolve: use of undeclared type or module futures
--> src/types/evaluation.rs:73:35
|
73 | let res = futures::future::join(
| ^^^^^^^ use of undeclared type or module futures
error[E0433]: failed to resolve: use of undeclared type or module hex
--> src/types/classification.rs:129:34
|
129 | .field("input", &hex::encode(&call.input))
| ^^^ use of undeclared type or module hex
error[E0433]: failed to resolve: use of undeclared type or module tokio
--> src/mevdb.rs:19:9
|
19 | tokio::spawn(async move {
| ^^^^^ use of undeclared type or module tokio
error[E0433]: failed to resolve: use of undeclared type or module rust_decimal
--> src/mevdb.rs:155:21
|
155 | Decimal(#[from] rust_decimal::Error),
| ^^^^^^^^^^^^ use of undeclared type or module rust_decimal
error[E0433]: failed to resolve: use of undeclared type or module tokio_postgres
--> src/mevdb.rs:161:27
|
161 | TokioPostGres(#[from] tokio_postgres::Error),
| ^^^^^^^^^^^^^^ use of undeclared type or module tokio_postgres
error[E0433]: failed to resolve: use of undeclared type or module rust_decimal
--> src/mevdb.rs:171:47
|
171 | fn u256_decimal(src: U256) -> Result<Decimal, rust_decimal::Error> {
| ^^^^^^^^^^^^ use of undeclared type or module rust_decimal
error[E0405]: cannot find trait DeserializeOwned
in this scope
--> src/cached_provider.rs:27:16
|
27 | fn read<T: DeserializeOwned, K: AsRef>(
| ^^^^^^^^^^^^^^^^ not found in this scope
error[E0412]: cannot find type Config
in this scope
--> src/mevdb.rs:16:31
|
16 | pub async fn connect(cfg: Config, table_name: &'a str) -> Result<MevDB<'a>, DbError> {
| ^^^^^^ not found in this scope
error[E0433]: failed to resolve: use of undeclared type or module Decimal
--> src/mevdb.rs:87:22
|
87 | &Decimal::from(evaluation.inspection.block_number),
| ^^^^^^^ not found in this scope
|
help: consider importing this struct
|
1 | use core::num::dec2flt::parse::Decimal;
|
error[E0433]: failed to resolve: use of undeclared type or module Decimal
--> src/mevdb.rs:134:20
|
134 | &[&Decimal::from_u64(block).ok_or(DbError::InvalidDecimal)?],
| ^^^^^^^ not found in this scope
|
help: consider importing this struct
|
1 | use core::num::dec2flt::parse::Decimal;
|
error[E0412]: cannot find type Decimal
in this scope
--> src/mevdb.rs:171:38
|
171 | fn u256_decimal(src: U256) -> Result<Decimal, rust_decimal::Error> {
| ^^^^^^^ not found in this scope
|
help: consider importing this struct
|
1 | use core::num::dec2flt::parse::Decimal;
|
error[E0433]: failed to resolve: use of undeclared type or module Decimal
--> src/mevdb.rs:172:5
|
172 | Decimal::from_str(&src.to_string())
| ^^^^^^^ not found in this scope
|
help: consider importing this struct
|
1 | use core::num::dec2flt::parse::Decimal;
|
error: aborting due to 40 previous errors
Some errors have detailed explanations: E0405, E0412, E0432, E0433, E0706.
For more information about an error, try rustc --explain E0405
.
error: could not compile mev-inspect
.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed