This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
General Message Queue Pallet #12485
Merged
Merged
General Message Queue Pallet #12485
Changes from all commits
Commits
Show all changes
128 commits
Select commit
Hold shift + click to select a range
206a7af
The message queue
gavofyork f0bdf13
Make fully generic
gavofyork 236804a
Refactor
gavofyork 2d8ff13
Docs
gavofyork afcf587
Refactor
gavofyork c8c82e0
Use iter not slice
gavofyork 5e48ae3
Per-origin queues
gavofyork 2e5bff8
Multi-queue processing
gavofyork 3839045
Introduce MaxReady
gavofyork 2bfe229
Remove MaxReady in favour of ready ring
gavofyork 283366b
Cleanups
gavofyork 76a5c81
ReadyRing and tests
gavofyork ef3faaf
Stale page reaping
gavofyork 8fa3619
Merge remote-tracking branch 'origin/master' into gav-message-queue
ggwpez 975c903
from_components -> from_parts
ggwpez fd19a63
Move WeightCounter to sp_weights
ggwpez 58c6c02
Add MockedWeightInfo
ggwpez 560f994
Deploy to kitchensink
ggwpez 56d0003
Use WeightCounter
ggwpez 4371fa2
Small fixes and logging
ggwpez 7db583f
Add service_page
ggwpez 84ce78e
Typo
ggwpez 5bded12
Move service_page below service_queue
ggwpez 77f375f
Add service_message
ggwpez 04d1698
Use correct weight function
ggwpez 16b4a8f
Overweight execution
gavofyork 9c52b8a
Merge branch 'gav-message-queue' of github.com:paritytech/substrate i…
gavofyork 522fd65
Refactor
gavofyork 250a678
Missing file
gavofyork 126a3ad
Fix WeightCounter usage in scheduler
ggwpez 4a03e25
Fix peek_index
ggwpez 91b694d
Add tests and bench service_page_item
ggwpez fa78eba
Merge remote-tracking branch 'origin/gav-message-queue' into gav-mess…
ggwpez 702fc99
Add debug_info
ggwpez 06d4916
Add no-progress check to service_queues
ggwpez 3364491
Add more benches
ggwpez c991ff5
Bound from_message and try_append_message
ggwpez 496188d
Add PageReaped event
ggwpez ae42857
Rename BookStateOf and BookStateFor
ggwpez 6950ba1
Update tests and remove logging
ggwpez 44286af
Remove redundant per-message origins; add footprint() and sweep_queue()
gavofyork 3b69fa4
Move testing stuff to mock.rs
ggwpez 9669c06
Add integration test
ggwpez e8e2726
Fix no-progress check
ggwpez 6f1af35
Fix debug_info
ggwpez a3ed0b3
Merge remote-tracking branch 'origin/gav-message-queue' into gav-mess…
ggwpez b52cd25
Fixup merge and tests
ggwpez cf39c9a
Fix footprint tracking
gavofyork 2f46318
Introduce
gavofyork 0fabd9c
Formatting
gavofyork 74d5fb3
OverweightEnqueued event, auto-servicing config item
gavofyork 3959364
Update tests and benchmarks
ggwpez 674563d
Clippy
ggwpez c5c3589
Add tests
ggwpez d8ee5d7
Merge remote-tracking branch 'origin/master' into gav-message-queue
gavofyork e554362
Provide change handler
gavofyork 25d2c06
Add missing BookStateFor::insert and call QueueChangeHandler
ggwpez 22fe899
Docs
ggwpez e650ae8
Update benchmarks and weights
ggwpez a1917e2
More tests...
ggwpez c99f26d
Use weight metering functions
ggwpez 7bbb863
weightInfo::process_message_payload is gone
ggwpez ba2f2fe
Merge remote-tracking branch 'origin/master' into gav-message-queue
ggwpez 1b114dc
Add defensive_saturating_accrue
ggwpez efdbc3a
Rename WeightCounter to WeightMeter
ggwpez 5059afa
Test on_initialize
ggwpez 4e55aa1
Add module docs
ggwpez 3f7031c
Merge remote-tracking branch 'origin/master' into gav-message-queue
ggwpez a27593e
Remove origin from MaxMessageLen
ggwpez ce8f656
Add BoundedVec::as_slice
ggwpez 6506430
Test Page::{from_message, try_append_message}
ggwpez 0edd21d
Fixup docs
ggwpez 0ba2bb8
Docs
gavofyork 73c7e49
Do nothing in sweep_queue if the queue does not exist
ggwpez 4717fc3
Test ring (un)knitting
ggwpez a6ead94
Upgrade stress-test
ggwpez bcee3f7
More tests...
ggwpez 8277caf
Beauty fixes
ggwpez 89fa01f
Merge remote-tracking branch 'origin/master' into gav-message-queue
ggwpez 2961ccf
clippy
ggwpez b593d7b
Rename BoundedVec::as_slice to as_bounded_slice
ggwpez 3524b68
Fix imports
ggwpez 4e81171
Remove ReadyRing struct
ggwpez 1653fba
Beauty fixes
ggwpez b7b9f26
Fix stale page watermark
ggwpez 5a377f6
Cleanup
ggwpez bdf63cc
Fix test feature and clippy
ggwpez 09dc712
QueueChanged handler is called correctly
ggwpez a6063ed
Update benches
ggwpez 1f102a9
Abstract testing functions
ggwpez f10a302
More tests
ggwpez b4c31eb
Cleanup
ggwpez 7cb2e51
Clippy
ggwpez b1e139b
fmt
ggwpez eb209e2
Simplify tests
ggwpez d319aad
Make stuff compile
ggwpez 5654425
Merge remote-tracking branch 'origin/master' into gav-message-queue
ggwpez d2d2640
Merge remote-tracking branch 'origin/master' into gav-message-queue
136a521
Extend overweight execution benchmark
ggwpez 8cafb2c
Remove TODOs
ggwpez 02e2a7c
Test service queue with faulty MessageProcessor
ggwpez f5b60c1
Merge remote-tracking branch 'origin/master' into gav-message-queue
ggwpez 42636e5
fmt
ggwpez 71152a8
Update pallet ui tests to 1.65
ggwpez 567ccb2
More docs
ggwpez 48c338c
Review doc fixes
ggwpez 281da1f
Merge remote-tracking branch 'origin/master' into gav-message-queue
ggwpez 5652c2b
Merge remote-tracking branch 'origin/master' into gav-message-queue
617b0c9
Add weight_limit to extrinsic weight of execute_overweight
KiChjang 3fb292d
Merge remote-tracking branch 'origin/master' into gav-message-queue
15ad9e8
Correctly return unused weight
KiChjang ba0999e
Return actual weight consumed in do_execute_overweight
KiChjang 3cb51c1
Review fixes
ggwpez e6d3bb5
Merge remote-tracking branch 'origin/master' into gav-message-queue
ggwpez ad80875
Set version 7.0.0-dev
ggwpez 25e3ae6
Make it compile
ggwpez eb1c0db
Switch message_size to u64
ggwpez 3b0bf6a
Switch message_count to u64
ggwpez 5013e86
Fix benchmarks
ggwpez 865f493
Make CI green
ggwpez 281f61e
Merge branch 'gav-message-queue' of github.com:paritytech/substrate i…
gavofyork b291e5d
Docs
gavofyork 41fdf07
Update tests
ggwpez e0e32a2
Merge branch 'master' of https://github.com/paritytech/substrate into…
be6d5c9
".git/.scripts/bench-bot.sh" pallet dev pallet_message_queue
f08e055
Dont mention README.md in the Cargo.toml
ggwpez b4feb05
Remove reference to readme
gavofyork 93010af
Merge branch 'gav-message-queue' of github.com:paritytech/substrate i…
gavofyork File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
[package] | ||
authors = ["Parity Technologies <admin@parity.io>"] | ||
edition = "2021" | ||
name = "pallet-message-queue" | ||
version = "7.0.0-dev" | ||
license = "Apache-2.0" | ||
homepage = "https://substrate.io" | ||
repository = "https://github.com/paritytech/substrate/" | ||
description = "FRAME pallet to queue and process messages" | ||
|
||
[dependencies] | ||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } | ||
scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } | ||
serde = { version = "1.0.137", optional = true, features = ["derive"] } | ||
log = { version = "0.4.17", default-features = false } | ||
|
||
sp-core = { version = "7.0.0", default-features = false, path = "../../primitives/core" } | ||
sp-io = { version = "7.0.0", default-features = false, path = "../../primitives/io" } | ||
sp-runtime = { version = "7.0.0", default-features = false, path = "../../primitives/runtime" } | ||
sp-std = { version = "5.0.0", default-features = false, path = "../../primitives/std" } | ||
sp-arithmetic = { version = "6.0.0", default-features = false, path = "../../primitives/arithmetic" } | ||
sp-weights = { version = "4.0.0", default-features = false, path = "../../primitives/weights" } | ||
|
||
frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, path = "../benchmarking" } | ||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" } | ||
frame-system = { version = "4.0.0-dev", default-features = false, path = "../system" } | ||
|
||
[dev-dependencies] | ||
sp-tracing = { version = "6.0.0", path = "../../primitives/tracing" } | ||
rand = "0.8.5" | ||
rand_distr = "0.4.3" | ||
|
||
[features] | ||
default = ["std"] | ||
std = [ | ||
"codec/std", | ||
"scale-info/std", | ||
"sp-core/std", | ||
"sp-io/std", | ||
"sp-runtime/std", | ||
"sp-std/std", | ||
"sp-arithmetic/std", | ||
"sp-weights/std", | ||
"frame-benchmarking?/std", | ||
"frame-support/std", | ||
"frame-system/std", | ||
] | ||
runtime-benchmarks = [ | ||
"frame-benchmarking/runtime-benchmarks", | ||
"frame-support/runtime-benchmarks", | ||
"frame-system/runtime-benchmarks", | ||
] | ||
try-runtime = ["frame-support/try-runtime"] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.