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
253 commits
Select commit Hold shift + click to select a range
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
e3cf283
In progress multiple proof format
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
3241607
Merge branch 'split_child_payload' into split_child_proof
cheme Feb 13, 2020
93de960
fix new code
cheme Feb 13, 2020
972574f
Merge branch 'split_child_payload' into split_child_proof
cheme Feb 13, 2020
a284921
progress (note that the unpack doing check we could have trie primitive
cheme Feb 13, 2020
4708560
Things stick together, lot of todos remaining.
cheme Feb 14, 2020
09b9afd
propagate api change
cheme Feb 14, 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
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
baacffa
fix bench
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
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
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
784cb22
Forcing companion pr.
cheme Apr 2, 2020
4bbb24d
revert ci changes.
cheme Apr 2, 2020
18fa632
Merge branch 'split_child_payload' into split_child_proof
cheme Apr 3, 2020
ee679c1
lock update
cheme Apr 3, 2020
5d8ae4e
fix compilation errors
cheme Apr 3, 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
aa5c6dd
Merge branch 'split_child_payload' into split_child_proof
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
6969c74
Add ChildenProofMap and ChildrenProofInfo to be able to rebase on
cheme Apr 15, 2020
167f20c
Merge branch 'master' into child_trie_w3_change
cheme Apr 15, 2020
48dfe7d
Failure to run this on non split child payload: see non implemented
cheme Apr 15, 2020
38fa2c0
it was actually fine
cheme Apr 15, 2020
b7f7ee5
doc
cheme Apr 16, 2020
091ca80
pushing back full backend (will probably be removed with the Full
cheme Apr 16, 2020
87a4903
Merge branch 'split_child_proof_no_split_child_payload' into split_ch…
cheme Apr 16, 2020
e10387a
Register full in runtime, otherwhise packing would not be possible,
cheme Apr 16, 2020
557e6ef
passing around a target storage kind
cheme Apr 16, 2020
f687fc2
fix compact proof failure.
cheme Apr 16, 2020
a83f8e6
moving storage proof to trie as in master
cheme Apr 16, 2020
928fac0
Merge branch 'master' into child_trie_w3_change
gavofyork Apr 17, 2020
69ed118
fix renamed field related error
cheme Apr 17, 2020
eebdfe6
rework of storage proof in trie.
cheme Apr 17, 2020
39ba926
adapt rest of code
cheme Apr 17, 2020
60c136d
renaming refactor
cheme Apr 20, 2020
b79bd84
Merge branch 'master' into child_trie_w3_change
cheme Apr 20, 2020
e4c6289
refact and fix flatten not use.
cheme Apr 20, 2020
de305ed
move all pack to storage proof
cheme Apr 20, 2020
7a9098b
fix compile error, remove unused flatten method
cheme Apr 20, 2020
728daf4
add calls to the proof, untested.
cheme Apr 20, 2020
8724b57
Removing proof output and queryplan without value (does not exist in
cheme Apr 20, 2020
4641cbd
more acceptable error management
cheme Apr 21, 2020
c2d1cf1
switch root registration to encoded data.
cheme Apr 21, 2020
1a19852
only collect root when needed.
cheme Apr 21, 2020
02128d2
fix
cheme Apr 21, 2020
a9c1e65
remove old todos
cheme Apr 21, 2020
4f1e0ac
Set kind at the consumer level (static in rpc)
cheme Apr 21, 2020
869c24f
restore correct legacy encoding of light client
cheme Apr 21, 2020
d364381
Merge implementation
cheme Apr 21, 2020
55a12c8
Switch to new proof format and use compact on rpc and light (except head
cheme Apr 21, 2020
e542417
missing switches
cheme Apr 21, 2020
d3da220
fix merging and into a refactoring
cheme Apr 22, 2020
d6c82f5
remove rwlock for collecting roots
cheme Apr 22, 2020
f0a8455
triedbmut requiring hashdb block refacto (it should require a variant
cheme Apr 22, 2020
facd6f6
Revert "triedbmut requiring hashdb block refacto (it should require a…
cheme Apr 22, 2020
2fdb0f8
actually need rwlock for client backend
cheme Apr 22, 2020
2e4ed7d
fix doc test
cheme Apr 23, 2020
064d117
Merge branch 'child_trie_w3_change' into split_child_proof
cheme Apr 23, 2020
46d436a
Merge branch 'master' into split_child_proof
cheme Apr 23, 2020
f465388
Complete merge
cheme Apr 23, 2020
5f9b31b
Merge branch 'master' into split_child_proof
cheme May 4, 2020
f8a42a6
fix merge
cheme May 4, 2020
dc3915e
Merge branch 'master' into split_child_proof
cheme May 5, 2020
4fe29c0
Merge branch 'master' into split_child_proof
cheme May 18, 2020
cb93d53
remove unused parameter, rename api proof recorder
cheme May 18, 2020
be1fc61
restore to default proof
cheme May 18, 2020
16554e5
removing Legacy storage proof struct, codec adapters are enough
cheme May 18, 2020
cb7a0b5
Legacy compatibility. Note that in this state the PR does change
cheme May 19, 2020
9a9c982
revert to former light client proof encoding
cheme May 19, 2020
109267b
Revert protocol format to.
cheme May 19, 2020
6bd1469
also use non breakable finality proof
cheme May 19, 2020
f298e6b
Switch to compact proof everywhere
cheme May 19, 2020
4d5bfa7
Revert "Switch to compact proof everywhere"
cheme May 19, 2020
a2eca57
Doc improvment, remove dead code, more sensible recurse calls.
cheme May 19, 2020
e3d2067
Revert "Revert "Switch to compact proof everywhere"" : uses compact
cheme May 19, 2020
2e2d90f
Revert "Revert "Revert "Switch to compact proof everywhere"" : non
cheme May 19, 2020
af26fa8
Merge branch 'master' into split_child_proof
cheme May 20, 2020
89154cf
Pre refacto change from review.
cheme Jun 3, 2020
d659b2c
Merge branch 'master' into split_child_proof
cheme Jun 3, 2020
830dbf9
Refactoring in progress, base traits.
cheme Jun 3, 2020
83ce879
Trie in shape
cheme Jun 4, 2020
9aca478
Adding query plan variant to multiple for usage without exposing state
cheme Jun 4, 2020
2ec97d5
into partial merge
cheme Jun 5, 2020
f425fd5
in progress
cheme Jun 5, 2020
719d2d7
in progress
cheme Jun 5, 2020
30c1aec
refact trie code a bit (hasher instead of h::out mainly and no sync).
cheme Jun 8, 2020
bfd5a6d
New proof extract function to implement.
cheme Jun 8, 2020
d7f51d6
very messy but got something with right type system for state machine
cheme Jun 9, 2020
d5279dd
Test on full backend
cheme Jun 9, 2020
cc915c1
basic knownstorageandvalue test.
cheme Jun 9, 2020
e087c58
Fix tests remove warnings.
cheme Jun 10, 2020
69ebd39
sp_api using associated rec backend
cheme Jun 10, 2020
f4e6cb1
a few more, did not abstract state at client level (direct simpleproof
cheme Jun 10, 2020
4711052
the proof recorde struct is useless when we extract mergeable proof or
cheme Jun 10, 2020
3273887
Switch proof provider to return proofreg, we needed to merge
cheme Jun 10, 2020
d390740
test still needs a few updates, builds
cheme Jun 10, 2020
a8017b8
test fixed
cheme Jun 11, 2020
9a56fd6
completed query plan test.
cheme Jun 11, 2020
d496011
using another proof to register.
cheme Jun 11, 2020
f4f21bd
quick renaming
cheme Jun 11, 2020
f8185e9
clean warnings
cheme Jun 11, 2020
f7b2fba
more warnings
cheme Jun 11, 2020
ccfffcc
Merge branch 'master' into split_child_proof
cheme Jun 11, 2020
a6e4214
Renamings.
cheme Jun 12, 2020
2e372d3
switch collect of input to be in trait instead of hacky consolidate.
cheme Jun 12, 2020
e414fc5
Same state as rec, will remove reg backend state
cheme Jun 12, 2020
f5c525b
Removal of associated state type.
cheme Jun 12, 2020
9ef94da
Removing arc and code that could clone a record
cheme Jun 12, 2020
ad72850
comment
cheme Jun 12, 2020
cb8583d
Fix full backend test
cheme Jun 12, 2020
9a009ab
assert previous encoding is the same as SimpleProof.
cheme Jun 12, 2020
078576c
Remove temporary variants of multiple proof
cheme Jun 12, 2020
9c3c299
remove some proofs todos
cheme Jun 12, 2020
3000ea6
renaming reg 'registering' to rec 'recording'
cheme Jun 12, 2020
dba2bb1
minor doc change
cheme Jun 12, 2020
e1eafe7
Merge branch 'master' into split_child_proof
cheme Jun 12, 2020
2bc0dad
rename trieskiphashes to compact
cheme Jun 15, 2020
522775c
Break lines.
cheme Jun 15, 2020
a78b648
Merge branch 'master' into split_child_proof
cheme Jun 15, 2020
75d03f7
test ui line mismatch
cheme Jun 15, 2020
de341c1
restore doc test
cheme Jun 15, 2020
f9474f6
Expose proof from in memory backend type.
cheme Jun 16, 2020
10ec408
line breaks.
cheme Jun 16, 2020
7c789c9
few style fix
cheme Jun 16, 2020
ead9c0f
Merge branch 'master' into split_child_proof
cheme Jun 16, 2020
5974650
Fix trait issue from merge.
cheme Jun 17, 2020
53988c4
New lines break (from merge)
cheme Jun 17, 2020
996efa4
doc update
cheme Jun 17, 2020
45c5fcf
Remove todo
cheme Jun 17, 2020
e4e74bd
Merge branch 'master' into split_child_proof, expect issue with client
cheme Jul 9, 2020
5a25f15
Merge branch 'master' into split_child_proof
cheme Jul 23, 2020
c63cadb
Merge branch 'master' into split_child_proof
cheme Aug 3, 2020
2114ee9
Merge branch 'master' into split_child_proof
cheme Aug 17, 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