Commit 2146767
committed
Extended Kusama/Polkadot BridgeHub with dynamic fees and congestion support
Add congestion detection to the Bridge Hub runtimes and report congestion status to the sending chain.
Bridge Hub's `ExportMessage` handling is extended with check if outbound message queue is congested,
if so then `CongestedMessage` signal is sent to the sending chain's relevant `pallet-xcm-bridge-hub-router` pallet instance,
where dynamic fees factor is processed.
When then same Bridge Hub receives message delivery confirmation, there is a another check is outbound queue is still congested,
if not then `UncongestedMessage` signal is sent to the sending chain's relevant `pallet-xcm-bridge-hub-router` pallet instance.
`pallet-bridge-messages`'s `receive_messages_proof` does another check for congestion or back-preassure
with checking status of underlaying XCMP queue (`cumulus_pallet_xcmp_queue::bridging::OutboundXcmpChannelCongestionStatusProvider`).
If we cannot deliver a message to the target, then `receive_messages_proof` returns error and Bridge Hub does not allow to receive new bridged messages.
More about congestion detection [here](paritytech/parity-bridges-common#2318).
Co-authored-by: Branislav Kontur <[email protected]>
Co-authored-by: Adrian Catangiu <[email protected]>
Co-authored-by: Svyatoslav Nikolsky <[email protected]>
Co-authored-by: Serban Iorga <[email protected]>
Signed-off-by: Branislav Kontur <[email protected]>
Signed-off-by: Adrian Catangiu <[email protected]>
Signed-off-by: Svyatoslav Nikolsky <[email protected]>
Signed-off-by: Serban Iorga <[email protected]>1 parent 7ffdb36 commit 2146767
File tree
15 files changed
+299
-53
lines changed- cumulus
- pallets/xcmp-queue
- parachains/runtimes/bridge-hubs
- bridge-hub-kusama
- src
- tests
- bridge-hub-polkadot
- src
- tests
- bridge-hub-rococo/tests
- test-utils
- src
15 files changed
+299
-53
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| 101 | + | |
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
| |||
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
58 | 81 | | |
59 | 82 | | |
60 | 83 | | |
| |||
81 | 104 | | |
82 | 105 | | |
83 | 106 | | |
84 | | - | |
85 | | - | |
| 107 | + | |
| 108 | + | |
86 | 109 | | |
87 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
88 | 114 | | |
89 | 115 | | |
90 | 116 | | |
| |||
Lines changed: 15 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
496 | | - | |
497 | | - | |
498 | | - | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
499 | 505 | | |
500 | 506 | | |
501 | 507 | | |
| |||
942 | 948 | | |
943 | 949 | | |
944 | 950 | | |
945 | | - | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
946 | 956 | | |
947 | 957 | | |
948 | 958 | | |
| |||
972 | 982 | | |
973 | 983 | | |
974 | 984 | | |
975 | | - | |
| 985 | + | |
976 | 986 | | |
977 | 987 | | |
978 | 988 | | |
| |||
Lines changed: 2 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | 115 | | |
122 | 116 | | |
123 | 117 | | |
| |||
191 | 185 | | |
192 | 186 | | |
193 | 187 | | |
194 | | - | |
195 | | - | |
196 | | - | |
| 188 | + | |
| 189 | + | |
197 | 190 | | |
198 | 191 | | |
199 | 192 | | |
| |||
Lines changed: 23 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
187 | 190 | | |
188 | 191 | | |
189 | 192 | | |
| |||
262 | 265 | | |
263 | 266 | | |
264 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| 101 | + | |
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
| |||
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
58 | 81 | | |
59 | 82 | | |
60 | 83 | | |
| |||
81 | 104 | | |
82 | 105 | | |
83 | 106 | | |
84 | | - | |
85 | | - | |
| 107 | + | |
| 108 | + | |
86 | 109 | | |
87 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
88 | 114 | | |
89 | 115 | | |
90 | 116 | | |
| |||
Lines changed: 15 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
497 | | - | |
498 | | - | |
499 | | - | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
500 | 506 | | |
501 | 507 | | |
502 | 508 | | |
| |||
943 | 949 | | |
944 | 950 | | |
945 | 951 | | |
946 | | - | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
947 | 957 | | |
948 | 958 | | |
949 | 959 | | |
| |||
973 | 983 | | |
974 | 984 | | |
975 | 985 | | |
976 | | - | |
| 986 | + | |
977 | 987 | | |
978 | 988 | | |
979 | 989 | | |
| |||
0 commit comments