Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump crates to the latest versions #969

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
include:
- rust: 1.70.0
- rust: 1.77.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the readme the crate has a minimum supported rust version of 1.64 but I guess that ship has already sailed. 😅
Is there a reason this needed to be updated? BTW this exact version is already covered by stable 3 lines down.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This update is required by the AWS stable release, otherwise it won't compile.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I'm not a fan of bumping the rust version here. The version you are adding only requires 1.75 according to their readme (MSRV = stable - 2).
Also with the discussion on compatibility of sub-dependency version I think we should not specify the patch level version in our dependencies to give the dependency resolver more room to unify dependency versions.
Also since the MSRV definitely has to be increased (I agree that depending on a stable version of the aws crates makes sense) we should also update the readme of this repo since it mention MSRV as well.
And finally this needs to get published as a new version of the crate. Since we are increasing the MSRV I think to make it a new minor release instead of just doing a patch level release (i.e. 0.25.6 -> 0.26.0). This can be done by using /ci/bump.sh.

examples: false
continue-on-error: false
- rust: stable
Expand Down
4 changes: 2 additions & 2 deletions ethcontract-mock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Tools for mocking ethereum contracts.
[dependencies]
ethcontract = { version = "0.25.6", path = "../ethcontract", default-features = false, features = ["derive"] }
hex = "0.4"
mockall = "0.11"
mockall = "0.12.1"
rlp = "0.5"
predicates = "3.0"

[dev-dependencies]
tokio = { version = "1.6", features = ["macros", "rt"] }
tokio = { version = "1.37.0", features = ["macros", "rt"] }
ethcontract-derive = { version = "0.25.6", path = "../ethcontract-derive", default-features = false }
24 changes: 12 additions & 12 deletions ethcontract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,26 @@ ws-tls-tokio = ["web3/ws-tls-tokio"]
ws-tokio = ["web3/ws-tokio"]

[dependencies]
aws-config = { version = "0.55", optional = true }
aws-sdk-kms = { version = "0.28", optional = true }
aws-config = { version = "1.2.0", features = ["behavior-version-latest"], optional = true }
aws-sdk-kms = { version = "1.21.0", optional = true }
arrayvec = "0.7"
ethcontract-common = { version = "0.25.6", path = "../ethcontract-common" }
ethcontract-derive = { version = "0.25.6", path = "../ethcontract-derive", optional = true, default-features = false }
futures = "0.3"
futures-timer = "3.0"
hex = "0.4"
hex = "0.4.3"
jsonrpc-core = "18.0"
lazy_static = "1.4"
primitive-types = { version = "0.12", features = ["fp-conversion"] }
rlp = { version = "0.5", default-features = false, optional = true }
secp256k1 = { version = "0.27", features = ["recovery"] }
primitive-types = { version = "0.12.2", features = ["fp-conversion"] }
rlp = { version = "0.5.2", default-features = false, optional = true }
secp256k1 = { version = "0.29.0", features = ["recovery"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"
uint = "0.9"
serde_json = "1.0.116"
thiserror = "1.0.58"
uint = "0.9.5"
web3 = { version = "0.19", default-features = false, features = ["signing"] }
zeroize = "1.1"
zeroize = "1.7.0"

[dev-dependencies]
hex-literal = "0.4"
tokio = { version = "1.6", features = ["macros"] }
hex-literal = "0.4.1"
tokio = { version = "1.37.0", features = ["macros"] }
4 changes: 2 additions & 2 deletions ethcontract/src/int.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1290,11 +1290,11 @@ mod tests {
assert_eq!(I256::one().to_string(), "1");
assert_eq!(I256::minus_one().to_string(), "-1");
assert_eq!(
I256::max_value().to_string(),
I256::MAX.to_string(),
"57896044618658097711785492504343953926634992332820282019728792003956564819967"
);
assert_eq!(
I256::min_value().to_string(),
I256::MIN.to_string(),
"-57896044618658097711785492504343953926634992332820282019728792003956564819968"
);
}
Expand Down
3 changes: 2 additions & 1 deletion ethcontract/src/secret.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ impl Key for &'_ PrivateKey {
}

fn sign_message(&self, message: &[u8]) -> Result<Signature, SigningError> {
let message = Message::from_slice(message).map_err(|_| SigningError::InvalidMessage)?;
let message =
Message::from_digest_slice(message).map_err(|_| SigningError::InvalidMessage)?;
let (recovery_id, signature) = Secp256k1::signing_only()
.sign_ecdsa_recoverable(&message, self)
.serialize_compact();
Expand Down
4 changes: 2 additions & 2 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ autobins = false

[dev-dependencies]
ethcontract = { path = "../ethcontract", features = ["aws-kms"] }
futures = "0.3"
tokio = { version = "1.6", features = ["macros"] }
futures = "0.3.30"
tokio = { version = "1.37.0", features = ["macros"] }
2 changes: 1 addition & 1 deletion examples/examples/kms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::env;
#[tokio::main]
async fn main() {
// Run `aws configure export-credentials --profile cow-staging --format env` to get required env variable locally
let config = aws_config::load_from_env().await;
let config = aws_config::from_env().load().await;
let account = kms::Account::new(
(&config).into(),
&env::var("KMS_KEY_ID").expect("KMS_KEY_ID not set"),
Expand Down
Loading