-
Notifications
You must be signed in to change notification settings - Fork 215
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
Change poet client to cache the full response of the v1/info
#6226
Comments
A note for consideration is etags. They're meant to allow for resource expiration at-the-server and allow intermediate layers to do caching and invalidation more easily. Just caching for some time might backfire under certain edge cases (please do consider my ignorance over the topic because I'm not sure they exist here). |
Sure, but this is just to keep track of a change that we excluded from a previous PR to get it merged quicker 🙂. PoET doesn't send Etags, the primary reason we are caching at all is to reduce the number of requests from the node to the servers. The node sends the same request for each identity to the same PoET (usually) around the same time, this just ensures that in that case we re-use the response we already got for the first identity for all others. |
Implemented in #6274 |
Description
From a discussion on PR #6116: #6116 (comment)
The whole info response should be cached instead of just the
types.CertifierInfo
field of the response.Affected code
The poet client already caches part of the response returned from the
v1/info
endpoint via these two methods:go-spacemesh/activation/poet.go
Lines 618 to 641 in 15ebc7b
This should be changed so that the whole response is cached:
simplifying
verifyPhaseShiftConfiguration
to the following:The text was updated successfully, but these errors were encountered: