-
Notifications
You must be signed in to change notification settings - Fork 12
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
[Relayminer] Query for on-chain session param num_blocks_per_session
#538
[Relayminer] Query for on-chain session param num_blocks_per_session
#538
Conversation
Co-authored-by: Daniel Olshansky <[email protected]>
d2e94e5
to
a635c4e
Compare
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 |
f9355f2
to
163f9ba
Compare
…/refactor/move-num_blocks_per_session * refs/remotes/pokt/main: [On-chain] scaffold: module shared (#545) # Conflicts: # api/poktroll/shared/params.pulsar.go # proto/poktroll/shared/params.proto # x/shared/keeper/msg_update_params.go # x/shared/keeper/msg_update_params_test.go # x/shared/types/errors.go # x/shared/types/genesis.go # x/shared/types/genesis_test.go # x/shared/types/msg_update_params.go # x/shared/types/params.go # x/shared/types/params.pb.go
…ssues/517/refactor/session-params_relayminer
…ssues/517/refactor/session-params_relayminer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few minor comments but the only blocking ones are in x/shared/session.go
pkg/client/query/sharedquerier.go
Outdated
// GetParams queries & returns the shared module on-chain parameters. | ||
// | ||
// TODO_TECHDEBT(#543): We don't really want to have to query the params for every method call. | ||
// Once `ModuleParamsClient` is implemented, use its replay observable's `#Last` method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When will we have this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depends on how we prioritize it. From our discussion about historical params, I got the impression that ModuleParamsClient
wouldn't be a high priority for the same reason. It would reduce background network overhead but until we have a reason to believe that that's significantly impacting performance, I don't see another reason that needs to be a high priority.
…ssues/517/refactor/session-params_relayminer * issues/517/refactor/move-num_blocks_per_session: fix: update_params.feature reset
…sion-params_relayminer * pokt/main: refactor: move `num_blocks_per_session` param to shared module (#546)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…sessions * pokt/main: [Relayminer] Query for on-chain session param `num_blocks_per_session` (#538)
🚨 Do not delete this branch until #555 changes bases! 🚨 |
…-module * pokt/main: [Relayminer] Query for on-chain session param `num_blocks_per_session` (#538)
…r/ring-client * issues/517/refactor/app-module: [Relayminer] Query for on-chain session param `num_blocks_per_session` (#538) chore: udpate comments refactor: rename methods which use default shared params with suffix `WithDefaultParams` [Relay Mining] Relay Mining math helpers (#549) [Relay Mining] Scaffold the RelayMiningDifficulty type (#548)
…to issues/517/refactor/session-module * pokt/issues/517/refactor/app-module: [Code Health] test: add makefile target for E2E param update tests (#558) [Relayminer] Query for on-chain session param `num_blocks_per_session` (#538) chore: udpate comments refactor: rename methods which use default shared params with suffix `WithDefaultParams` [Relay Mining] Relay Mining math helpers (#549) [Relay Mining] Scaffold the RelayMiningDifficulty type (#548)
…re/cleanup * issues/517/refactor/session-module: chore: review improvements chore: review improvements [Code Health] test: add makefile target for E2E param update tests (#558) [Relayminer] Query for on-chain session param `num_blocks_per_session` (#538) chore: udpate comments refactor: rename methods which use default shared params with suffix `WithDefaultParams` [Relay Mining] Relay Mining math helpers (#549) [Relay Mining] Scaffold the RelayMiningDifficulty type (#548)
…le-param-update-msg * issues/517/chore/cleanup: chore: rename localnet load test makefile target to improve discoverability refactor: relay stress test to use queried shared params chore: review improvements chore: review improvements [Code Health] test: add makefile target for E2E param update tests (#558) [Relayminer] Query for on-chain session param `num_blocks_per_session` (#538) chore: udpate comments refactor: rename methods which use default shared params with suffix `WithDefaultParams` [Relay Mining] Relay Mining math helpers (#549) [Relay Mining] Scaffold the RelayMiningDifficulty type (#548) Empty commit
#538) Co-authored-by: Daniel Olshansky <[email protected]>
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
NumBlocksPerSession
governance parameter #517Type 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 ❤️ by ellipsis.dev