-
Notifications
You must be signed in to change notification settings - Fork 809
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
Coretime Zombienet test #2867
Merged
Merged
Coretime Zombienet test #2867
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
be8a173
Start fixing the coretime zombienet test
bkchr a16a3f9
Merge remote-tracking branch 'origin/master' into bkchr-coretime-zomb…
bkchr c2fc4fd
Fix sending the core count
bkchr 4af1f61
Use latest relay chain block to have some number in `on_initialize`
bkchr 77efd07
Try to get it working
bkchr 71778ff
Return latest known relay chain block number in `on_initialize` et all
bkchr 67f3214
Adds prdoc
bkchr 031c01e
Fix the extrinsic setup
bkchr 2cf3d9f
Optimize test to be faster
bkchr f636975
Support `fast-runtime` for the rococo coretime chain
bkchr 819e66b
Merge remote-tracking branch 'origin/bkchr-relay-chain-data-provider'…
bkchr 8537a25
Adds the smoke test to CI
bkchr e7810a1
Update cumulus/pallets/parachain-system/src/lib.rs
bkchr c546b3b
Remove unused import
bkchr 582c4dd
use CUMULUS_IMAGE in network definition
pepoviola aa72e1d
Merge branch 'master' into bkchr-coretime-zombienet
bkchr 5648298
Merge remote-tracking branch 'origin/master' into bkchr-coretime-zomb…
bkchr 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
This file contains 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 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 |
---|---|---|
|
@@ -194,3 +194,5 @@ try-runtime = [ | |
] | ||
|
||
experimental = ["pallet-aura/experimental"] | ||
|
||
fast-runtime = [] |
This file contains 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 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 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 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 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 |
---|---|---|
|
@@ -27,7 +27,8 @@ use pallet_broker::{CoreAssignment, CoreIndex as BrokerCoreIndex}; | |
use primitives::{CoreIndex, Id as ParaId}; | ||
use sp_arithmetic::traits::SaturatedConversion; | ||
use xcm::v3::{ | ||
send_xcm, Instruction, Junction, Junctions, MultiLocation, OriginKind, SendXcm, Xcm, | ||
send_xcm, Instruction, Junction, Junctions, MultiLocation, OriginKind, SendXcm, WeightLimit, | ||
Xcm, | ||
}; | ||
|
||
use crate::{ | ||
|
@@ -220,9 +221,13 @@ impl<T: Config> Pallet<T> { | |
let new_core_count = notification.new_config.coretime_cores; | ||
if new_core_count != old_core_count { | ||
let core_count: u16 = new_core_count.saturated_into(); | ||
let message = Xcm(vec![mk_coretime_call( | ||
crate::coretime::CoretimeCalls::NotifyCoreCount(core_count), | ||
)]); | ||
let message = Xcm(vec![ | ||
Instruction::UnpaidExecution { | ||
weight_limit: WeightLimit::Unlimited, | ||
check_origin: None, | ||
}, | ||
mk_coretime_call(crate::coretime::CoretimeCalls::NotifyCoreCount(core_count)), | ||
]); | ||
if let Err(err) = send_xcm::<T::SendXcm>( | ||
MultiLocation { | ||
parents: 0, | ||
|
@@ -247,7 +252,7 @@ fn mk_coretime_call(call: crate::coretime::CoretimeCalls) -> Instruction<()> { | |
origin_kind: OriginKind::Superuser, | ||
// Largest call is set_lease with 1526 byte: | ||
// Longest call is reserve() with 31_000_000 | ||
require_weight_at_most: Weight::from_parts(100_000_000, 20_000), | ||
require_weight_at_most: Weight::from_parts(110_000_000, 20_000), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was it really that tight? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. I think 106_000_000 or so was it AFAIR. |
||
call: BrokerRuntimePallets::Broker(call).encode().into(), | ||
} | ||
} |
This file contains 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 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 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 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
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.
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.
Just curious why not even lower?
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.
IDK :D Session length on Rococo local is also around 1 Minute aka 10 blocks.
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.
Seems as good a reason as any for the tests as they are now.
I was wondering why not e.g. 2 - shorter splittable number, but it would limit the interlacing options when we make more complicated tests.