Closed bryanchriswhite closed 1 month ago
The CI will now also run the e2e tests on devnet, which increases the time it takes to complete all CI checks. If you just created a pull request, you might need to push another commit to produce a container image DevNet can utilize to spin up infrastructure. You can use make trigger_ci
to push an empty commit.
- I'm not a fan of how many times
GracePeriod
is coming up in so many functions in theSessionQueryClient
. TheSession
is a first class citizen, the Grace period is a hack for an edge case, but it's becoming a "first class citizen", which is NOT what we want.
Currently, SessionGracePeriod
is in terms of sessions. It's being used to calculate various block durations / heights / offsets. If we rewrite it to be in terms of blocks, the need for #GetSessionGracePeriodBlockCount()
goes away. However, I would also expect this to become a param at some point. If it does, then it will have to be queried and/or cached off-chain & retrieved from the multistore on-chain.
I would propose renaming it to SessionGracePeriodBlocks
in the interim.
@Olshansk I'm marking this as a draft for now. I think this will change now that we've decided to add the shared module. I may close and re-open this PR on a new branch or rebase this one.
@Olshansk
- I'm not a fan of how many times
GracePeriod
is coming up in so many functions in theSessionQueryClient
. TheSession
is a first class citizen, the Grace period is a hack for an edge case, but it's becoming a "first class citizen", which is NOT what we want.
I disagree on that, I see a healthy ratio of SessionEndBlockHeight
/GracePeriod
in this diff.
It is, one of the key times of the C&P life cycle just like Claim/Proof
window submissions that will be almost as visible as soon as we start relying on them.
Although, I agree that the grace period is a bit special in the sense that it indicates when a session is no longer accepting new relays to it.
:rotating_light: Do not delete this branch until #555 changes bases! :rotating_light:
Summary
Refactors the relayminer to query for the current
num_blocks_per_session
each (or even multiple) time(s) it's used. This is a naive implementation to just get the relayminer using the on-chain param instead of the const that's still defined in the session keeper pkg but which will be removed in forthcoming work.Next Steps
ModuleParamsClient[P any]
(see: notion - ModuleParamsClient).sessionQuerier
to useModuleParamsClient[sessiontypes.Params]
to avoid excessive querying.Issue
517
Type of change
Select one or more:
Testing
Documentation changes (only if making doc changes)
make docusaurus_start
; only needed if you make doc changesLocal Testing (only if making code changes)
make go_develop_and_test
make test_e2e
PR Testing (only if making code changes)
devnet-test-e2e
label to the PR.make trigger_ci
if you want to re-trigger tests without any code changesSanity Checklist
Summary:
Refactors the
relayminer
to dynamically query thenum_blocks_per_session
parameter from the blockchain, updating relevant classes to utilize this new approach.Key points:
relayminer
to dynamically querynum_blocks_per_session
.SessionQueryClient
interface with new methods for session parameters.sessionQuerier
.relayerProxy
and related classes.Generated with :heart: by ellipsis.dev