From cf15026f99c6cff280dc47598887dd203de3b2e1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 19:00:59 +0200 Subject: [PATCH] chore(ethereum): Release 1.0.2 (#174) * chore(ethereum): Release 1.0.2 * fix: Use `Box::pin` for large futures in ethereum's client binary (#177) * chore: Add `large_futures` clippy lint to xclippy * fix: Use `Box::pin` to heap allocate large futures --------- Co-authored-by: wwared <541936+wwared@users.noreply.github.com> * chore: Update deny.toml for new defaults (#145) Co-authored-by: wwared <541936+wwared@users.noreply.github.com> * feat: update .lock * chore: Update deny.toml and fixture-generator lock Re-adds the BUSL exceptions to deny.toml for the aptos-lc crates --------- Co-authored-by: github-actions[bot] Co-authored-by: wwared Co-authored-by: wwared <541936+wwared@users.noreply.github.com> Co-authored-by: Thomas Chataigner --- aptos/.cargo/config.toml | 1 + deny.toml | 62 ++++--------------- ethereum/.cargo/config.toml | 1 + ethereum/Cargo.lock | 6 +- ethereum/core/Cargo.toml | 2 +- ethereum/ethereum-programs/Cargo.toml | 2 +- ethereum/light-client/Cargo.toml | 2 +- ethereum/light-client/src/bin/client.rs | 36 ++++++----- ethereum/light-client/src/client/mod.rs | 18 ++++-- ethereum/programs/committee-change/Cargo.lock | 4 +- ethereum/programs/committee-change/Cargo.toml | 2 +- ethereum/programs/inclusion/Cargo.lock | 4 +- ethereum/programs/inclusion/Cargo.toml | 2 +- fixture-generator/Cargo.lock | 6 +- 14 files changed, 59 insertions(+), 89 deletions(-) diff --git a/aptos/.cargo/config.toml b/aptos/.cargo/config.toml index 811cc26d..0acf6665 100644 --- a/aptos/.cargo/config.toml +++ b/aptos/.cargo/config.toml @@ -20,6 +20,7 @@ xclippy = [ "-Wclippy::implicit_clone", "-Wclippy::inefficient_to_string", "-Wclippy::invalid_upcast_comparisons", + "-Wclippy::large_futures", "-Wclippy::large_stack_arrays", "-Wclippy::large_types_passed_by_value", "-Wclippy::macro_use_imports", diff --git a/deny.toml b/deny.toml index bf2eb182..84a8d2ca 100644 --- a/deny.toml +++ b/deny.toml @@ -11,6 +11,7 @@ # Root options +[graph] # If 1 or more target triples (and optionally, target_features) are specified, # only the specified targets will be checked when running `cargo deny check`. # This means, if a particular package is only ever used as a target specific @@ -46,6 +47,8 @@ no-default-features = false # If set, these feature will be enabled when collecting metadata. If `--features` # is specified on the cmd line they will take precedence over this option. #features = [] + +[output] # When outputting inclusion graphs in diagnostics that include features, this # option can be used to specify the depth at which feature edges will be added. # This option is included since the graphs can be quite large and the addition @@ -57,43 +60,23 @@ feature-depth = 1 # More documentation for the advisories section can be found here: # https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html [advisories] +# Use the new defaults, see https://github.com/EmbarkStudios/cargo-deny/pull/611 for more info +version = 2 # The path where the advisory database is cloned/fetched into db-path = "~/.cargo/advisory-db" # The url(s) of the advisory databases to use db-urls = ["https://github.com/rustsec/advisory-db"] -# The lint level for security vulnerabilities -vulnerability = "deny" -# The lint level for unmaintained crates -unmaintained = "warn" # The lint level for crates that have been yanked from their source registry yanked = "warn" -# The lint level for crates with security notices. Note that as of -# 2019-12-17 there are no security notice advisories in -# https://github.com/rustsec/advisory-db -notice = "warn" # A list of advisory IDs to ignore. Note that ignored advisories will still # output a note when they are encountered. # These vulnerabilities are all from `aptos-lab/aptos-core` dependencies, which means we are unable to patch them here ignore = [ - # curve25519-dalek - "RUSTSEC-2024-0344", - # ed25519-dalek - "RUSTSEC-2022-0093", # libgit2-sys "RUSTSEC-2024-0013", - # rsa - # This vulnerability has not yet been patched - "RUSTSEC-2023-0071", + # ansi_term is unmaintained, used by tracing-forest, from sphinx + "RUSTSEC-2021-0139", ] -# Threshold for security vulnerabilities, any vulnerability with a CVSS score -# lower than the range specified will be ignored. Note that ignored advisories -# will still output a note when they are encountered. -# * None - CVSS Score 0.0 -# * Low - CVSS Score 0.1 - 3.9 -# * Medium - CVSS Score 4.0 - 6.9 -# * High - CVSS Score 7.0 - 8.9 -# * Critical - CVSS Score 9.0 - 10.0 -#severity-threshold = # If this is true, then cargo deny will use the git executable to fetch advisory database. # If this is false, then it uses a built-in git library. @@ -105,8 +88,8 @@ git-fetch-with-cli = true # More documentation for the licenses section can be found here: # https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html [licenses] -# The lint level for crates which do not have a detectable license -unlicensed = "deny" +# Use the new defaults, see https://github.com/EmbarkStudios/cargo-deny/pull/611 for more info +version = 2 # List of explicitly allowed licenses # See https://spdx.org/licenses/ for list of possible licenses # [possible values: any SPDX 3.11 short identifier (+ optional exception)]. @@ -128,26 +111,6 @@ allow = [ "CDDL-1.0", "MIT-0", ] -# List of explicitly disallowed licenses -# See https://spdx.org/licenses/ for list of possible licenses -# [possible values: any SPDX 3.11 short identifier (+ optional exception)]. -deny = [ - #"Nokia", -] -# Lint level for licenses considered copyleft -copyleft = "deny" -# Blanket approval or denial for OSI-approved or FSF Free/Libre licenses -# * both - The license will be approved if it is both OSI-approved *AND* FSF -# * either - The license will be approved if it is either OSI-approved *OR* FSF -# * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF -# * fsf-only - The license will be approved if is FSF *AND NOT* OSI-approved -# * neither - This predicate is ignored and the default lint level is used -allow-osi-fsf-free = "neither" -# Lint level used when no other predicates are matched -# 1. License isn't in the allow or deny lists -# 2. License isn't copyleft -# 3. License isn't OSI/FSF, or allow-osi-fsf-free = "neither" -default = "deny" # The confidence threshold for detecting a license from license text. # The higher the value, the more closely the license text must be to the # canonical license text of a valid SPDX license file. @@ -160,13 +123,10 @@ exceptions = [ { allow = ["BUSL-1.1"], crate = "aptos-lc" }, { allow = ["BUSL-1.1"], crate = "aptos-lc-core" }, { allow = ["BUSL-1.1"], crate = "aptos-programs" }, - { allow = ["BUSL-1.1"], crate = "fixture-generator" }, { allow = ["BUSL-1.1"], crate = "proof-server" }, { allow = ["BUSL-1.1"], crate = "signature-verification-program" }, { allow = ["BUSL-1.1"], crate = "epoch-change-program" }, { allow = ["BUSL-1.1"], crate = "inclusion-program" }, - # Remove as soon as https://github.com/aptos-labs/aptos-core/issues/13931 is fixed - { allow = ["GPL-3.0"], crate = "number_range"}, ] # Some crates don't have (easily) machine readable licensing information, @@ -305,7 +265,7 @@ deny = [ # is a direct dependency of the otherwise banned crate #{ name = "ansi_term", version = "=0.11.0", wrappers = [] }, "dirs", # use https://crates.io/crates/home instead - "amcl", # use https://github.com/lurk-lab/bls12_381/ instead + "amcl", # use https://github.com/argumentcomputer/bls12_381/ instead ] # List of features to allow/deny @@ -362,7 +322,7 @@ allow-git = [] [sources.allow-org] # 1 or more github.com organizations to allow git sources for # TODO: Enforce the below? -# github = ["lurk-lab"] +# github = ["argumentcomputer"] # 1 or more gitlab.com organizations to allow git sources for # gitlab = [""] # 1 or more bitbucket.org organizations to allow git sources for diff --git a/ethereum/.cargo/config.toml b/ethereum/.cargo/config.toml index a2991354..1736f988 100644 --- a/ethereum/.cargo/config.toml +++ b/ethereum/.cargo/config.toml @@ -21,6 +21,7 @@ xclippy = [ "-Wclippy::implicit_clone", "-Wclippy::inefficient_to_string", "-Wclippy::invalid_upcast_comparisons", + "-Wclippy::large_futures", "-Wclippy::large_stack_arrays", "-Wclippy::large_types_passed_by_value", "-Wclippy::macro_use_imports", diff --git a/ethereum/Cargo.lock b/ethereum/Cargo.lock index d3048ec7..02055769 100644 --- a/ethereum/Cargo.lock +++ b/ethereum/Cargo.lock @@ -1407,7 +1407,7 @@ dependencies = [ [[package]] name = "ethereum-lc" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "clap", @@ -1428,7 +1428,7 @@ dependencies = [ [[package]] name = "ethereum-lc-core" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "bls12_381 0.8.0", @@ -1450,7 +1450,7 @@ dependencies = [ [[package]] name = "ethereum-programs" -version = "1.0.1" +version = "1.0.2" dependencies = [ "glob", "sphinx-helper", diff --git a/ethereum/core/Cargo.toml b/ethereum/core/Cargo.toml index ebfdc5ff..67e6f609 100644 --- a/ethereum/core/Cargo.toml +++ b/ethereum/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ethereum-lc-core" -version = "1.0.1" +version = "1.0.2" edition = { workspace = true } repository = { workspace = true } license = { workspace = true } diff --git a/ethereum/ethereum-programs/Cargo.toml b/ethereum/ethereum-programs/Cargo.toml index 807cecdc..ed05c50f 100644 --- a/ethereum/ethereum-programs/Cargo.toml +++ b/ethereum/ethereum-programs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ethereum-programs" -version = "1.0.1" +version = "1.0.2" edition = { workspace = true } repository = { workspace = true } license = { workspace = true } diff --git a/ethereum/light-client/Cargo.toml b/ethereum/light-client/Cargo.toml index f0741530..4fdc7ad1 100644 --- a/ethereum/light-client/Cargo.toml +++ b/ethereum/light-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ethereum-lc" -version = "1.0.1" +version = "1.0.2" edition = { workspace = true } repository = { workspace = true } license = { workspace = true } diff --git a/ethereum/light-client/src/bin/client.rs b/ethereum/light-client/src/bin/client.rs index 04434f86..4c1bb784 100644 --- a/ethereum/light-client/src/bin/client.rs +++ b/ethereum/light-client/src/bin/client.rs @@ -118,13 +118,13 @@ async fn main() -> Result<()> { let rpc_provider_address = Arc::new(rpc_provider_address); // Initialize the Light Client. - let (client, store, verifier_state) = initialize_light_client( + let (client, store, verifier_state) = Box::pin(initialize_light_client( mode, checkpoint_provider_address, beacon_node_address, proof_server_address, rpc_provider_address, - ) + )) .await .expect("Failed to initialize light client"); @@ -203,14 +203,13 @@ async fn main() -> Result<()> { let task = tokio::spawn(async move { let store = store_clone.read().await.clone(); let update = Update::from(finality_update); - let proof = client_clone - .prove_storage_inclusion( - mode_clone, - store, - update.clone(), - light_client_internal, - ) - .await?; + let proof = Box::pin(client_clone.prove_storage_inclusion( + mode_clone, + store, + update.clone(), + light_client_internal, + )) + .await?; info!("Proof of storage inclusion generated successfully"); Ok((update, proof)) @@ -238,9 +237,12 @@ async fn main() -> Result<()> { let store = store_clone.read().await.clone(); let update = potential_update.unwrap(); - let proof = client_clone - .prove_committee_change(mode_clone, store, update.clone()) - .await?; + let proof = Box::pin(client_clone.prove_committee_change( + mode_clone, + store, + update.clone(), + )) + .await?; info!("Proof of committee change generated successfully"); Ok((update, proof)) @@ -341,10 +343,10 @@ async fn initialize_light_client( info!("Sync period changed, updating store..."); } - let proof = client - .prove_committee_change(proving_mode, store.clone(), update.clone()) - .await - .expect("Failed to prove committee change"); + let proof = + Box::pin(client.prove_committee_change(proving_mode, store.clone(), update.clone())) + .await + .expect("Failed to prove committee change"); client .verify_committee_change(proof.clone()) diff --git a/ethereum/light-client/src/client/mod.rs b/ethereum/light-client/src/client/mod.rs index af1e4ae3..22045281 100644 --- a/ethereum/light-client/src/client/mod.rs +++ b/ethereum/light-client/src/client/mod.rs @@ -159,9 +159,11 @@ impl Client { store: LightClientStore, update: Update, ) -> Result { - self.proof_server_client - .prove_committee_change(proving_mode, store, update) - .await + Box::pin( + self.proof_server_client + .prove_committee_change(proving_mode, store, update), + ) + .await } /// `verify_committee_change` makes a request to the Proof Server API to verify the proof of a committee change. @@ -232,9 +234,13 @@ impl Client { update: Update, eip1186_proof: EIP1186Proof, ) -> Result { - self.proof_server_client - .prove_storage_inclusion(proving_mode, store, update, eip1186_proof) - .await + Box::pin(self.proof_server_client.prove_storage_inclusion( + proving_mode, + store, + update, + eip1186_proof, + )) + .await } /// `verify_storage_inclusion` makes a request to the Proof Server API to verify the proof of a storage inclusion. diff --git a/ethereum/programs/committee-change/Cargo.lock b/ethereum/programs/committee-change/Cargo.lock index 0bd2dbad..931a4504 100644 --- a/ethereum/programs/committee-change/Cargo.lock +++ b/ethereum/programs/committee-change/Cargo.lock @@ -149,7 +149,7 @@ dependencies = [ [[package]] name = "committee-change-program" -version = "1.0.1" +version = "1.0.2" dependencies = [ "ethereum-lc-core", "sphinx-zkvm", @@ -337,7 +337,7 @@ dependencies = [ [[package]] name = "ethereum-lc-core" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "bls12_381", diff --git a/ethereum/programs/committee-change/Cargo.toml b/ethereum/programs/committee-change/Cargo.toml index 30c691d1..bc4b6a06 100644 --- a/ethereum/programs/committee-change/Cargo.toml +++ b/ethereum/programs/committee-change/Cargo.toml @@ -1,7 +1,7 @@ [workspace] [package] name = "committee-change-program" -version = "1.0.1" +version = "1.0.2" edition = "2021" license = "Apache-2.0" diff --git a/ethereum/programs/inclusion/Cargo.lock b/ethereum/programs/inclusion/Cargo.lock index 7dcd2f2b..f7b8a3e9 100644 --- a/ethereum/programs/inclusion/Cargo.lock +++ b/ethereum/programs/inclusion/Cargo.lock @@ -329,7 +329,7 @@ dependencies = [ [[package]] name = "ethereum-lc-core" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "bls12_381", @@ -541,7 +541,7 @@ dependencies = [ [[package]] name = "inclusion-program" -version = "1.0.1" +version = "1.0.2" dependencies = [ "ethereum-lc-core", "sphinx-zkvm", diff --git a/ethereum/programs/inclusion/Cargo.toml b/ethereum/programs/inclusion/Cargo.toml index 7acf1876..25577b37 100644 --- a/ethereum/programs/inclusion/Cargo.toml +++ b/ethereum/programs/inclusion/Cargo.toml @@ -1,7 +1,7 @@ [workspace] [package] name = "inclusion-program" -version = "1.0.1" +version = "1.0.2" edition = "2021" license = "Apache-2.0" diff --git a/fixture-generator/Cargo.lock b/fixture-generator/Cargo.lock index b4979fe7..366b8115 100644 --- a/fixture-generator/Cargo.lock +++ b/fixture-generator/Cargo.lock @@ -3953,7 +3953,7 @@ dependencies = [ [[package]] name = "ethereum-lc" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "clap 4.5.11", @@ -3974,7 +3974,7 @@ dependencies = [ [[package]] name = "ethereum-lc-core" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "bls12_381 0.8.0", @@ -3990,7 +3990,7 @@ dependencies = [ [[package]] name = "ethereum-programs" -version = "1.0.1" +version = "1.0.2" dependencies = [ "glob", "sphinx-helper",