-
Notifications
You must be signed in to change notification settings - Fork 1
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
Remove declare synced #1134
Remove declare synced #1134
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.
💯
pallets/staking/src/benchmarking.rs
Outdated
@@ -272,7 +272,7 @@ benchmarks! { | |||
let block_number = 1; | |||
let nonce = NULL_ARR; | |||
let x25519_public_key = NULL_ARR; | |||
let endpoint = b"http://localhost:3001".to_vec(); | |||
let endpoint = vec![]; |
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.
Why did this change?
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.
so there are two ways to run benches
compile then run them (like in our scripts) this is the more closer to production way
or the easier way run them with cargo test --features=runtime-benchmarks
the first uses the runtime config sets
the second uses the mocks
So this would pass the first not the second, now it passes both
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.
@JesseAbram I thought I bumped the max length to account for this, no? If not, can you bump it to like 25 bytes, it helps makes the test more readable.
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.
mmm pretty sure that would effect other tests
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.
also wtv, changed
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.
Ah sorry, I did change this but in #1123 which is still a draft PR 😅
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.
There's also code in the TSS that needs to be moved for this (e.g --no-sync
). I'm okay if you want to do that here assuming it's not too much code, or in a follow up PR.
This also needs a CHANGELOG
entry.
pallets/staking/src/lib.rs
Outdated
Self::deposit_event(Event::ValidatorSyncStatus(stash, synced)); | ||
Ok(()) | ||
} | ||
|
||
#[pallet::call_index(7)] |
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.
We might as well bite the bullet here and make it a transaction_version
bump by changing this to 6
pallets/registry/src/benchmarking.rs
Outdated
@@ -48,7 +48,6 @@ fn assert_last_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) { | |||
|
|||
pub fn add_non_syncing_validators<T: Config>( |
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.
Can we rename this then to just add_validators
?
This is a holdover of subgroups, validators are immediately synced as there is only one parent key