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

[Miner] feat: add TxClient #94

Merged
merged 24 commits into from
Nov 7, 2023
Merged

[Miner] feat: add TxClient #94

merged 24 commits into from
Nov 7, 2023

Conversation

bryanchriswhite
Copy link
Contributor

@bryanchriswhite bryanchriswhite commented Oct 23, 2023

Summary

Human Summary

---
title: TxClient Dependency Graph
---


flowchart

    subgraph tclient[TxClient]
        tctx[TxContext]
        builder[TxBuilder]
        keyring[Keyring]

        bclient[BlockClient]
        eclient[EventsQueryClient]

        tclient_internal((_))
    end

    chain[Blockchain]

    tctx --"#GetKeyring()"--> keyring
tctx --"#SignTx()"--> builder
tctx --"#EncodeTx()"--> builder
tctx -."#BroadcastTx()".-> chain
tctx -."#QueryTx()".-> chain

eclient -."websocket connection".-> chain
bclient --"committed  block subscription"--> eclient
tclient_internal --"own tx subscription"--> eclient
Loading

AI Summary

Summary generated by Reviewpad on 07 Nov 23 07:56 UTC

This pull request includes several changes across multiple files.

  • A new file godoc.go has been added to the pkg/client directory. This file defines a package called client that provides interfaces and types for interacting with blockchain functionalities.

  • The go.mod file has been modified to update dependencies and remove unused dependencies.

  • A new file services.go has been added to the pkg/client package. This file contains a function NewTestApplicationServiceConfig that returns a slice of pointers to sharedtypes.ApplicationServiceConfig structs.

  • The context.go file has been modified to update comments and function names related to the cosmos-sdk transaction handling.

  • A new file README.md has been added, which provides an overview of the client package, installation instructions, usage examples, and other sections.

  • The errors.go file has been added to the pkg/client/tx package. It defines error variables related to transaction handling.

  • The README.md file has been modified to remove certain sections.

  • Several files have been modified or added to the pkg/client/tx package, including the addition of a new mock client for the BlockClient interface and changes to the TxClient and TxContext interfaces.

  • The go.sum file has been updated to include changes to the versions of certain dependencies.

  • Files related to test client functionality have been modified or added.

Overall, this pull request includes various additions, modifications, and updates across multiple files to enhance the functionality and documentation of the codebase.

Issue

Relates to:

TxClient & TxContext are used to build, encode, sign, and broadcast transactions from an off-chain context.

Type of change

Select one or more:

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Documentation
  • Other (specify)

Testing

  • Run all unit tests: make go_test
  • Verify Localnet manually: See the instructions [here](TODO: add link to instructions)

Sanity Checklist

  • I have tested my changes using the available tooling
  • I have performed a self-review of my own code
  • I have commented my code, updated documentation and left TODOs throughout the codebase

@bryanchriswhite bryanchriswhite added the miner Changes related to the Miner label Oct 23, 2023
@bryanchriswhite bryanchriswhite added this to the Shannon TestNet milestone Oct 23, 2023
@bryanchriswhite bryanchriswhite self-assigned this Oct 23, 2023
@bryanchriswhite bryanchriswhite mentioned this pull request Oct 23, 2023
10 tasks
@bryanchriswhite bryanchriswhite force-pushed the feat/tx-client branch 2 times, most recently from c4de955 to 3f7cb13 Compare October 25, 2023 13:00
@bryanchriswhite bryanchriswhite force-pushed the feat/tx-client branch 2 times, most recently from 3867526 to 9d5b3a6 Compare October 30, 2023 22:13
@bryanchriswhite bryanchriswhite changed the base branch from feat/block-client to merge/block-client_x_retry October 30, 2023 22:21
@bryanchriswhite bryanchriswhite changed the title [Miner] feat: add TxClient & TxContext [Miner] feat: add TxClient Oct 31, 2023
@bryanchriswhite bryanchriswhite changed the base branch from merge/block-client_x_retry to merge/block-client_x_retry_x_tx-ctx October 31, 2023 07:36
@bryanchriswhite bryanchriswhite linked an issue Oct 31, 2023 that may be closed by this pull request
10 tasks
@bryanchriswhite bryanchriswhite force-pushed the feat/tx-client branch 2 times, most recently from 78184e5 to 61185e1 Compare November 2, 2023 11:57
@bryanchriswhite bryanchriswhite changed the base branch from merge/block-client_x_retry_x_tx-ctx to main November 2, 2023 11:58
@Olshansk
Copy link
Member

Olshansk commented Nov 3, 2023

@bryanchriswhite Checking in whether this is ready for another review yet or not?

* pokt/main:
  [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)
