Skip to content
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

Merged
merged 6 commits into from
Oct 24, 2024
Merged

Remove declare synced #1134

merged 6 commits into from
Oct 24, 2024

Conversation

JesseAbram
Copy link
Member

This is a holdover of subgroups, validators are immediately synced as there is only one parent key

Copy link
Contributor

@ameba23 ameba23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@@ -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![];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this change?

Copy link
Member Author

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

Copy link
Collaborator

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.

Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also wtv, changed

Copy link
Collaborator

@HCastano HCastano Oct 23, 2024

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 😅

Copy link
Collaborator

@HCastano HCastano left a 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.

Self::deposit_event(Event::ValidatorSyncStatus(stash, synced));
Ok(())
}

#[pallet::call_index(7)]
Copy link
Collaborator

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

@@ -48,7 +48,6 @@ fn assert_last_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) {

pub fn add_non_syncing_validators<T: Config>(
Copy link
Collaborator

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?

@HCastano HCastano added the Bump `transaction_version` A change which affects how existing extrinsics are created (e.g parameter changes) label Oct 23, 2024
@JesseAbram JesseAbram merged commit 75ae3d1 into master Oct 24, 2024
8 checks passed
@JesseAbram JesseAbram deleted the remove-declare-sync branch October 24, 2024 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bump `transaction_version` A change which affects how existing extrinsics are created (e.g parameter changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants