-
Notifications
You must be signed in to change notification settings - Fork 8
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
[RingCache] Invalidate Cache On Redelegation Events #239
Conversation
a7bfec4
to
e8dad9e
Compare
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.
Did a quick review of this having done a partial review of the upstream PR. Some minor comments but looks pretty straightforward!
e8dad9e
to
2132576
Compare
0c40f96
to
5ca9322
Compare
5ca9322
to
c673b90
Compare
c673b90
to
b30b1a7
Compare
commit d621631 Author: Redouane Lakrache <[email protected]> Date: Wed Dec 13 16:24:34 2023 +0100 [SDK] feat: Have distinct JSON-RPC and gRPC urls (#261) * feat: Have distinct JSON-RPC and gRPC urls * chore: Trigger e2e tests * chore: Fix import groups commit 4e30e27 Author: Bryan White <[email protected]> Date: Wed Dec 13 14:28:36 2023 +0100 fix PR template testing checklist item (#268)
3ec55be
to
ca04d32
Compare
@Olshansk I think this is good to go once e2e stuff is fixed I can add the label |
The CI will now also run the e2e tests on devnet, which increases the time it takes to complete all CI checks. |
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 two small NITs before its g2g
…/in-memory-network * issues/141/prep/in-memory-network: [Testing, Tooling] chore: in-memory network interface & config types (#289) trigger CI [Supplier] refactor: supplier module errors (#265) [Supplier] refactor: supplier module keys (#264) [Supplier] refactor: claim & proof protobufs + (#263) chore: review feedback improvements [Configs] feat: Add staking config parser of gateway staking (#302) chore: review feedback improvements fix: usage raw string literal chore: review feedback improvements [RingCache] Invalidate Cache On Redelegation Events (#239)
…ctor/in-memory-network * issues/141/feat/in-memory-network: chore: review feedback improvements feat: update SMT to v0.9.2 (#311) fix: linter errors fixup! chore: review feedback improvements chore: review feedback improvements chore: review feedback improvements [Testing, Tooling] chore: in-memory network interface & config types (#289) trigger CI [Supplier] refactor: supplier module errors (#265) [Supplier] refactor: supplier module keys (#264) [Supplier] refactor: claim & proof protobufs + (#263) chore: review feedback improvements [Configs] feat: Add staking config parser of gateway staking (#302) chore: review feedback improvements fix: usage raw string literal chore: review feedback improvements [RingCache] Invalidate Cache On Redelegation Events (#239)
Summary
Human Summary
This PR adds the
DelegationClient
into theRingCache
and has it listen forEventRedelegation
events from the application in order to invalidate cache entries.It does this by listening to all events from the application module and filtering for the
EventRedelegation
event type, if it exists. This is because it seems you cannot directly subscribe to all of a specific event (custom events). They must be subscribed to based on their attributes (potential for a single delegation client that is specific for each app address). And as the subscription query supportsAND
but notOR
logic we cannot directly subscribe to bothpocket.application/MsgDelegateToGateway
andpocket.application/MsgUndelegateFromGateway
.AI Summary
Summary generated by Reviewpad on 10 Jan 24 01:59 UTC
This pull request includes several file diffs with various changes.
In the file 'errors.go', there are changes to variable names and error messages to improve clarity and consistency.
In the file 'msg_server_delegate_to_gateway.go', logging statements and event emission for application redelegation are modified to improve functionality and error handling.
The 'go.mod' file has changes related to dependency additions and removals.
In the file 'accquerier.go', there is a change in error handling related to deserialization of an account.
The file 'pkg/sdk/sdk.go' adds new functionality to create a new SDK instance with the given configuration.
The 'replay_client.go' file modifies code related to handling transport errors and event notifications.
The diff in the file 'delegationEventQuery' updates the subscription to application module events.
The 'cache.go' file introduces various changes related to dependency injection, methods, and logging in the cache functionality.
The 'pkg/client/events/replay_client.go' file changes comment explanations for handling transport errors and event notifications.
In the file 'cache.go' in the 'pkg/crypto/rings' package, there are changes related to dependencies, constructors, functionality, and logging.
The diff in the file adds a comment and code related to simulating connection closing.
The file 'pkg/client/delegation' has changes related to dependencies and the creation and supply of a delegation client.
The 'accquerier.go' file modifies error handling related to deserialization of an account.
In the file 'client.go', there are changes related to subscribing to events, filtering, and overriding defaults.
The 'cache.go' file in the 'pkg/crypto/rings' package has changes related to dependencies, constructors, methods, and logging.
The file 'replay_client.go' modifies code related to transport errors and event notifications.
The file 'pkg/crypto/rings/cache.go' has changes related to dependencies, methods, and logging.
The 'event.proto' file includes changes to import statements, options, and message fields.
The 'msg_server_undelegate_from_gateway.go' file adds logging and error handling improvements.
The 'interface.go' file modifies the 'RingCache' interface by adding new methods.
The file 'testproxy/relayerproxy.go' has changes related to importing packages, modifying methods, and adding dependencies.
Let me know if you need any further assistance with this diff.
Issue
Fixes N/A
Type of change
Select one or more:
Testing
make go_develop_and_test
Sanity Checklist