-
-
Notifications
You must be signed in to change notification settings - Fork 291
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
Computing proposers is not cached #4039
Comments
Locally with the code modified as follows:
At current epoch of 94955, making repeated requests for proposers at 94956, the console:
|
I tested this feature and was unable to request duties for the next epoch since this function throws for any slot ahead of the clock
@dadepo How were you able to test the feature? That check has always been there
Caching works fine, adding manually a console.log I can see that next proposers is computed only once for repeated calls through that epoch. So closing the issue |
@dapplion this won't cache though, and on every request to get next proposers, the
this.proposersNextEpoch.computed
check here will always return false, and theif
branch check always run.You can confirm this by running the application, and trigger the end point multiple times, the if branch will always run.
I noticed this while working on the implementation and I think the reason why this is the case is how the
chain.getHeadStateAtCurrentEpoch
here works, but I did not go ahead with caching when I realised that the request to the endpoint itself was actually pretty fast and no need to even cache.Originally posted by @dadepo in #3782 (comment)
The text was updated successfully, but these errors were encountered: