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

[Relayer] feat: Add Relayer struct #172

Merged
merged 45 commits into from
Nov 10, 2023
Merged

[Relayer] feat: Add Relayer struct #172

merged 45 commits into from
Nov 10, 2023

Conversation

red-0ne
Copy link
Contributor

@red-0ne red-0ne commented Nov 9, 2023

Summary

AI Summary

Summary generated by Reviewpad on 10 Nov 23 22:33 UTC

This pull request includes the following changes:

  • In pkg/relayer/interface.go, the import statement for github.com/pokt-network/poktroll/x/service/types has been removed and replaced with types.
  • In pkg/relayer/proxy/proxy.go, the comment for the Start method has been updated to clarify that it is blocking as long as all RelayServers are running.
  • A new file pkg/relayer/relayminer.go has been added, which contains a new struct relayMiner and its corresponding methods.
  • In pkg/relayer/session/session.go, there is a typo fix in a comment, changing "attampting" to "attempting".

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_develop_and_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

@red-0ne red-0ne added relayminer Changes related to the Relayminer off-chain Off-chain business logic labels Nov 9, 2023
@red-0ne red-0ne added this to the Shannon TestNet milestone Nov 9, 2023
@red-0ne red-0ne self-assigned this Nov 9, 2023
@red-0ne red-0ne changed the base branch from main to issues/13/feat/miner November 9, 2023 19:11
pkg/relayer/relayer.go Outdated Show resolved Hide resolved
pkg/relayer/relayer.go Outdated Show resolved Hide resolved
pkg/relayer/relayer.go Outdated Show resolved Hide resolved
pkg/relayer/relayer.go Outdated Show resolved Hide resolved
pkg/relayer/relayer.go Outdated Show resolved Hide resolved
bryanchriswhite and others added 11 commits November 9, 2023 21:16
* pokt/main:
  [Off-chain] feat: observable utils (#171)
  [Off-chain] refactor: `MapFn`s receive context arg (#170)
RelayerOption parameter
- Fixed helpers for localnet regenesis
- Added an application & supplier to the genesis file
- Initializing appMap & supplierMap in E2E tests
- Add support for the app's codec (for unmarshaling responses) in E2E tests
- Adding a placeholder for `e2e/tests/relay.feature`

---

Co-authored-by: harry <[email protected]>
* refactor: `MapFn`s receive context arg

* feat: add `MapExpand` observable operator

* refactor: `RelayerSessionsManager` to be more reactive

* chore: add godoc comment

* chore: review feedback improvements

* trigger CI
* pokt/main:
  [Relayer] refactor: simplify `RelayerSessionsManager`  (#169)
  [Test] First step for automated E2E Relay test (#167)
@red-0ne red-0ne changed the title [Relayer] Feat/relayer [Relayer] feat: Add Relayer struct Nov 9, 2023
@red-0ne red-0ne changed the base branch from issues/13/feat/miner to main November 10, 2023 21:37
@red-0ne red-0ne marked this pull request as ready for review November 10, 2023 21:39
@Olshansk Olshansk requested a review from h5law November 10, 2023 21:47
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.

A couple small comments & questions, but no blockers!

pkg/relayer/relayminer.go Outdated Show resolved Hide resolved
pkg/relayer/relayminer.go Outdated Show resolved Hide resolved
pkg/relayer/relayminer.go Show resolved Hide resolved
@red-0ne red-0ne merged commit 2673bb2 into main Nov 10, 2023
7 checks passed
bryanchriswhite added a commit that referenced this pull request Nov 11, 2023
* pokt/relayer/cli:
  [AppGate] Implement the MVP AppGateServer (#108)
  chore: Improve comment about startig relayer proxy
  [Relayer] feat: Add Relayer struct (#172)
  feat: Use relay miner to start
  chore: Reflect responsibility changes of session manager
  [Miner] feat: add `Miner` component (#168)
  fix: Update Miner interface
  chore: update start mining comment
  chore: Remove unused RelayerOption parameter
  chore: Rename relay miner file
  chore: Rename to RelayMiner
  feat: Add Relayer struct
okdas pushed a commit that referenced this pull request Nov 14, 2024
* refactor: `MapFn`s receive context arg

* chore: add `ForEach` map shorthand operator

* chore: add `/pkg/observable/filter`

* chore: add `/pkg/observable/logging`

* chore: add `/pkg/relayer/protocol`

* chore: add `Miner` interface

* feat: add `Miner` implementation

* test: `Miner` implementation

* chore: fix comment

* chore: add godoc comments

* feat: Add Relayer struct

* chore: Rename to RelayMiner

* chore: Rename relay miner file

* chore: Remove unused
RelayerOption parameter

* [Test] First step for automated E2E Relay test (#167)

- Fixed helpers for localnet regenesis
- Added an application & supplier to the genesis file
- Initializing appMap & supplierMap in E2E tests
- Add support for the app's codec (for unmarshaling responses) in E2E tests
- Adding a placeholder for `e2e/tests/relay.feature`

---

Co-authored-by: harry <[email protected]>

* [Relayer] refactor: simplify `RelayerSessionsManager`  (#169)

* refactor: `MapFn`s receive context arg

* feat: add `MapExpand` observable operator

* refactor: `RelayerSessionsManager` to be more reactive

* chore: add godoc comment

* chore: review feedback improvements

* trigger CI

* chore: review feedback improvements

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

* chore: review feedback improvements

* chore: update start mining comment

* fix: Update Miner interface

* fix: import cycle & goimports

* chore: review feedback improvements

* chore: cleanup TODO_THIS_COMMIT comments

* chore: improve var & func names for clarity and consistency

* refactor: move claim/proof lifecycle concerns to `relayerSessionsManager`.

* chore: review feedback improvements

* chore: review feedback improvements

* refactor: `miner#hash()` method

* chore: tidy up

* chore: simplify

* chore: review feedback improvements

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

* chore: review feedback improvements

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

* chore: review feedback improvements

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

* chore: review feedback improvements

* chore: review feedback improvements

* fix: incomplete refactor

* chore: simplify

* chore: Reflect responsibility changes of session manager

* chore: Improve comments about waitgroup

---------

Co-authored-by: Bryan White <[email protected]>
Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: harry <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
off-chain Off-chain business logic relayminer Changes related to the Relayminer
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants