-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xcm queue paused and resume #1737
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When paused, XCM messages should be queued in storage, and they needs to be replayed after resumed.
@shaunxw @zjb0807 the implementation of processing DMP and HRMP message both first store data in relaychain, then the parachain sync relaychain data, and read messages by relay_client.runtime_api. when processing dmp and hrmp messages in parachain, it'll update in current implementation, even though we ingnore invoke going back to Tuple implementation of fortunately, the dmp-queue implementation of
the premise of using these machanism is that we must call dmp-queue implementation of Ps. as currenty xcm-emulator use memory like(non-relayed) to test cross chain message, and for the case of dmp, relaychain may send duplicate dmp message to parachain. so the dmp-queue testcase may seems a little strange. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're right. We can leverage the message cache to dmp and xcmp queue with max_weight
.
Message sending in xcm-emulator can be improved later, at this time it's good to have manual tests to be safe.
/bench runtime mandala module_transaction_pause |
Finished benchmark for branch: xcm-pause Benchmark: Benchmark Runtime Mandala Module cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-mandala-runtime -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=module_transaction_pause --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/mandala/src/weights/ ResultsPallet: "module_transaction_pause", Extrinsic: "pause_transaction", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
|
…hmarks --features=with-mandala-runtime -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=module_transaction_pause --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/mandala/src/weights/
/bench runtime karura module_transaction_pause |
Finished benchmark for branch: xcm-pause Benchmark: Benchmark Runtime Karura Module cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-karura-runtime -- benchmark --chain=karura-dev --steps=50 --repeat=20 --pallet=module_transaction_pause --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/karura/src/weights/ ResultsPallet: "module_transaction_pause", Extrinsic: "pause_transaction", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
|
…hmarks --features=with-karura-runtime -- benchmark --chain=karura-dev --steps=50 --repeat=20 --pallet=module_transaction_pause --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/karura/src/weights/
/bench runtime acala module_transaction_pause |
Finished benchmark for branch: xcm-pause Benchmark: Benchmark Runtime Acala Module cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-acala-runtime -- benchmark --chain=acala-latest --steps=50 --repeat=20 --pallet=module_transaction_pause --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/acala/src/weights/ ResultsPallet: "module_transaction_pause", Extrinsic: "pause_transaction", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
|
…hmarks --features=with-acala-runtime -- benchmark --chain=acala-latest --steps=50 --repeat=20 --pallet=module_transaction_pause --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/acala/src/weights/
the manual test (after pause) log show un-expected result:
|
I found the second execute_xcm is invoked by
so we need other machanism to make sure don't invoke |
I can see few options:
|
Or requesting hrmp/dmp pallets to be able to pause/resume channels. |
paritytech/cumulus#896 is merged |
I'll continue this work after v0.9.16 is merged, as cumulus merge the PR to the master branch. also I think it'll be easy now, just need to add two config item to xcmp_queue::Config and do some test. the dmp-queue seems haven't implement yet. so we may just first introduct xcmp. |
closes: #1664