* pokt/main:
  fix: flaky block client test (#132)
Copy link
Member

@Olshansk Olshansk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ty so much for simplifying the comments!

internal/testclient/testeventsquery/client.go Outdated Show resolved Hide resolved
internal/testclient/testeventsquery/client.go Outdated Show resolved Hide resolved
internal/testclient/testeventsquery/client.go Outdated Show resolved Hide resolved
internal/testclient/testeventsquery/client.go Outdated Show resolved Hide resolved
docs/pkg/client/README.md Outdated Show resolved Hide resolved
@bryanchriswhite bryanchriswhite merged commit 1974c8a into main Nov 7, 2023
7 checks passed
bryanchriswhite added a commit that referenced this pull request Nov 7, 2023
…-helpers

* pokt/main:
  [Miner] feat: add `TxClient` (#94)
  [CI] Build container images (#107)
  fix: flaky block client test (#132)
@bryanchriswhite bryanchriswhite deleted the feat/tx-client branch November 7, 2023 08:44
bryanchriswhite added a commit that referenced this pull request Nov 7, 2023
* refactor/keyring-errors-helpers:
  [Miner] feat: add `TxClient` (#94)
  [CI] Build container images (#107)
  fix: flaky block client test (#132)
bryanchriswhite added a commit that referenced this pull request Nov 7, 2023
…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)
  ...
Olshansk added a commit that referenced this pull request Nov 7, 2023
* chore: add `TxClient` interface

* chore: add option support to `ReplayObservable`

* feat: add `txClient` implementation

* test: `txClient`

* test: tx client integration

* chore: s/tx/transaction/g

* chore: update pkg README.md template

* wip: client pkg README

* docs: fix client pkg godoc comment

* fix: flakey test

* chore: dial back godoc comments 😅

* chore: revise (and move to godoc.go) `testblock` & `testeventsquery` pkg godoc comment

* chore: update go.mod

* chore: refactor & condense godoc comments

* chore: fix import paths post-update

* chore: review feedback improvements

* docs: update client README.md

* docs: add `tx query` usage association between `txContext` & `Blockchain`

* docs: add TOC

* chore: review feedback improvements

Co-authored-by: Daniel Olshansky <[email protected]>

* docs: improve godoc comments & client README.md

---------

Co-authored-by: Daniel Olshansky <[email protected]>
Olshansk added a commit that referenced this pull request Nov 7, 2023
* chore: add `TxClient` interface

* chore: add option support to `ReplayObservable`

* feat: add `txClient` implementation

* test: `txClient`

* test: tx client integration

* chore: s/tx/transaction/g

* chore: update pkg README.md template

* wip: client pkg README

* docs: fix client pkg godoc comment

* fix: flakey test

* chore: dial back godoc comments 😅

* chore: revise (and move to godoc.go) `testblock` & `testeventsquery` pkg godoc comment

* chore: update go.mod

* chore: refactor & condense godoc comments

* chore: fix import paths post-update

* chore: review feedback improvements

* docs: update client README.md

* docs: add `tx query` usage association between `txContext` & `Blockchain`

* docs: add TOC

* chore: review feedback improvements

Co-authored-by: Daniel Olshansky <[email protected]>

* docs: improve godoc comments & client README.md

---------

Co-authored-by: Daniel Olshansky <[email protected]>
Olshansk added a commit that referenced this pull request Nov 7, 2023
* chore: add `TxClient` interface

* chore: add option support to `ReplayObservable`

* feat: add `txClient` implementation

* test: `txClient`

* test: tx client integration

* chore: s/tx/transaction/g

* chore: update pkg README.md template

* wip: client pkg README

* docs: fix client pkg godoc comment

* fix: flakey test

* chore: dial back godoc comments 😅

* chore: revise (and move to godoc.go) `testblock` & `testeventsquery` pkg godoc comment

* chore: update go.mod

* chore: refactor & condense godoc comments

* chore: fix import paths post-update

* chore: review feedback improvements

* docs: update client README.md

* docs: add `tx query` usage association between `txContext` & `Blockchain`

* docs: add TOC

* chore: review feedback improvements

Co-authored-by: Daniel Olshansky <[email protected]>

* docs: improve godoc comments & client README.md

---------

Co-authored-by: Daniel Olshansky <[email protected]>
okdas pushed a commit that referenced this pull request Nov 14, 2024
* chore: add `TxClient` interface

* chore: add option support to `ReplayObservable`

* feat: add `txClient` implementation

* test: `txClient`

* test: tx client integration

* chore: s/tx/transaction/g

* chore: update pkg README.md template

* wip: client pkg README

* docs: fix client pkg godoc comment

* fix: flakey test

* chore: dial back godoc comments 😅

* chore: revise (and move to godoc.go) `testblock` & `testeventsquery` pkg godoc comment

* chore: update go.mod

* chore: refactor & condense godoc comments

* chore: fix import paths post-update

* chore: review feedback improvements

* docs: update client README.md

* docs: add `tx query` usage association between `txContext` & `Blockchain`

* docs: add TOC

* chore: review feedback improvements

Co-authored-by: Daniel Olshansky <[email protected]>

* docs: improve godoc comments & client README.md

---------

Co-authored-by: Daniel Olshansky <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
miner Changes related to the Miner
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[Miner] Foundation for the Miner submodule
2 participants