Skip to content
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

[Off-Chain] Add EventsReplayClient Generic Event Listener for BlockClient and DelegationClient #220

Merged
merged 38 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c501438
feat: add EventDelegateeChange event and tests
h5law Nov 23, 2023
46b4006
feat: add the delegation client
h5law Nov 24, 2023
fc65c19
feat: add MappedClient generic event listener
h5law Nov 24, 2023
7a87387
chore: fix broken tests
h5law Nov 24, 2023
fa8bb7f
feat: add interface wrappers and comments
h5law Nov 24, 2023
f2138b9
chore return correct interfaces
h5law Nov 24, 2023
1bb6f09
feat: implement wrapper types for the implementations fo the
h5law Nov 24, 2023
f4a540e
feat: refactor implementations of the EventsReplayClient
h5law Nov 25, 2023
137c41e
chore: s/CommittedBlockSequence/CommittedBlocksSequence/ge
h5law Nov 25, 2023
06f551a
chore: address comments
h5law Nov 25, 2023
90df55a
feat: add integration test helpers and placeholder test file
h5law Nov 26, 2023
96c3f8c
feat: consolidate event and events_query packages
h5law Nov 28, 2023
9596af9
chore go.mod
h5law Nov 29, 2023
30be1e2
feat: move interfaces back into client pkg
h5law Nov 29, 2023
22a288b
feat: add EventsReplayClient documentation
h5law Nov 30, 2023
1492790
Merge branch 'main' into feat/delegation-events
h5law Nov 30, 2023
bfde997
chore: simplify subscription query and remove type cast
h5law Dec 2, 2023
0ab3a5f
chore: log on error to emit event
h5law Dec 2, 2023
dea1479
chore: add placeholder intergration test
h5law Dec 2, 2023
1dd4fc5
chore: address issues
h5law Dec 3, 2023
5fb8c91
chore: address first batch of comments
h5law Dec 4, 2023
6cdab38
chore: update make go_doc comment
h5law Dec 4, 2023
28e4923
chore: address all comments
h5law Dec 5, 2023
5002ad2
chore: tidy example
h5law Dec 5, 2023
0f0513e
Merge branch 'main' into feat/delegation-events
h5law Dec 5, 2023
29abc91
feat: add godoc example code
h5law Dec 5, 2023
131f4e1
chore: add skipping test with upnext comment
h5law Dec 6, 2023
1320539
chore: fix broken tests:
h5law Dec 6, 2023
8e3dbc5
chore: address comments
h5law Dec 6, 2023
bc19c8c
Merge branch 'main' into feat/delegation-events
h5law Dec 6, 2023
3620d6c
chore: americanise spellings
h5law Dec 6, 2023
2a40d48
feat: improve docs
h5law Dec 6, 2023
18f953c
chore: fix sequence diagram
h5law Dec 7, 2023
e53078b
Merge branch 'main' into feat/delegation-events
h5law Dec 7, 2023
d5c7198
chore: address comments
h5law Dec 7, 2023
c1c39ec
Merge branch 'main' into feat/delegation-events
h5law Dec 7, 2023
fac2601
chore: americanise spellings
h5law Dec 7, 2023
c6f607c
chore: remove sequence diagram for iteration offline
h5law Dec 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ trigger_ci: ## Trigger the CI pipeline by submitting an empty commit; See https:

.PHONY: go_docs
go_docs: check_godoc ## Generate documentation for the project
echo "Visit http://localhost:6060/pkg/pocket/"
echo "Visit http://localhost:6060/pkg/github.com/pokt-network/poktroll/"
Olshansk marked this conversation as resolved.
Show resolved Hide resolved
godoc -http=:6060

.PHONY: openapi_gen
Expand Down
21 changes: 12 additions & 9 deletions docs/pkg/client/README.md
h5law marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
- [Best Practices](#best-practices)
- [FAQ](#faq)


## Overview

The `client` package exposes go APIs to facilitate interactions with the Pocket network.
Expand All @@ -26,11 +25,12 @@ It includes lower-level interfaces for working with transactions and subscribing
## Features

| Interface | Description |
|-------------------------|----------------------------------------------------------------------------------------------------|
| ----------------------- | -------------------------------------------------------------------------------------------------- |
| **`SupplierClient`** | A high-level client for use by the "supplier" actor. |
| **`TxClient`** | A high-level client used to build, sign, and broadcast transaction from cosmos-sdk messages. |
| **`TxContext`** | Abstracts and encapsulates the transaction building, signing, encoding, and broadcasting concerns. |
| **`BlockClient`** | Exposes methods for receiving notifications about newly committed blocks. |
| **`DelegationClient`** | Exposes methods for receiving notifications about new delegation changes from application. |
| **`EventsQueryClient`** | Encapsulates blockchain event subscriptions. |
| **`Connection`** | A transport agnostic communication channel for sending and receiving messages. |
| **`Dialer`** | Abstracts the establishment of connections. |
Expand All @@ -42,7 +42,7 @@ It includes lower-level interfaces for working with transactions and subscribing
title: Component Diagram Legend
---
flowchart

c[Component]
d[Dependency Component]
s[[Subcomponent]]
Expand All @@ -60,21 +60,24 @@ c --> s
title: Clients Dependency Tree
---
flowchart

sup[SupplierClient]
tx[TxClient]
txctx[[TxContext]]
bl[BlockClient]
subgraph bl[BlockClient]
bl_evt_replay[EventsReplayClient]
end
subgraph del[DelegationClient]
del_evt_replay[EventsReplayClient]
end
evt[EventsQueryClient]
conn[[Connection]]
dial[[Dialer]]

sup --"#SignAndBroadcast()"--> tx

tx --"#CommittedBlocksSequence()"--> bl
tx --"#BroadcastTx"--> txctx
tx --"#EventsBytes()"--> evt
bl --"#EventsBytes()"--> evt
bl_evt_replay --"#EventsBytes()"--> evt
del_evt_replay --"#EventsBytes()"--> evt
evt --> conn
evt --"#DialContext()"--> dial
dial --"(returns)"--> conn
Expand Down Expand Up @@ -144,4 +147,4 @@ While `TxClient` is centered around signing and broadcasting transactions, `TxCo

#### Can I extend or customize the provided interfaces?

Yes, the package is designed with modularity in mind. You can either implement the interfaces based on your requirements or extend them for additional functionalities.
Yes, the package is designed with modularity in mind. You can either implement the interfaces based on your requirements or extend them for additional functionalities.
Loading