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 supplier client #42

Merged
merged 32 commits into from
Nov 7, 2023
Merged

Conversation

bryanchriswhite
Copy link
Contributor

@bryanchriswhite bryanchriswhite commented Oct 10, 2023

Summary

Human Summary

Adds SupplierClient interface, implementation, and unit tests.

Summary generated by Reviewpad on 07 Nov 23 08:48 UTC

This pull request includes the following changes:

  1. Added a new file named "client.go" in the "internal/testclient/testtx" package. It contains various functions and types related to creating and using a client for transaction testing.

  2. Added a new file named "client_integration_test.go" in the "pkg/client/supplier" package. It contains an integration test for the "supplier" package.

  3. Changes were made to the "interface.go" file, including the addition of new methods and renaming of an existing method in the "SupplierClient" and "BlockClient" interfaces.

  4. Changes were made to the "context.go" file, including the addition of a new function and a comment indicating a TODO.

  5. Added a new test file named "client_test.go" in the "pkg/client/supplier" package. It contains test functions for testing the "NewSupplierClient", "CreateClaim", and "SubmitProof" functions of the "supplier" package.

  6. Added a new file named "options.go" in the "pkg/client/supplier" package. It defines a function named "WithSigningKeyName" that sets the "signingKeyName" field of the "supplierClient" struct.

  7. Modifications were made to the "keyring.go" file in the "internal/testclient" package, including the addition of a new function.

Issue

Relates to:

SupplierClient & BlockClient are dependencies of Miner.

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 test_all_unit
  • 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

Sorry, something went wrong.

@bryanchriswhite bryanchriswhite added the miner Changes related to the Miner label Oct 10, 2023
@bryanchriswhite bryanchriswhite added this to the Shannon TestNet milestone Oct 10, 2023
@bryanchriswhite bryanchriswhite self-assigned this Oct 10, 2023
@bryanchriswhite bryanchriswhite changed the base branch from main to feat/observable October 10, 2023 08:24
@bryanchriswhite bryanchriswhite force-pushed the feat/supplier-client branch 2 times, most recently from 493f900 to 40f1c69 Compare October 10, 2023 11:19
@bryanchriswhite bryanchriswhite changed the base branch from feat/observable to merge/observable_x_supplier-msgs October 10, 2023 11:20
@bryanchriswhite bryanchriswhite linked an issue Oct 10, 2023 that may be closed by this pull request
10 tasks
@bryanchriswhite bryanchriswhite changed the base branch from merge/observable_x_supplier-msgs to feat/block-client October 14, 2023 19:22
@bryanchriswhite bryanchriswhite changed the title [Miner] feat: add block & supplier clients [Miner] feat: add supplier client Oct 14, 2023
@bryanchriswhite bryanchriswhite force-pushed the feat/block-client branch 7 times, most recently from 5cba456 to 9955dbb Compare October 25, 2023 12:20
@bryanchriswhite bryanchriswhite changed the base branch from feat/block-client to feat/tx-client October 25, 2023 13:07
@bryanchriswhite bryanchriswhite force-pushed the feat/tx-client branch 3 times, most recently from 9d5b3a6 to 7ee554a Compare October 31, 2023 07:35
@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 marked this pull request as ready for review November 3, 2023 20:56
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.

@bryanchriswhite You mentioned some changes are being shown / not shown which is a result of merge/base branch issues.

Going to hold off until that's resolved to avoid review overhead.

https://github.com/pokt-network/poktroll/pull/42/files#r1382188801

* 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)
* feat/tx-client:
  chore: fix import paths post-update
  chore: refactor & condense godoc comments
  chore: update go.mod
  chore: revise (and move to godoc.go) `testblock` & `testeventsquery` pkg godoc comment
  [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)
* refactor/keyring-errors-helpers:
  chore: fix import paths post-update
  chore: refactor & condense godoc comments
  chore: update go.mod
  chore: revise (and move to godoc.go) `testblock` & `testeventsquery` pkg godoc comment
  [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)
@bryanchriswhite
Copy link
Contributor Author

@bryanchriswhite You mentioned some changes are being shown / not shown which is a result of merge/base branch issues.

Going to hold off until that's resolved to avoid review overhead.

https://github.com/pokt-network/poktroll/pull/42/files#r1382188801

This was definitely GitHub doing the wrong thing, I triple checked. The bizarre behavior nearly coincided with some service interruptions they experienced recently; perhaps there is a causal connection there. After poking it today, it seems to have decided to do the right thing.

…-helpers

* pokt/main:
  [Miner] feat: add `TxClient` (#94)
  [CI] Build container images (#107)
  fix: flaky block client test (#132)
* refactor/keyring-errors-helpers:
  [Miner] feat: add `TxClient` (#94)
  [CI] Build container images (#107)
  fix: flaky block client test (#132)
* pokt/main:
  [Off-chain] refactor: keyring errors & helpers (#131)
@bryanchriswhite bryanchriswhite changed the base branch from refactor/keyring-errors-helpers to main November 7, 2023 08:48
@bryanchriswhite bryanchriswhite merged commit 5b3fd95 into main Nov 7, 2023
@bryanchriswhite bryanchriswhite deleted the feat/supplier-client branch November 7, 2023 08:55
@bryanchriswhite bryanchriswhite linked an issue Nov 7, 2023 that may be closed by this pull request
10 tasks
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 pushed 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

* refactor: consolidate keyring errors & helpers

* refactor: keyring test helpers

* fix: flakey test

* chore: dial back godoc comments 😅

* chore: add `SupplierClient` interface

* feat: add supplier client implementation

* test:  supplier test helpers

* test: supplier client tests

* test: supplier client integration test

* chore: update go.mod

* trigger CI

* 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: add godoc comment
Olshansk pushed 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

* refactor: consolidate keyring errors & helpers

* refactor: keyring test helpers

* fix: flakey test

* chore: dial back godoc comments 😅

* chore: add `SupplierClient` interface

* feat: add supplier client implementation

* test:  supplier test helpers

* test: supplier client tests

* test: supplier client integration test

* chore: update go.mod

* trigger CI

* 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: add godoc comment
Olshansk pushed 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

* refactor: consolidate keyring errors & helpers

* refactor: keyring test helpers

* fix: flakey test

* chore: dial back godoc comments 😅

* chore: add `SupplierClient` interface

* feat: add supplier client implementation

* test:  supplier test helpers

* test: supplier client tests

* test: supplier client integration test

* chore: update go.mod

* trigger CI

* 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: add godoc comment
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

* refactor: consolidate keyring errors & helpers

* refactor: keyring test helpers

* fix: flakey test

* chore: dial back godoc comments 😅

* chore: add `SupplierClient` interface

* feat: add supplier client implementation

* test:  supplier test helpers

* test: supplier client tests

* test: supplier client integration test

* chore: update go.mod

* trigger CI

* 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: add godoc comment
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
3 participants