Skip to content

Commit

Permalink
update fastcrypto version (#850)
Browse files Browse the repository at this point in the history
* update fastcrypto version

* fix cargo deny according to sui

* partial lint fixes

* add experimental flag

* remove unused test

* remove bench

* Avoid type bound on multiple locations

---------

Co-authored-by: Jonas Lindstrøm <[email protected]>
  • Loading branch information
joyqvq and jonas-lj authored Jan 6, 2025
1 parent 3bbbcac commit 6ce2022
Show file tree
Hide file tree
Showing 26 changed files with 245 additions and 362 deletions.
10 changes: 0 additions & 10 deletions .cargo/config

This file was deleted.

32 changes: 32 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[alias]
# Collection of project wide clippy lints. This is done via an alias because
# clippy doesn't currently allow for specifiying project-wide lints in a
# configuration file. This is a similar workaround to the ones presented here:
# <https://github.com/EmbarkStudios/rust-ecosystem/issues/59>
xclippy = [
"clippy", "--all-targets", "--all-features", "--",
"-Wclippy::all",
"-Wclippy::disallowed_methods",
"-Aclippy::unnecessary_get_then_check",
]
xlint = "run --package x --bin x -- lint"
xtest = "run --package x --bin x -- external-crates-tests"

# Configuration specifically for running clippy on `external-crates/move/`.
# Some of these allows are to avoid code churn; others are filed as issues on the `sui` repo now.
move-clippy = [
"clippy",
"--all-targets",
"--",
"-Wclippy::all",
"-Wclippy::disallowed_methods",
"-Aclippy::upper_case_acronyms",
"-Aclippy::type_complexity",
"-Aclippy::new_without_default",
"-Aclippy::question_mark",
"-Aclippy::unnecessary_get_then_check",
"-Aclippy::needless_borrows_for_generic_args",
]

[build]
rustflags = ["-C", "force-frame-pointers=yes", "-C", "force-unwind-tables=yes"]
5 changes: 3 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,6 @@ jobs:
name: cargo-deny (advisories, licenses, bans, ...)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3
- uses: EmbarkStudios/cargo-deny-action@e0a440755b184aa50374330fa75cca0f84fcb59a # pin@v1
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1
- uses: taiki-e/install-action@cargo-deny
- run: cargo deny check bans licenses sources
99 changes: 8 additions & 91 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 18 additions & 56 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,49 +9,28 @@
# The values provided in this template are the default values that will be used
# when any section or field is not specified in your own configuration

# 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
# dependency, such as, for example, the `nix` crate only being used via the
# `target_family = "unix"` configuration, that only having windows targets in
# this list would mean the nix crate, as well as any of its exclusive
# dependencies not shared by any other crates, would be ignored, as the target
# list here is effectively saying which targets you are building for.
targets = [
# The triple can be any string, but only the target triples built into
# rustc (as of 1.40) can be checked against actual config expressions
#{ triple = "x86_64-unknown-linux-musl" },
# You can also specify which target_features you promise are enabled for a
# particular target. target_features are currently not validated against
# the actual valid features supported by the target architecture.
#{ triple = "wasm32-unknown-unknown", features = ["atomics"] },
]

# This section is considered when running `cargo deny check advisories`
# More documentation for the advisories section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
[advisories]
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.
ignore = [
#"RUSTSEC-0000-0000",
"RUSTSEC-2023-0071",
# reqwest uses unpatched rustls (also in Sui)
"RUSTSEC-2024-0336",
# allow unmaintained proc-macro-error used in transitive dependencies (also in Sui)
"RUSTSEC-2024-0370",
# allow unmaintained instant crate used in transitive dependencies (backoff, cached, fastrand, parking_lot_*, also in Sui)
"RUSTSEC-2024-0384",
# allow outdated 'idna' until passkey-client crate is able to update (also in Sui)
"RUSTSEC-2024-0421",
# allow unmaintained derivative crate used in transitive dependencies (ark-*, also in Sui)
"RUSTSEC-2024-0388",
]
# Threshold for security vulnerabilities, any vulnerability with a CVSS score
# lower than the range specified will be ignored. Note that ignored advisories
Expand All @@ -67,43 +46,26 @@ ignore = [
# 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 that do not have a detectable license
unlicensed = "deny"
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)].
allow = [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause",
"CC0-1.0",
"Apache-2.0",
"LicenseRef-ring",
"MPL-2.0",
"ISC",
"CC0-1.0",
"0BSD",
"LicenseRef-ring",
"Unlicense",
"BSL-1.0",
"Unicode-DFS-2016",
"Apache-2.0 WITH LLVM-exception",
"0BSD"
]
# 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",
"Unicode-3.0",
#"Apache-2.0 WITH LLVM-exception",
]
# Lint level for licenses considered copyleft
copyleft = "warn"
# 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.
Expand Down
3 changes: 2 additions & 1 deletion fastcrypto-tbls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ hex = "0.4.3"
tap = { version = "1.0.1", features = [] }

[dev-dependencies]
criterion = "0.4.0"
criterion = "0.5.1"
generic-tests = "0.1.2"

[[bench]]
Expand All @@ -47,3 +47,4 @@ harness = false

[features]
default = []
experimental = []
Loading

0 comments on commit 6ce2022

Please sign in to comment.