-
Notifications
You must be signed in to change notification settings - Fork 13
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
[Miner] feat: add block client #65
Conversation
e9c47f9
to
0d73bd8
Compare
0439247
to
015e5ef
Compare
90b465b
to
6c60e68
Compare
(cherry picked from commit 22371aa550eb0060b528f4573ba6908bbdfa0c1c)
* pokt/main: fix: RelayerProxy interface mismatch (#91) [RelayerProxy] feat: implement relayerProxy struct (#82) [AppGate] Scaffold undelegate-from-gateway message & nothing else (#86) [AppGate] Scaffold delegate-to-gateway message and nothing else (#85) [Supplier] Implement MsgUnstakeSupplier w/ Tests (#77) [Supplier] Implement MsgStakeSupplier & Add Extensive Tests (#76) [RelayerProxy] feat: add RelayerProxy interface (#80)
(cherry picked from commit ab21790164ab544ae5f1508d3237a3faab33e71e)
* feat/observable-map: feat: add the map channel observable operator
* feat/replay-observable: feat: add replay observable
3878431
to
30b7a3c
Compare
6c60e68
to
596a49d
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.
A few last minute NITs but no blockers.
I didn't do a deep dive into pkg/retry/retry_test.go
since it's really hard to build context into this. When the TODOs are tended to, it'll be easier to compartmentalize on a per-PR basis.
@@ -0,0 +1,337 @@ | |||
package retry_test | |||
|
|||
/* TODO_TECHDEBT: improve this test: |
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.
#EZ
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.
😅
} | ||
|
||
/* | ||
TODO_TECHDEBT/TODO_CONSIDERATION(#XXX): this duplicates the unexported block event |
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.
Noice
Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: Daniel Olshansky <[email protected]>
Waiting to merge until CI is working and green: |
|
@bryanchriswhite Try to merge with main to see if CI passes and please take not of #121 as well |
There's a test failure unfortunately: https://github.com/pokt-network/poktroll/actions/runs/6712974558/job/18243662555?pr=65 |
* pokt/main: [Miner] feat: add block client (#65)
* pokt/main: [Miner] feat: add block client (#65) [Supplier] Add `ServiceConfigs` to `SupplierStaking` (#114) [AppGate] Add the MaxDelegatedGateways parameter (#109) [Test] Temporarily skip a flaky test `TestEventsQueryClient_Subscribe_Succeeds` (#121) [AppGate] Implement DelegateToGateway and add Tests (#90) [E2E] Add (Un)Stake Tests (#88)
…plementation * pokt/main: (28 commits) [Miner] feat: add supplier client (#42) [Off-chain] refactor: keyring errors & helpers (#131) [Miner] feat: add `TxClient` (#94) [CI] Build container images (#107) fix: flaky block client test (#132) [Tooling] add `go_lint` & `go_imports` make targets & CI step (#129) Update README.md [Code Health] Support `godoc` by replacing the `pocket `module name with `github.com/pokt-network/poktroll` (#128) [Miner] feat: add `TxContext` (#118) [Testing] fix: flaky tests in observable & client pkgs (#124) Added first roadmap change [AppGate] Implement UndelegateFromGateway with Extensive Tests (#125) [Miner] feat: add block client (#65) [Supplier] Add `ServiceConfigs` to `SupplierStaking` (#114) [AppGate] Add the MaxDelegatedGateways parameter (#109) [Test] Temporarily skip a flaky test `TestEventsQueryClient_Subscribe_Succeeds` (#121) [AppGate] Implement DelegateToGateway and add Tests (#90) [E2E] Add (Un)Stake Tests (#88) refactor: add `either.Bytes` alias (#117) feat: add either.AsyncErr type & helpers (#115) ...
* feat: add the map channel observable operator (cherry picked from commit 22371aa550eb0060b528f4573ba6908bbdfa0c1c) * feat: add replay observable (cherry picked from commit ab21790164ab544ae5f1508d3237a3faab33e71e) * chore: add query client interface * chore: add query client errors * test: fix false positive, prevent regression, & add comments * chore: add godoc comment * feat: add query client implementation * chore: add connection & dialer wrapper implementations * test: query client & add testquery helper pkg * chore: add go_test_integration make target * chore: add internal mocks pkg * test: query client integration test * docs: add event query client docs * chore: update go.mod * chore: re-order `eventsQueryClient` methods to improve readability * chore: add godoc comments to testclient helpers * fix: comment formatting * chore: improve comment & naming in evt query client test * test: tune events query client parameters * chore: improve godoc comments * chore: review improvements * refactor: `replayObservable` as its own interface type * refactor: `replayObservable#Next() V` to `ReplayObservable#Last(ctx, n) []V` * chore: add constructor func for `ReplayObservable` * test: reorder to improve readibility * refactor: rename and add godoc comments * chore: improve naming & comments * chore: add warning log and improve comments * test: improve and add tests * fix: interface assertion * fix: comment typo * chore: review improvements * fix: race * chore: add block client interface * chore: add `MapReplay` operator * feat: add block client * test: block client integration * test: block client * docs: fix install instructions * fix: race on eventsBytesAndConns map * fix: interface assertions Co-authored-by: Redouane Lakrache <[email protected]> * fix: race * Small updates to the README * refactor: add observableInternals interface (cherry picked from commit 5d149e5297ce7d11dad77983f53be53efd8dae15) * chore: update last; only block for 1 value min (cherry picked from commit b24a5e586e9c776a962008043d065a2294fd921c) * chore: review improvements * refactor: move add `channelObservableInternals` & migrate its relevant methods & state from channelObservable * refactor: simplify, cleanup, & improve comments * chore: review improvements (cherry picked from commit 31555cdc68211964358c43842e0581f565d1afff) * refactor: eliminate `EventsQueryClient#requestId` field (cherry picked from commit ccb1d6981f67ab860cb65dde4da15d89bcf57875) * refactor: review improvements * refactor: eliminate `EventsQueryClient#requestId` field * refactor: move websocket dialer and connection to own pkg * chore: add comment * fix: notify `retryOnError()` of async error propagating through `#EventsBytes()` observable * chore: review improvements * chore: move `EventsBytesObservable type above interfaces * chore: review improvements * fix: bug & improve naming & comments * chore: review improvements * fix: bug in `accumulateReplayValues()` * refactor: promote `retryOnError` to its own pkg: `retry.OnError` * chore: improve comments * test: inline wip test helpers * test: skip retry.OnError tests & comment * chore: review feedback improvements Co-authored-by: Daniel Olshansky <[email protected]> * chore: review feedback improvements Co-authored-by: Daniel Olshansky <[email protected]> * fix: format placeholder error --------- Co-authored-by: Redouane Lakrache <[email protected]> Co-authored-by: Daniel Olshansky <[email protected]>
Summary
Adds
BlockClient
interface and implementation.Issue
Relates to:
TxClient
#94BlockClient
is a nested dependency ofMiner
.Type of change
Select one or more:
Testing
make go_test_integration
Sanity Checklist