Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
e97accb
change from cache root pr
cheme Jan 28, 2020
d7d69a4
Merge branch 'master' into split_child_payload
cheme Jan 28, 2020
cf6393a
Targetted way of putting keyspace.
cheme Jan 28, 2020
2845d0e
changes to state-db
cheme Jan 28, 2020
a0532d1
change transaction to be by child trie.
cheme Jan 28, 2020
eb5961f
slice index fix, many failing tests.
cheme Jan 28, 2020
67687f8
fix state-db tests
cheme Jan 28, 2020
48df830
vec with multiple entry of a same rc prefixeddb did not make sense,
cheme Jan 29, 2020
9e9a684
Merge branch 'master' into split_child_payload
cheme Jan 29, 2020
cb4c4a9
change set to btreemap, seems useless (at least do no solve changetrie
cheme Jan 29, 2020
a398b82
moving get_1 to get, state-machine needs rework
cheme Jan 30, 2020
7b26a93
Resolve a bit of child trie
cheme Jan 30, 2020
4d1378f
Merge branch 'split_child_payload' into split_child_payload_map2
cheme Jan 30, 2020
f39ce3f
small refact
cheme Jan 30, 2020
bc4fe52
Merge branch 'master' into split_child_payload
cheme Jan 30, 2020
f27a2ec
Merge branch 'split_child_payload' into split_child_payload_map2
cheme Jan 30, 2020
9f0c600
indent
cheme Jan 31, 2020
ecb43d0
Use const of null hash check on BackendStorageRef.
cheme Jan 31, 2020
d76a316
Merge branch 'split_child_payload_map2' into split_child_payload
cheme Jan 31, 2020
ae29df5
Associated null node hash set to a non optional const.
cheme Jan 31, 2020
6a06c0a
Make ChildInfo borrow of OwnedChildInfo.
cheme Jan 31, 2020
25aaa3a
Removing unsafe cast, using ref_cast asumption for borrow case.
cheme Feb 3, 2020
0d45d85
Borrow approach on OwnedChildInfo and ChildInfo did not make sense
cheme Feb 3, 2020
274a923
Factoring map of children code, before switching key.
cheme Feb 3, 2020
2e47a1d
Switching children key from optional to simple ChildInfo.
cheme Feb 3, 2020
328ed66
Merge branch 'master' into split_child_payload
cheme Feb 4, 2020
b07d7ca
fix merge test
cheme Feb 4, 2020
e5d7b04
clean todos
cheme Feb 4, 2020
3a71669
fix
cheme Feb 4, 2020
c846471
End up removing all keypacedDB from code.
cheme Feb 4, 2020
0b557b6
Clean unused struct and useless child info.
cheme Feb 4, 2020
8483da4
remove todo
cheme Feb 4, 2020
64ffcea
actual touch to keyspace prefixing (fail on wrong code asserted).
cheme Feb 4, 2020
2bc3cb6
self review changes.
cheme Feb 5, 2020
3136355
bump impl version.
cheme Feb 5, 2020
f655da1
Merge branch 'master' into split_child_payload
cheme Feb 5, 2020
bae6523
calculate size for single operation on usize.
cheme Feb 6, 2020
88ed503
Put keyspace logic in its own struct.
cheme Feb 6, 2020
4eb4676
Restrict top trie in ext to the storage key build from an empty key.
cheme Feb 6, 2020
5151471
Implementation basis for this PR, note that child storage key default
cheme Feb 6, 2020
8715446
Resolve prefix from child_info
cheme Feb 6, 2020
b72cd9c
Removed all child prefix, next is putting it back on full storage and on
cheme Feb 6, 2020
b636687
Prefixing child storage key where needed.
cheme Feb 7, 2020
e88631c
Merge branch 'master' into child_trie_w3_change
cheme Feb 7, 2020
e5b525f
Merge branch 'master' into split_child_payload
cheme Feb 7, 2020
728aedf
Remove deprecated check for genesis and fix some test storage builds.
cheme Feb 7, 2020
8329448
Merge branch 'master' into child_trie_w3_change
cheme Feb 7, 2020
864e9ca
Fix contract to stop using the child storage prefix.
cheme Feb 7, 2020
c87d19b
Revert changes to state-db and plug keyspace above it for default child
cheme Feb 11, 2020
1f62342
Merge branch 'master' into split_child_payload
cheme Feb 11, 2020
8b901a2
Update client-db benches.
cheme Feb 11, 2020
f6efdad
Bump runtime impl version.
cheme Feb 11, 2020
c683198
Merge branch 'master' into split_child_payload
cheme Feb 13, 2020
93de960
fix new code
cheme Feb 13, 2020
2224e2f
Merge branch 'master' into child_trie_w3_change
cheme Feb 17, 2020
c04ba95
Fixing merge.
cheme Feb 17, 2020
ffaf9f5
Switch back to using prefix on host function, remove child_id and
cheme Feb 17, 2020
87bd97c
fix polka ref issue.
cheme Feb 17, 2020
17cf613
Switching back to unprefixed in child info (all temporary struct
cheme Feb 18, 2020
b3ccc93
bump version
cheme Feb 18, 2020
afe85ae
fix tabs and doc.
cheme Feb 18, 2020
befe325
Merge branch 'master' into child_trie_w3_change
cheme Feb 18, 2020
ed480fa
Apply more consistant naming 'storage_key' instead of
cheme Feb 19, 2020
e103c2a
Update primitives/storage/src/lib.rs
cheme Feb 21, 2020
958b626
use prefixed storage key in change trie
cheme Feb 21, 2020
26f8000
Merge branch 'child_trie_w3_change' of github.com:cheme/polkadot into…
cheme Feb 21, 2020
f471d56
renaming 'default_child_trie_root' to 'empty_child_trie_root'
cheme Feb 21, 2020
02ff227
apply some renaming, rpc change are really ugly, will revert them
cheme Feb 21, 2020
8fcc112
Switch back to using child_type for rpc (and light client).
cheme Feb 21, 2020
b7b347a
Merge branch 'master' into child_trie_w3_change
cheme Feb 21, 2020
3869774
Merge branch 'master' into child_trie_w3_change
cheme Feb 26, 2020
4ebc204
Merge branch 'master' into child_trie_w3_change
cheme Feb 26, 2020
74aa3f8
bump runtime version
cheme Feb 26, 2020
dc023d1
merge #4857
cheme Feb 26, 2020
4c40ea7
Resolve merging change of api from #4857
cheme Feb 26, 2020
b6b70f3
revert rpc related default renaming.
cheme Feb 27, 2020
d563278
fix slice indexing for child root
cheme Feb 27, 2020
a85bb38
Switch back to prefixed storage key for rpc.
cheme Feb 27, 2020
5f98fbe
rpc error discrepancy
cheme Feb 27, 2020
320e375
Merge branch 'master' into child_trie_w3_change
cheme Feb 27, 2020
f05a576
Merge branch 'child_trie_w3_change' into split_child_payload
cheme Feb 27, 2020
d85dec2
Fix test
cheme Feb 27, 2020
9f704c9
use correct parameter in overlay and fix change trie.
cheme Feb 28, 2020
c82edbd
Merge branch 'master' into child_trie_w3_change
cheme Mar 2, 2020
7c5d546
bump version
cheme Mar 2, 2020
19ab06b
Merge branch 'master' into child_trie_w3_change
cheme Mar 10, 2020
152f04f
Merge branch 'master' into child_trie_w3_change
cheme Mar 12, 2020
e959e0d
Merge branch 'child_trie_w3_change' into split_child_payload
cheme Mar 12, 2020
eff1d8c
keeping inner hasher, it is needed at state-machine level.
cheme Mar 12, 2020
80136e3
Define child change enum.
cheme Mar 12, 2020
8249a9f
Key delta in child change too.
cheme Mar 12, 2020
6f0a01b
remove storage collection from the change, empty collection is not an
cheme Mar 12, 2020
1c97b84
ChildChangeSet overlay struct
cheme Mar 12, 2020
daf0a7a
fix client
cheme Mar 12, 2020
00ece8f
fix client
cheme Mar 12, 2020
3a2118e
storage_cache changes
cheme Mar 12, 2020
676f2d0
rocksdb patch for prefix delete updated
cheme Mar 12, 2020
07ec221
unprefixed storage key is smaller than random one.
cheme Mar 13, 2020
67e850e
notification and tests
cheme Mar 13, 2020
8160e20
change try_update to skip update on deleted child
cheme Mar 13, 2020
97bbb55
assimilate delete for child change
cheme Mar 13, 2020
fc46e62
overlay filters
cheme Mar 13, 2020
61b1926
in progress, putting child change in transaction (types wrong), next
cheme Mar 13, 2020
921e9d1
Keep change trie delta for drop child.
cheme Mar 16, 2020
cd9d47c
finish adding child change
cheme Mar 16, 2020
2e7bc65
Put bulk delete into top change child trie info, but currently not
cheme Mar 16, 2020
b0e0af8
remove done todos
cheme Mar 17, 2020
c70ef19
Compatibility with old version journal.
cheme Mar 17, 2020
b1994e7
prune test, and fixes.
cheme Mar 17, 2020
0036fd3
Merge branch 'master' into child_trie_w3_change
cheme Mar 17, 2020
29254aa
missing merge
cheme Mar 17, 2020
72cfb6c
Merge branch 'child_trie_w3_change' into split_child_payload
cheme Mar 17, 2020
594fdc8
Merge branch 'split_child_payload' into child_delete_2020
cheme Mar 17, 2020
baacffa
fix bench
cheme Mar 17, 2020
1471c0f
Merge branch 'split_child_payload' into child_delete_2020
cheme Mar 17, 2020
8e1fabc
bump version
cheme Mar 17, 2020
160d2ea
Restore previous cli api (will need deprecation in a v2 of rpc), split
cheme Mar 18, 2020
c76b433
Merge branch 'child_trie_w3_change' into split_child_payload
cheme Mar 18, 2020
b07fd39
Merge branch 'split_child_payload' into child_delete_2020
cheme Mar 18, 2020
63cf6bd
remove old rpc
cheme Mar 19, 2020
5ed450b
Merge branch 'master' into child_trie_w3_change
cheme Mar 19, 2020
f21606f
review change.
cheme Mar 20, 2020
1b2a30c
Using `PrefixedStorageKey` type for child storage key that are prefixed.
cheme Mar 20, 2020
750cdd8
Fix rpc test.
cheme Mar 23, 2020
32e27c9
Merge branch 'master' into child_trie_w3_change
cheme Mar 23, 2020
cc65f44
bump spec version
cheme Mar 23, 2020
c20cef9
Merge branch 'master' into child_trie_w3_change
cheme Mar 26, 2020
797ad34
Merge branch 'master' into child_trie_w3_change
cheme Mar 26, 2020
7e4b405
update head for the rocksdb delete.
cheme Mar 26, 2020
f1b23df
Apply review suggestion
cheme Mar 26, 2020
9651dd1
Merge branch 'master' into child_trie_w3_change
cheme Mar 30, 2020
c631a46
Fix unrelated warning for CI
cheme Mar 30, 2020
217c19b
Merge branch 'master' into child_trie_w3_change
cheme Apr 2, 2020
cf7d90e
Merge branch 'child_trie_w3_change' into split_child_payload
cheme Apr 2, 2020
7c8f393
companion fix
cheme Apr 2, 2020
b2240f1
Update .maintain/gitlab/check_polkadot_companion_build.sh
cheme Apr 2, 2020
f3b9f23
Fix compilation errors.
cheme Apr 2, 2020
63943ee
last attempt
cheme Apr 2, 2020
0d15f6f
Merge branch 'split_child_payload' into child_delete_2020
cheme Apr 2, 2020
784cb22
Forcing companion pr.
cheme Apr 2, 2020
4897109
fixing merge.
cheme Apr 2, 2020
4bbb24d
revert ci changes.
cheme Apr 2, 2020
50c3dd7
Merge branch 'master' into child_trie_w3_change
cheme Apr 3, 2020
a7c16eb
Merge branch 'child_trie_w3_change' of github.com:cheme/substrate int…
cheme Apr 3, 2020
ca40040
Merge branch 'master' into child_trie_w3_change
cheme Apr 9, 2020
226f7cd
name of children in chain spec change.
cheme Apr 14, 2020
5ab115e
Merge branch 'master' into child_trie_w3_change
cheme Apr 14, 2020
1ad4c5a
Merge branch 'master' into child_trie_w3_change
cheme Apr 15, 2020
94b78f3
Merge branch 'child_trie_w3_change' into split_child_payload
cheme Apr 15, 2020
5938d86
remove terminal space
cheme Apr 15, 2020
30e8192
Merge branch 'master' into child_trie_w3_change
cheme Apr 15, 2020
bc2a198
sp-io documentation changes.
cheme Apr 15, 2020
83ff4a0
Merge branch 'master' into child_trie_w3_change
cheme Apr 15, 2020
ecb1c39
Merge branch 'master' into child_trie_w3_change
cheme Apr 15, 2020
619b454
Retain compatibility with network protocol.
cheme Apr 15, 2020
fa52a8c
Revert "Retain compatibility with network protocol."
cheme Apr 15, 2020
167f20c
Merge branch 'master' into child_trie_w3_change
cheme Apr 15, 2020
928fac0
Merge branch 'master' into child_trie_w3_change
gavofyork Apr 17, 2020
69ed118
fix renamed field related error
cheme Apr 17, 2020
b79bd84
Merge branch 'master' into child_trie_w3_change
cheme Apr 20, 2020
ae3a3e1
Merge branch 'child_trie_w3_change' into split_child_payload
cheme Apr 23, 2020
ee1f768
Merge branch 'master' into split_child_payload
cheme Apr 23, 2020
1b3e752
Merge branch 'split_child_payload' into child_delete_2020
cheme Apr 23, 2020
52aa0f2
prototyping changes
cheme Apr 23, 2020
eb8a25d
would need rollback, this is going in a wrong direction
cheme Apr 23, 2020
c48ea04
might be ok design (could use &mut dyn ptr too, but this seems less
cheme Apr 24, 2020
8e63633
Ok design (no trait an pure fn ptr).
cheme Apr 24, 2020
7afbe6a
add root to child change
cheme Apr 27, 2020
03dae51
got the method test in parity-db non rc version (the reference db trick
cheme Apr 27, 2020
329983d
fix next storage key logic
cheme May 6, 2020
12f4229
Merge branch 'child_delete_2020' of github.com:cheme/polkadot into ch…
cheme May 6, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ rls*.log
*.rej
**/wip/*.stderr
.local
**/hfuzz_target/
**/hfuzz_workspace/
103 changes: 75 additions & 28 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,23 @@
stages:
- test
- build
- post-build-test
- publish
- kubernetes
- flaming-fir

variables:
GIT_STRATEGY: fetch
GIT_DEPTH: 100
CARGO_HOME: "/ci-cache/${CI_PROJECT_NAME}/cargo/${CI_JOB_NAME}"
CARGO_HOME: "/ci-cache/${CI_PROJECT_NAME}/cargo/${CI_COMMIT_REF_NAME}/${CI_JOB_NAME}"
SCCACHE_DIR: "/ci-cache/${CI_PROJECT_NAME}/sccache"
CARGO_INCREMENTAL: 0
CI_SERVER_NAME: "GitLab CI"
DOCKER_OS: "debian:stretch"
ARCH: "x86_64"
# FIXME set to release
CARGO_UNLEASH_INSTALL_PARAMS: "--version 1.0.0-alpha.8"
CARGO_UNLEASH_PKG_DEF: "--skip node node-* pallet-template pallet-example pallet-example-* subkey chain-spec-builder"
CARGO_UNLEASH_INSTALL_PARAMS: "--version 1.0.0-alpha.10"
CARGO_UNLEASH_PKG_DEF: "--skip node node-* pallet-template pallet-example pallet-example-* subkey chain-spec-builder sp-arithmetic-fuzzer"


.collect-artifacts: &collect-artifacts
Expand Down Expand Up @@ -127,6 +128,17 @@ check-line-width:
allow_failure: true




check-polkadot-companion-build:
stage: build
<<: *docker-env
script:
- ./.maintain/gitlab/check_polkadot_companion_build.sh
interruptible: true
allow_failure: true


cargo-audit:
stage: test
<<: *docker-env
Expand All @@ -136,6 +148,20 @@ cargo-audit:
- cargo audit
allow_failure: true

cargo-deny:
stage: test
<<: *docker-env
script:
- cargo deny check --hide-inclusion-graph -c .maintain/deny.toml
after_script:
- echo "___The complete log is in the artifacts___"
- cargo deny check -c .maintain/deny.toml 2> deny.log
artifacts:
name: $CI_COMMIT_SHORT_SHA
expire_in: 3 days
when: always
paths:
- deny.log

cargo-check-benches:
stage: test
Expand Down Expand Up @@ -167,7 +193,7 @@ test-linux-stable: &test-linux
variables:
- $DEPLOY_TAG
script:
- WASM_BUILD_NO_COLOR=1 time cargo test --all --release --verbose --locked |
- WASM_BUILD_NO_COLOR=1 time cargo test --all --release --verbose --locked |&
tee output.log
- sccache -s
after_script:
Expand Down Expand Up @@ -214,6 +240,24 @@ test-frame-staking:
- WASM_BUILD_NO_COLOR=1 time cargo test --release --verbose --no-default-features --features std
- sccache -s

test-frame-examples-compile-to-wasm:
stage: test
<<: *docker-env
variables:
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: -Cdebug-assertions=y
RUST_BACKTRACE: 1
except:
variables:
- $DEPLOY_TAG
script:
- cd frame/example-offchain-worker/
- cargo +nightly build --target=wasm32-unknown-unknown --no-default-features
- cd ../example
- cargo +nightly build --target=wasm32-unknown-unknown --no-default-features
- sccache -s

test-wasmtime:
stage: test
<<: *docker-env
Expand All @@ -230,6 +274,22 @@ test-wasmtime:
- WASM_BUILD_NO_COLOR=1 time cargo test --release --verbose --features wasmtime
- sccache -s

test-runtime-benchmarks:
stage: test
<<: *docker-env
variables:
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: -Cdebug-assertions=y
RUST_BACKTRACE: 1
except:
variables:
- $DEPLOY_TAG
script:
- cd bin/node/cli
- BUILD_DUMMY_WASM_BINARY=1 time cargo check --verbose --features runtime-benchmarks
- sccache -s

test-linux-stable-int:
<<: *test-linux
except:
Expand Down Expand Up @@ -271,7 +331,7 @@ check-web-wasm:
- time cargo build --target=wasm32-unknown-unknown -p sp-consensus
- time cargo build --target=wasm32-unknown-unknown -p sc-telemetry
# Note: the command below is a bit weird because several Cargo issues prevent us from compiling the node in a more straight-forward way.
- time cargo build --manifest-path=bin/node/cli/Cargo.toml --no-default-features --features "browser" --target=wasm32-unknown-unknown
- time cargo +nightly build --manifest-path=bin/node/cli/Cargo.toml --no-default-features --features "browser" --target=wasm32-unknown-unknown -Z features=itarget
- sccache -s

test-full-crypto-feature:
Expand Down Expand Up @@ -376,30 +436,17 @@ check_warnings:
echo "___No warnings___";
fi

# Nightly check whether Polkadot 'master' branch builds.
check_polkadot:
stage: build
<<: *docker-env
allow_failure: true

check-polkadot-companion-status:
stage: post-build-test
image: parity/tools:latest
<<: *kubernetes-build
only:
- master
- schedules
- /^[0-9]+$/
script:
- SUBSTRATE_PATH=$(pwd)
# Clone the current Polkadot master branch into ./polkadot.
- git clone --depth 1 https://gitlab.parity.io/parity/polkadot.git
- cd polkadot
# Make sure we override the crates in native and wasm build
- mkdir .cargo
- echo "paths = [ \"$SUBSTRATE_PATH\" ]" > .cargo/config
- mkdir -p target/debug/wbuild/.cargo
- echo "paths = [ \"$SUBSTRATE_PATH\" ]" > target/debug/wbuild/.cargo/config
# package, others are updated along the way.
- cargo update
# Check whether Polkadot 'master' branch builds with this Substrate commit.
- time cargo check
- cd -
- sccache -s
- ./.maintain/gitlab/check_polkadot_companion_status.sh



trigger-contracts-ci:
stage: publish
Expand Down Expand Up @@ -578,7 +625,7 @@ publish-to-crates-io:
<<: *docker-env
only:
- tags
- /^v[0-9]+\.[0-9]+\.[0-9]+.*$/
- /^ci-release-.*$/
script:
- cargo install cargo-unleash ${CARGO_UNLEASH_INSTALL_PARAMS}
- cargo unleash em-dragons --no-check ${CARGO_UNLEASH_PKG_DEF}
Expand Down
4 changes: 4 additions & 0 deletions .maintain/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ RUN mv /usr/share/ca* /tmp && \
ln -s /substrate/.local/share/substrate /data

COPY --from=builder /substrate/target/$PROFILE/substrate /usr/local/bin
COPY --from=builder /substrate/target/$PROFILE/subkey /usr/local/bin
COPY --from=builder /substrate/target/$PROFILE/node-rpc-client /usr/local/bin
COPY --from=builder /substrate/target/$PROFILE/node-template /usr/local/bin
COPY --from=builder /substrate/target/$PROFILE/chain-spec-builder /usr/local/bin

# checks
RUN ldd /usr/local/bin/substrate && \
Expand Down
193 changes: 193 additions & 0 deletions .maintain/deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
# This template contains all of the possible sections and their default values

# Note that all fields that take a lint level have these possible values:
# * deny - An error will be produced and the check will fail
# * warn - A warning will be produced, but the check will not fail
# * allow - No warning or error will be produced, though in some cases a note
# will be

# 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 in to
# 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]
# The path where the advisory database is cloned/fetched into
db-path = "~/.cargo/advisory-db"
# The url of the advisory database to use
db-url = "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",
]
# 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 =

# This section is considered when running `cargo deny check licenses`
# 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"
# List of explictly allowed licenses
# See https://spdx.org/licenses/ for list of possible licenses
# [possible values: any SPDX 3.7 short identifier (+ optional exception)].
allow = [
#"MIT",
#"Apache-2.0",
#"Apache-2.0 WITH LLVM-exception",
]
# List of explictly disallowed licenses
# See https://spdx.org/licenses/ for list of possible licenses
# [possible values: any SPDX 3.7 short identifier (+ optional exception)].
deny = [
#"Nokia",
]
# Lint level for licenses considered copyleft
copyleft = "allow"
# 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 = "either"
# 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.
# [possible values: any between 0.0 and 1.0].
confidence-threshold = 0.9
# Allow 1 or more licenses on a per-crate basis, so that particular licenses
# aren't accepted for every possible crate as with the normal allow list
exceptions = [
# Each entry is the crate and version constraint, and its specific allow
# list
#{ allow = ["Zlib"], name = "adler32", version = "*" },
]

# Some crates don't have (easily) machine readable licensing information,
# adding a clarification entry for it allows you to manually specify the
# licensing information
[[licenses.clarify]]
# The name of the crate the clarification applies to
name = "ring"
# THe optional version constraint for the crate
#version = "*"
# The SPDX expression for the license requirements of the crate
expression = "OpenSSL"
# One or more files in the crate's source used as the "source of truth" for
# the license expression. If the contents match, the clarification will be used
# when running the license check, otherwise the clarification will be ignored
# and the crate will be checked normally, which may produce warnings or errors
# depending on the rest of your configuration
license-files = [
# Each entry is a crate relative path, and the (opaque) hash of its contents
{ path = "LICENSE", hash = 0xbd0eed23 }
]
[[licenses.clarify]]
name = "webpki"
expression = "ISC"
license-files = [{ path = "LICENSE", hash = 0x001c7e6c }]

[licenses.private]
# If true, ignores workspace crates that aren't published, or are only
# published to private registries
ignore = false
# One or more private registries that you might publish crates to, if a crate
# is only published to private registries, and ignore is true, the crate will
# not have its license(s) checked
registries = [
#"https://sekretz.com/registry
]

# This section is considered when running `cargo deny check bans`.
# More documentation about the 'bans' section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html
[bans]
# Lint level for when multiple versions of the same crate are detected
multiple-versions = "warn"
# The graph highlighting used when creating dotgraphs for crates
# with multiple versions
# * lowest-version - The path to the lowest versioned duplicate is highlighted
# * simplest-path - The path to the version with the fewest edges is highlighted
# * all - Both lowest-version and simplest-path are used
highlight = "lowest-version"
# List of crates that are allowed. Use with care!
allow = [
#{ name = "ansi_term", version = "=0.11.0" },
]
# List of crates to deny
deny = [
{ name = "parity-util-mem", version = "<0.6" }
# Each entry the name of a crate and a version range. If version is
# not specified, all versions will be matched.
]
# Certain crates/versions that will be skipped when doing duplicate detection.
skip = [
#{ name = "ansi_term", version = "=0.11.0" },
]
# Similarly to `skip` allows you to skip certain crates during duplicate
# detection. Unlike skip, it also includes the entire tree of transitive
# dependencies starting at the specified crate, up to a certain depth, which is
# by default infinite
skip-tree = [
#{ name = "ansi_term", version = "=0.11.0", depth = 20 },
]

# This section is considered when running `cargo deny check sources`.
# More documentation about the 'sources' section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html
[sources]
# Lint level for what to happen when a crate from a crate registry that is not
# in the allow list is encountered
unknown-registry = "deny"
# Lint level for what to happen when a crate from a git repository that is not
# in the allow list is encountered
unknown-git = "warn"
# List of URLs for allowed crate registries. Defaults to the crates.io index
# if not specified. If it is specified but empty, no registries are allowed.
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
# List of URLs for allowed Git repositories
allow-git = []
Loading