Closed adshmh closed 11 months ago
@Olshansk would appreciate a bit more context on the expectations here. More specifically, does this make sense?
Also, wondering if it makes sense to cache and store older sessions: if there is a need on client-side to access old sessions this would make sense, but I can't think of one right now.
I recently had to do this in v0 tx-bot
and hacked (keyword hacked) it together. See https://github.com/pokt-network/tx-bot/blob/main/rpc/req.go#L93
Client checks the local cache for a stored session (on permanent storage, to allow sharing the session between multiple invocations of the client)
What is permanent storage
here? If it's just something simple like a text/binary file under /tmp
, then 👍
If a session is found --> verify against the current height
If validation means "check if session is still useful given the nodes", then 👍
Otherwise, please provide more details.
If a session is not found or the stored session has expired (i.e. does not match the current height): fetch the current session and store in cache (permanent storage)
👍
Also, wondering if it makes sense to cache and store older sessions: if there is a need on client-side to access old sessions this would make sense, but I can't think of one right now.
Can't think of any reasons right now. If it's important, it'll come back up.
Objective
Cache sessions client-side
Origin Document
754 and #778
Cache the retrieved sessions client-side.
Goals
Deliverable
Non-goals / Non-deliverables
General issue deliverables
Testing Methodology
make ...
make ...
make test_all
LocalNet
is still functioning correctly by following the instructions at docs/development/README.mdk8s LocalNet
is still functioning correctly by following the instructions hereCreator: @adshmh