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

why do we need to do a manual bump in pallet-salary? #4545

Open
xlc opened this issue May 23, 2024 · 8 comments · May be fixed by #5163
Open

why do we need to do a manual bump in pallet-salary? #4545

xlc opened this issue May 23, 2024 · 8 comments · May be fixed by #5163

Comments

@xlc
Copy link
Contributor

xlc commented May 23, 2024

why we need someone to call bump to bump the cycle instead of schedule it in scheduler?

@bkchr
Copy link
Member

bkchr commented May 23, 2024

IDK, we could also just put it into on_initialize.

@Doordashcon
Copy link
Contributor

Doordashcon commented Jul 17, 2024

Add up the RegistrationPeriod and PayoutPeriod in the on_initialize hook and when this passes from the current cycle it will call bump on the next block? Doesn't seem like there are edge cases where doing this might fail?

@Doordashcon
Copy link
Contributor

We don't need an extrinsic to manually call bump then? this can be changed into an helper function but retain the WeightInfo for bump.

@ggwpez
Copy link
Member

ggwpez commented Jul 20, 2024

You can call the bump automatically in on_idle or on_poll. Yea weight still needs to be accounted for.
Just start a merge request so we can give feedback on that.

@bkchr
Copy link
Member

bkchr commented Jul 21, 2024

We should use a task for this or not?

@gupnik
Copy link
Contributor

gupnik commented Jul 22, 2024

We should use a task for this or not?

Yes, that should work. Let me know if you face any issues @Doordashcon.

@bkchr
Copy link
Member

bkchr commented Jul 22, 2024

@gupnik can you please post a link to an example on how to do this?

@gupnik
Copy link
Contributor

gupnik commented Jul 23, 2024

@gupnik can you please post a link to an example on how to do this?

Yes, here it is, with the off-chain worker submitting the tasks here.

@Doordashcon Doordashcon linked a pull request Jul 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants