Robert Habermeier
e512222749
Wire up candidate backing, approval-voting to disputes ( #3348 )
...
* add a from_backing_statement to SignedDisputeStatement
* inform dispute coordinator of all backing statements
* add dispute coordinator message to backing tests
* send positive dispute statement with every approval
* issue disputes when encountering invalid candidates.
* try to fix flaky test for CI (passed locally)
* guide: keep track of concluded-positive disputes until pruned
* guide: block implications
* guide: new dispute inherent flow
* mostly implement recency changes for dispute coordinator
* add a clock to dispute coordinator
* adjust DB tests
* fix and add new dispute coordinator tests
* provisioner: select disputes
* import all validators' approvals
* address nit: refactor backing statement submission
* gracefully handle disconnected dispute coordinator
* remove `review` comment
* fix up old_tests
* fix approval-voting compilation
* fix backing compilation
* use known-leaves in WaitForActivation
* follow-up test fixing
* add back allow(dead_code)
2021-07-09 21:15:51 +00:00
Kian Paimani
d53ec86bbe
Companion for substrate/pull/9286 ( #3443 )
...
* Fix weights
* try something to unbreak companion
* update Substrate
Co-authored-by: Andronik Ordian <write@reusable.software >
Co-authored-by: parity-processbot <>
2021-07-09 20:25:13 +00:00
Kian Paimani
3850a43323
Make election benchmarks more *memory-aware* ( #9286 )
...
* Make benchmarks a bit better with mem
* Make election benchmarks more *memory-aware*
* Fix a few errors
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Manually fix the weights
* Update lock file
* remove dupe
* Fix tests
* cargo update pwasm
Co-authored-by: Parity Bot <admin@parity.io >
2021-07-09 19:55:31 +00:00
Bernhard Schuster
d76560fea2
thiserror annotations + spelling ( #3452 )
...
* remove duplicate thiserror annotations
* chore: cargo spellcheck
2021-07-09 12:31:52 +00:00
Robert Klotzner
b5257b2407
Dispute distribution implementation ( #3282 )
...
* Dispute protocol.
* Dispute distribution protocol.
* Get network requests routed.
* WIP: Basic dispute sender logic.
* Basic validator determination logic.
* WIP: Getting things to typecheck.
* Slightly larger timeout.
* More typechecking stuff.
* Cleanup.
* Finished most of the sending logic.
* Handle active leaves updates
- Cleanup dead disputes
- Update sends for new sessions
- Retry on errors
* Pass sessions in already.
* Startup dispute sending.
* Provide incoming decoding facilities
and use them in statement-distribution.
* Relaxed runtime util requirements.
We only need a `SubsystemSender` not a full `SubsystemContext`.
* Better usability of incoming requests.
Make it possible to consume stuff without clones.
* Add basic receiver functionality.
* Cleanup + fixes for sender.
* One more sender fix.
* Start receiver.
* Make sure to send responses back.
* WIP: Exposed authority discovery
* Make tests pass.
* Fully featured receiver.
* Decrease cost of `NotAValidator`.
* Make `RuntimeInfo` LRU cache size configurable.
* Cache more sessions.
* Fix collator protocol.
* Disable metrics for now.
* Make dispute-distribution a proper subsystem.
* Fix naming.
* Code style fixes.
* Factored out 4x copied mock function.
* WIP: Tests.
* Whitespace cleanup.
* Accessor functions.
* More testing.
* More Debug instances.
* Fix busy loop.
* Working tests.
* More tests.
* Cleanup.
* Fix build.
* Basic receiving test.
* Non validator message gets dropped.
* More receiving tests.
* Test nested and subsequent imports.
* Fix spaces.
* Better formatted imports.
* Import cleanup.
* Metrics.
* Message -> MuxedMessage
* Message -> MuxedMessage
* More review remarks.
* Add missing metrics.rs.
* Fix flaky test.
* Dispute coordinator - deliver confirmations.
* Send out `DisputeMessage` on issue local statement.
* Unwire dispute distribution.
* Review remarks.
* Review remarks.
* Better docs.
2021-07-09 04:29:53 +02:00
Robert Klotzner
20993b32b1
Guide updates for disputes. ( #3401 )
...
* Guide updates for disputes.
* Working availability recovery flood protection.
* More fixes.
* Formatting.
* Fix.
* Update roadmap/implementers-guide/src/node/disputes/dispute-participation.md
Co-authored-by: Sergei Shulepov <sergei@parity.io >
* Review remarks.
Co-authored-by: Sergei Shulepov <sergei@parity.io >
2021-07-08 23:19:08 +02:00
Bernhard Schuster
3c9104daff
refactor overseer into proc-macro based pattern ( #2962 )
2021-07-08 21:09:26 +02:00
Peter Goodspeed-Niklaus
9fc86cb55f
make submit_unsigned into DispatchClass::Operational ( #9309 )
...
Closes #8511 .
2021-07-08 17:04:38 +00:00
Lldenaurois
2510bfc5d7
Approval voting full subsystem tests ( #3391 )
...
* node/approval-voting: Introduce Backend trait and Overlaybackend
This commit introduces a Backend trait and attempts to move away
from the Action model via an OverlayBackend as in the ChainSelection
subsystem.
* node/approval-voting: Add WriteOps for StoredBlockRange and BlocksAtHeight
* node/approval-voting: Add load_all_blocks to overlay
* node/approval-voting: Get all module tests to pass.
This commit modifies all tests to ensure tests are passing.
* node/approval-voting: Address oversights in the previous commit
This commit addresses some oversights in the prior commit.
1. Inner errors in backend.write were swallowed
2. One-off write functions removed to avoid useless abstraction
3. Touch-ups in general
* node/approval-voting: Move from TestDB to dyn KeyValueDB
This commit removes the TestDB from tests.rs and replaces it with
an in-memory kvdb.
* node/approval-voting: Address feedback
* node/approval-voting: Add license to ops.rs
* node/approval-voting: Address second-pass feedback
* Add TODO
* node/approval-voting: Bump spec_version
* node/approval-voting: Address final comments.
* node/approval-voting: Introduce framework for full subsystem tests
* node/approval-voting: Introduce basic tests to attempt to provide
coverage via full subsystem tests
* node/approval-voting: Introduce Chainbuilder
2021-07-08 12:30:12 -04:00
Lldenaurois
7313e485d0
Approval voting overlay db ( #3366 )
...
* node/approval-voting: Introduce Backend trait and Overlaybackend
This commit introduces a Backend trait and attempts to move away
from the Action model via an OverlayBackend as in the ChainSelection
subsystem.
* node/approval-voting: Add WriteOps for StoredBlockRange and BlocksAtHeight
* node/approval-voting: Add load_all_blocks to overlay
* node/approval-voting: Get all module tests to pass.
This commit modifies all tests to ensure tests are passing.
* node/approval-voting: Address oversights in the previous commit
This commit addresses some oversights in the prior commit.
1. Inner errors in backend.write were swallowed
2. One-off write functions removed to avoid useless abstraction
3. Touch-ups in general
* node/approval-voting: Move from TestDB to dyn KeyValueDB
This commit removes the TestDB from tests.rs and replaces it with
an in-memory kvdb.
* node/approval-voting: Address feedback
* node/approval-voting: Add license to ops.rs
* node/approval-voting: Address second-pass feedback
* Add TODO
* node/approval-voting: Bump spec_version
* node/approval-voting: Address final comments.
2021-07-08 15:00:57 +00:00
Seun Lanlege
de445adb6d
Seun txpool refactor ( #3419 )
...
* companion for paritytech/substrate#9228
* sc_transaction_pool_api
* update Substrate
Co-authored-by: parity-processbot <>
2021-07-08 14:09:54 +00:00
Seun Lanlege
2ae9d36758
sc-transcation-pool refactor ( #9228 )
...
* Use TransactionPool trait
* sc-transaction-pool-primitives
* sc-transaction-pool-api
* TP
* bye sc_transaction_graph
* fix line widths
* fix import errors
* fix import errors
* fix import errors 🤦🏾♂️
* fix import errors 🤦🏾♂️ 🤦🏾♂️ 🤦🏾♂️
* remove sp-keyring
2021-07-08 13:33:34 +00:00
Andronik Ordian
0b81ff61a5
bump parity-ws ( #3442 )
2021-07-08 14:25:34 +02:00
Keith Yeung
721a3b9e9c
Ensure data size of identity pallet is bounded ( #9168 )
...
* Ensure data size of identity pallet is bounded
* Fix unit tests for identity pallet
* Move identity pallet custom types into its own module
* Make use of NoBound family traits
* Fix identity pallet benchmarks
* Enumerate type imports
* Properly convert to BoundedVec in benchmarks
* Re-export types
* Use BoundedVec when storing sub identities
* Add generate_storage_info
* Manually implement MaxEncodedLen on select types
* Use ConstU32 instead of parameter_type
* Leverage DefaultNoBound and add some comments
* Use max_encoded_len() instead of hardcoded constant
* Use MaxEncodedLen in parity-scal-codec
* Add get_mut method for WeakBoundedVec
* Use expect on an infallible operation
* Rewrite as for loop
2021-07-08 02:57:26 +00:00
Shawn Tabrizi
0e7217b4da
Companion for #9090 (include storage info) ( #3424 )
...
* update benchmark
* add host function
* update Substrate
* fix unused
Co-authored-by: parity-processbot <>
2021-07-07 23:01:00 +00:00
Shawn Tabrizi
b42b8fc5fb
Include StorageInfo in Benchmarking Pipeline ( #9090 )
...
* extend storageinfo
* extend_storage_info
* use vec
* add storage info to pipeline
* get read and written keys
* undo storageinfo move
* refactor keytracker
* return read / write count
* playing with key matching
* add basic `StorageInfo` constructor
* add whitelisted to returned info
* fix some test stuff
* pipe comments into benchmark data
* add_storage_comments
* add comments to template
* track only storage prefix
* Update frame/benchmarking/src/lib.rs
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* fix test
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* remove test logs
* add temp benchmark script
* Apply suggestions from code review
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* remove keytracker and use trackedstoragekey
* add comment for unknown keys
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_timestamp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/timestamp/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* remove duplicate comments with unknown keys
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_timestamp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/timestamp/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* refactor bench tracker, and fix results
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* fix child tries in new tracker
* extra newline
* fix unused warning
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_timestamp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/timestamp/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* fix master merge
* storage info usage refactor
* remove now unused
* fix refactor
* use a vec for prefix
* fix tests
* also update writer to use vec
* disable read and written keys for now
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_system --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/system/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Update frame/system/src/weights.rs
* fix test
* Delete weights.rs
* reset weights
Co-authored-by: Parity Bot <admin@parity.io >
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
2021-07-07 22:06:06 +00:00
Benjamin Kampmann
e0ad91ed95
Update stale.yml ( #9305 )
2021-07-07 23:42:33 +02:00
Andreas Doerr
2bb31db98c
Bump BEEFY ( #3430 )
2021-07-07 21:40:37 +02:00
Benjamin Kampmann
d154b477ef
Activate stale bot ( #9272 )
2021-07-07 14:33:38 +02:00
Bastian Köcher
86ab838b17
Keep current block randomness in state ( #9294 )
...
* Keep current block randomness in state
Instead of killing it at the end of the block, it stays in the block for
inspection. This is required by parachains to get access to this
randomness of the relay chain.
* Fix tests
2021-07-07 11:44:05 +00:00
Sergei Shulepov
612efa740a
Update Polkadot and Substrate ( #528 )
...
One breaking change:
- https://github.com/paritytech/substrate/pull/9209
2021-07-07 11:43:12 +00:00
Bastian Köcher
7bbf949296
Clean up sc-allocator ( #9295 )
2021-07-07 13:11:31 +02:00
Sergei Shulepov
8d77738cfd
pvf: Enable stack depth metering & NaN canonicalization ( #3373 )
...
* Add `canonicalize_nans` and enable `stack_depth_metering`
* Update to the latest change in the substrate PR
* Explain why the numbers are what they are.
* Update Substrate to the latest master
Co-authored-by: parity-processbot <>
2021-07-07 12:55:00 +03:00
Sergei Shulepov
f388b66ab5
PVF: NaN canonicalization & deteriministic stack ( #9069 )
...
* NaN canonicalization
* Introduce a simple stack depth metering
* Be explicit about the wasm features we enable
* Pull the latest latast fix for the pwasm-utils crate
* Disable `wasm_threads` as well.
* Factor out deterministic stack params
* Add more docs
* Remove redundant dep
* Refine comments
* Typo
Co-authored-by: Andronik Ordian <write@reusable.software >
Co-authored-by: Andronik Ordian <write@reusable.software >
2021-07-07 08:29:39 +00:00
Sergei Shulepov
b7b2276555
PVF: unresponsive worker doesn't mean the candidate is bad ( #3418 )
...
* PVF: unresponsive worker doesn't mean the candidate is bad
* s/if let Some/.is_some
2021-07-07 11:28:07 +03:00
cheme
b71ec24815
Companion for #9100 (Paged keys rpc for child storage.) ( #3258 )
...
* patch branch
* patch bis
* Add missing client method.
* unpatch
* update Substrate
Co-authored-by: parity-processbot <>
2021-07-07 07:53:33 +00:00
Chevdor
8c838e5aef
chore: upgrade srtool-actions and subwasm ( #526 )
...
- add builds for "statemint", "rococo", "shell"
- switch to chevdor/srtool-actions@v0.3.0 which default the new srtool image from paritytech/srtool
- bumps up the version of subwasm
- cleanup
- ability to start builds on-demand
2021-07-07 09:34:01 +02:00
cheme
d80e1bc978
Paged keys rpc for child storage. ( #9100 )
...
* childstate_getKeysPaged rpc
* Rename `v` to `iter`.
* Update client/api/src/backend.rs
Co-authored-by: Alexander Popiak <alexander.popiak@gmail.com >
* Update client/api/src/backend.rs
Co-authored-by: Alexander Popiak <alexander.popiak@gmail.com >
Co-authored-by: Alexander Popiak <alexander.popiak@gmail.com >
2021-07-07 07:22:13 +00:00
Xiliang Chen
fc1199b6a1
move BlockNumberProvider ( #9209 )
...
* move BlockNumberProvider
* Update primitives/runtime/src/traits.rs
* Update primitives/runtime/src/traits.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-07-07 06:25:00 +00:00
Kian Paimani
9cd04f3559
Allow the allocator to track the heap changes. ( #9291 )
...
* Allow the allocator to track the heap changes.
* fix build
* review comments
* Update client/allocator/Cargo.toml
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/allocator/Cargo.toml
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-07-07 05:32:57 +00:00
Kian Paimani
fb9baeb70b
clean up staking docs, remove EraElectionStatus references ( #9287 )
2021-07-07 07:31:20 +02:00
ferrell-code
528e751753
parchain initializer.rs to FrameV2 ( #3416 )
...
* migrate to FrameV2
* kusama & westend change pallet name
* keep item private
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
2021-07-07 02:50:52 +00:00
Robert Habermeier
f69c175119
Chain Selection: Follow-ups ( #3328 )
...
* DB skeleton
* key formats
* lexicographic test
* custom types for DB
* implement backend for db-v1
* remove VoidBackend and integrate with real DbBackend
* detect stagnant blocks on in interval
* fix tests
* add tests for stagnant
* send ChainSelectionMessage::Approved
* tests for DB backend
* unused import
* upgrade kvdb-memorydb
Co-authored-by: Andronik Ordian <write@reusable.software >
2021-07-06 16:00:52 -05:00
Yang Zhou
bdfb038dc6
add heiko, parallel to ss58 registry ( #9254 )
2021-07-06 20:21:45 +02:00
Squirrel
4f5d3b334e
Docs only changes ( #9258 )
...
* Docs changes to improve clarity
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
2021-07-06 18:05:10 +01:00
Shaun Wang
0966c8a4c3
Fix xcmp message processing condition. ( #510 )
...
* Fix xcmp message processing condition.
* add a very simple test
* Update Cargo.lock
* remove comment
* remove comment
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Alexander Popiak <alexander.popiak@gmail.com >
2021-07-06 16:35:59 +02:00
Bastian Köcher
9b85b5117e
Bring back runtime upgrade test ( #525 )
...
This brings back the runtime upgrade test and also updates Substrate &
Polkadot.
2021-07-06 16:21:19 +02:00
Guillaume Thiolliere
d969da8aa5
fix link ( #9289 )
2021-07-06 14:14:30 +00:00
Shinsaku Ashizawa
e581e6aff3
change reference module to pallet ( #9281 )
...
* change reference module to pallet
* fix inner doc
Co-authored-by: thiolliere <gui.thiolliere@gmail.com >
2021-07-06 13:56:37 +00:00
Martin Pugh
5ba0de035e
Update all weights, add run_all_benches.sh script ( #3400 )
...
* update all weights
* add run_all_benches.sh
2021-07-06 13:12:28 +02:00
André Silva
0b4f87fbbe
build: fix nix shell ( #9288 )
...
* build: fix deprecated stdenv.lib in nix shell
* build: fix libclang_path in nix shell
* build: update rust toolchain in nix shell
2021-07-06 11:06:11 +00:00
Bastian Köcher
f781dcaf2c
Add function for embedding the runtime version in a wasm blob ( #9277 )
...
* Add function for embedding the runtime version in a wasm blob
This function can be used to add the custom section to a wasm blob with
the runtime version in it.
* Review nitpick
2021-07-06 10:41:27 +00:00
Leonardo Custodio
279ff4b6e6
Removed score and compute from set_emergency_election_result ( #9271 )
...
* Removed score and compute from set_emergency_election_result
* Supports type incorrectly set to A
* Typo
2021-07-06 12:04:40 +02:00
Svyatoslav Nikolsky
04ac35e127
Enable over-bridge-messaging in Rococo/Wococo runtime ( #3377 )
...
* bridges in W<>R
* fix node compilation
* Update runtime/rococo/src/bridge_messages.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update runtime/rococo/src/bridge_messages.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update runtime/rococo/src/bridge_messages.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update runtime/rococo/src/bridge_messages.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* long line fix
* comment/remove -> comment/#[ignore]
* explicit instances
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
2021-07-06 10:03:12 +00:00
Arkadiy Paronyan
e755577c3f
Remove debug assertion ( #9283 )
2021-07-06 09:51:20 +00:00
Shawn Tabrizi
201a41be34
fix staking version in genesis ( #9280 )
2021-07-06 06:08:31 +00:00
Guillaume Thiolliere
3127eac4d7
fix storage info for decl_storage ( #9274 )
2021-07-06 01:58:24 +00:00
ferrell-code
39969ca536
paras.rs to FRAME V2 ( #3403 )
...
* to v2 macro
* line width
* fix mock
* actually compile moxk
* compile tests
* add hooks
* origin back in mocks
* assimilate_storage
* add generic
* maybe mock compiles now
* origin between parachain and system causing problem
* change origin
* type alias as origin
* keep origin
* add aliases to tests
* remove unnecessary imports
* Parachain -> Paras
* paras test
* nvm
* use genesis build in mock
2021-07-06 00:24:27 +00:00
Alexander Popiak
4a345045a9
Add XCM Tracing ( #3353 )
...
* add missing bridges logging target
* trace send_xcm
* trace execute_xcm
* trace calls in xcm-executor
* trace tuple implementations of xcm traits
* update cargo.lock
* remove bridge log target
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* log argument formatting
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-07-05 22:44:46 +00:00
ferrell-code
db8dc5420b
Authority_discovery: expose assimilate_storage with GenesisBuild ( #9279 )
...
* use genesis build
* format
2021-07-05 23:40:45 +02:00