-
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
[EventsReplayClient] Fix Replay Client Bugs #267
Conversation
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.
Nice, thanks for the assist! 😎
I left a few comments regarding how/what we should be testing but otherwise, this is a solid improvement and bug fix. 🦾
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)
commit df73cfa Author: Bryan White <[email protected]> Date: Thu Dec 14 01:06:03 2023 +0100 refactor: `NewMinedRelay` to shared testutil (#262) commit 410965a Author: Bryan White <[email protected]> Date: Thu Dec 14 01:05:52 2023 +0100 fix: PR template typo 2 (#269) commit dd7df68 Author: Daniel Olshansky <[email protected]> Date: Wed Dec 13 13:45:26 2023 -0800 [Testing] Unit tests, E2E tests, logging and other Fixes / "Touchups" (#253) This is aiming to fix multiple issues in E2E tests and just general QoL improvements: 1. Adding a comment in `relay.feature` about the need to run `make supplier1_stake && make app1_stake` until we fix #180 (known issue) 2. Replacing the reference to host `sequencer-poktroll-sequencer` with `localhost` (see first screenshot below) 3. Fixed a bug leading us to assert against a `MsgSubmitProof` event instead of a `MsgCreateClaim` event (see second screenshot below) 4. Fixed on-chain logging under `x/*` by replacing `logger\.(Info|Error)\("([^"]+)"(?:, (.*))?\)` with `logger.$1(fmt.Sprintf("$2", $3))` so it works as expected 5. Some quality-of-life comments & TODOs 6. Minor additions to unit tests from #220 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)
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.
Last last comment from me! 🖖 🚢
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.
@h5law Please see my last NITs w.r.t comments + Bryan's comment, but otherwise let's get it in!
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.
@h5law Can you merge with main & rerun e2e tests?
@@ -19,6 +17,7 @@ import ( | |||
const blockIntegrationSubTimeout = 5 * time.Second | |||
|
|||
func TestBlockClient_LastNBlocks(t *testing.T) { | |||
t.Skip("TODO(@h5law): Figure out how to subscribe to events on the simulated localnet") |
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.
Nice
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.
🚢
…or/supplier-keys * issues/141/refactor/claim-proof: chore: add TODOs [Docs] Load Test #1 - Plan (#286) [Bug] Fix observable error logging (#298) [docs] Relayminer config documentation (#288) [Configs] Add foundation for RelayMiner operation configs. (#284) [SMT] Update to use SMT v0.8.2 (#297) [EventsReplayClient] Fix Replay Client Bugs (#267)
…ctor/supplier-errors * issues/141/refactor/supplier-keys: chore: add TODOs [Docs] Load Test #1 - Plan (#286) [Bug] Fix observable error logging (#298) [docs] Relayminer config documentation (#288) [Configs] Add foundation for RelayMiner operation configs. (#284) [SMT] Update to use SMT v0.8.2 (#297) [EventsReplayClient] Fix Replay Client Bugs (#267)
…ep/in-memory-network * issues/141/refactor/supplier-errors: chore: add TODOs [Docs] Load Test #1 - Plan (#286) [Bug] Fix observable error logging (#298) [docs] Relayminer config documentation (#288) [Configs] Add foundation for RelayMiner operation configs. (#284) [SMT] Update to use SMT v0.8.2 (#297) [EventsReplayClient] Fix Replay Client Bugs (#267)
…/in-memory-network * issues/141/prep/in-memory-network: chore: add #GetConfig() chore: rename InMemoryCosmosNetwork to InMemoryNetwork chore: update comment chore: review feedback improvements chore: add TODOs [Docs] Load Test #1 - Plan (#286) [Bug] Fix observable error logging (#298) [docs] Relayminer config documentation (#288) [Configs] Add foundation for RelayMiner operation configs. (#284) [SMT] Update to use SMT v0.8.2 (#297) [EventsReplayClient] Fix Replay Client Bugs (#267)
…ctor/in-memory-network * issues/141/feat/in-memory-network: chore: fix comment typo chore: post-merge refactor chore: fix comment chore: add #GetConfig() chore: rename InMemoryCosmosNetwork to InMemoryNetwork chore: update comment chore: review feedback improvements chore: add TODOs [Docs] Load Test #1 - Plan (#286) [Bug] Fix observable error logging (#298) [docs] Relayminer config documentation (#288) [Configs] Add foundation for RelayMiner operation configs. (#284) [SMT] Update to use SMT v0.8.2 (#297) [EventsReplayClient] Fix Replay Client Bugs (#267)
…refactor/proof-store-indices * issues/141/refactor/in-memory-network: chore: post-merge refactor chore: review feedback improvements chore: fix comment typo chore: post-merge refactor chore: fix comment chore: add #GetConfig() chore: rename InMemoryCosmosNetwork to InMemoryNetwork chore: update comment chore: review feedback improvements chore: add TODOs [Docs] Load Test #1 - Plan (#286) [Bug] Fix observable error logging (#298) [docs] Relayminer config documentation (#288) [Configs] Add foundation for RelayMiner operation configs. (#284) [SMT] Update to use SMT v0.8.2 (#297) [EventsReplayClient] Fix Replay Client Bugs (#267)
Summary
Human Summary
This PR implements remapping of events to allow the usage of
EventsSequence
(CommittedBlocksSequence
andRedelegationsSequence
) to be maintained between theEventsQueryClient
closing.It also fixes numerous bugs where the
EventsReplayClient
was not behaving as expected:retry.OnError
logic has been fixedEventsQueryClient
closing causing the above to occur has been addedThese are all covered in the regression integration test added which now acts as a backstop protecting these features from breaking.
AI Summary
Summary generated by Reviewpad on 22 Dec 23 16:23 UTC
This pull request includes the following changes:
ErrEventsConsClosed
inpkg/client/events/errors.go
.client.go
indicate the removal ofcometWebsocketURL
from theNewDelegationClient()
function and its related calls.query_client.go
include modifications to code blocks and locking/unlocking calls.pkg/client/block/client_integration_test.go
involve the removal of build tags and the addition of test functions and import statements.connection.go
involve imports, addition of new functions, and modifications related to managing mock objects for testing.cmd.go
indicate the removal of arguments from function calls inNewSupplyBlockClientFn()
andNewSupplyPOKTRollSDKFn()
.client.go
involve variable declaration and function call modifications.client.go
shows changes related to import statements and function arguments.client.go
involve the removal of import statements and changes in variable initialization.client.go
involve the removal of a function call argument.replay_client_integration_test.go
has been added with a test function.replay.go
involve synchronization, error messages, and comment updates related to context cancellation and unsubscribe functionality.client_integration_test.go
has experienced syntactical modifications, changes in comments, and modifications in test functions and assertions.deps_builder.go
shows the removal of a parameter in a function call.godoc.go
involve updating package documentation comments with a focus on redelegation events.replay_client.go
involve retrying the events query, modification of the replay observable buffer size, and changes to function signatures.client.go
shows the removal of a function call argument.client_test.go
underwent changes related to import statements and function call modifications.Please let me know if you need more information or if you have any other questions regarding this pull request.
Issue
Type of change
Select one or more:
Testing
make go_develop_and_test
make test_e2e
: Add the
devnet-test-e2e` label to the PR. This is VERY expensive, o only do it after all the reviews are complete.Sanity Checklist