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] refactor: simplify RelayerSessionsManager #169

Merged
merged 8 commits into from
Nov 9, 2023

Conversation

bryanchriswhite
Copy link
Contributor

@bryanchriswhite bryanchriswhite commented Nov 9, 2023

Summary

Human Summary

(See the AI summary, it's actually decent)

AI Summary

Summary generated by Reviewpad on 09 Nov 23 20:17 UTC

This pull request includes the following changes:

  • Added a new function MapExpand in the pkg/observable/channel/map.go file, which transforms the given observable by applying a transform function to each notification received from the observable and returns a slice of output notifications for each input notification.
  • Updated the import statement in the pkg/relayer/session/session.go file to use the renamed package github.com/pokt-network/poktroll/pkg/client.
  • Updated the type declaration of the blockClient field in the relayerSessionsManager struct in the pkg/relayer/session/session.go file to use the new type client.BlockClient.
  • Updated the initialization of the sessionsToClaim field in the NewRelayerSessions function in the pkg/relayer/session/session.go file to use the new MapExpand function.
  • Added a new mapBlockToSessionsToClaim function in the relayerSessionsManager struct in the pkg/relayer/session/session.go file, which maps a block to a list of sessions that can be claimed as of that block.

Issue

  • #{ISSUE_NUMBER}

[Explain the reasoning for the PR in 1-2 sentences. Consider adding a link or a screenshot.]

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

@bryanchriswhite bryanchriswhite added relayminer Changes related to the Relayminer off-chain Off-chain business logic labels Nov 9, 2023
@bryanchriswhite bryanchriswhite added this to the Shannon TestNet milestone Nov 9, 2023
@bryanchriswhite bryanchriswhite self-assigned this Nov 9, 2023
@bryanchriswhite bryanchriswhite force-pushed the issues/13/refactor/relayer_sessions_manager branch from ba6adc7 to 1881918 Compare November 9, 2023 13:50
@bryanchriswhite bryanchriswhite force-pushed the issues/13/refactor/relayer_sessions_manager branch from 1881918 to 1a033d3 Compare November 9, 2023 13:52
@bryanchriswhite bryanchriswhite marked this pull request as ready for review November 9, 2023 13:57
@bryanchriswhite bryanchriswhite changed the base branch from issues/13/refactor/map to issues/13/feat/observable-utils November 9, 2023 15:34
@bryanchriswhite bryanchriswhite changed the base branch from issues/13/feat/observable-utils to issues/13/refactor/map November 9, 2023 15:35
@bryanchriswhite bryanchriswhite force-pushed the issues/13/refactor/relayer_sessions_manager branch from 3e7f2b0 to a9d809e Compare November 9, 2023 15:50
@Olshansk
Copy link
Member

Olshansk commented Nov 9, 2023

(See the AI summary, it's actually decent)

😆

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.

Minor changes for requests but should be quick

pkg/observable/channel/map.go Outdated Show resolved Hide resolved
pkg/relayer/session/session.go Outdated Show resolved Hide resolved
…yer_sessions_manager

* pokt/main:
  [Off-chain] refactor: `MapFn`s receive context arg (#170)
@bryanchriswhite bryanchriswhite changed the base branch from issues/13/refactor/map to main November 9, 2023 20:01
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.

Thank you for making the changes!

@bryanchriswhite bryanchriswhite merged commit 7e7cc8d into main Nov 9, 2023
7 checks passed
@bryanchriswhite bryanchriswhite deleted the issues/13/refactor/relayer_sessions_manager branch November 9, 2023 20:25
bryanchriswhite added a commit that referenced this pull request Nov 9, 2023
* 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
bryanchriswhite added a commit that referenced this pull request Nov 9, 2023
* pokt/main:
  [Relayer] refactor: simplify `RelayerSessionsManager`  (#169)
  [Test] First step for automated E2E Relay test (#167)
bryanchriswhite added a commit that referenced this pull request Nov 10, 2023
* 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

* [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

* 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

---------

Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: harry <[email protected]>
red-0ne added a commit that referenced this pull request Nov 10, 2023
* 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]>
bryanchriswhite added a commit that referenced this pull request Nov 16, 2023
* 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

* wip: relayer CLI

* chore: finish first pass

* 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

* chore: tidy up cmd creation

* fix: incomplete refactor

* chore: simplify

* chore: add log lines

* wip: react to miner, refactor, construct miner, refactor

* chore: cleanup

* chore: Reflect responsibility changes of session manager

* feat: Use relay miner to start

* [WIP] Updating relay.feature to run curl command

* chore: Improve comment about startig relayer proxy

* wip: debugging

* Continued implementation but still failing

* Getting an invalid request right now but figuring it out...

* wip: debugging

* Added service and switched to AppGate

* wip: debugging

* chore: Rename falg variables

* wip: debugging

* revertme: disable tilt relayer service

* chore: use arg not flag

* chore: rename command

* Debugging checkpoint

* wip: debugging - improvments

* wip: debugging

* wip: debugging

* wip: debugging

* revert-or-fixme: add error log lines

* revert-or-fixme: add debug log lines

* fix: set relay server handle function

* revert-or-fixme: add debug log lines

* chore: rename some chan vars

* feat: fix all bugs, e2e relay works

* chore: add some todo comments

* wip: debugging

* fix: use remote helm charts again

* fix: put adequate proxied services endpoitns, prevent session republishing

* chore: Refactor JSONRPCServer and server builder

* Upate a couple small comments in the maketfile

* revert: comment relayers out of tiltfile

* chore: fix subcmd name `relayerminer` -> `relayminer`

* chore: improve logging

* chore: cleanup error messaging & logging in appgate server

* refactor: rename misnamed `jsonRPCServer` receiver var

* chore: remove appgate server debug log

* chore: unexport `relayMiner` struct

* refactor: interrupt signal handling

* chore: improve comments

* chore: improve comments

* revert: tiltfile hot-reload dirs

* refactor: re-consolidate client contexts

* fix: typo

* chore: remove todo

* chore: add todo comment

* revert: comment change

* fix: error format strings

* chore: remove comment

* fix: error format strings

* chore: add `-features-path` flag to cucumber tests

* fix: set the relayminer URL in the curl cmd

* chore: remove redundant `-X` curl arg (says curl)

* squash: fix relayminer url: reword: s/relayminer/appgateserver/

* chore: improve error messaging

* fix: curl invocation

* test: implement step definition to assert agains relay response

* chore: improve error name & messaging

* Self review

* fixup: merge upstream

* chore: review feedback improvements

* chore: update anvil service port in make targets

* chore: review feedback improvements

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

* refactor: relayminer depinject helpers & godoc comments on all constructors

* refactor: separate tx and query client contexts 🙄

* fix: sessiontree store path check

* fix: sessiontree store path check

* chore: review feedback improvements

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

* chore: review feedback improvements

* chore: add long command description

* fix: supplier client test

* chore: cleanup flags and dependencies for appgateserver cmd

* chore: move shared dependency setup logic to shared pkg

* chore: update comment

* Update .gitignore

* Update OpenAPI spec

* Updated comments for post 177+179 work for okdas

* Update pkg/relayer/cmd/cmd.go

* Update the names and references to queryNode/sequencerNode/fullNode etc

* Update some comments and TODOs

* Added a couple more comments

* More tiny comment updates

* chore: review feedback improvements

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

---------

Co-authored-by: Redouane Lakrache <[email protected]>
Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: harry <[email protected]>
bryanchriswhite added a commit that referenced this pull request Nov 17, 2023
* 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

* wip: relayer CLI

* chore: finish first pass

* 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

* chore: tidy up cmd creation

* fix: incomplete refactor

* chore: simplify

* chore: add log lines

* wip: react to miner, refactor, construct miner, refactor

* chore: cleanup

* chore: Reflect responsibility changes of session manager

* feat: Use relay miner to start

* [WIP] Updating relay.feature to run curl command

* chore: Improve comment about startig relayer proxy

* wip: debugging

* Continued implementation but still failing

* Getting an invalid request right now but figuring it out...

* wip: debugging

* Added service and switched to AppGate

* wip: debugging

* chore: Rename falg variables

* wip: debugging

* revertme: disable tilt relayer service

* chore: use arg not flag

* chore: rename command

* Debugging checkpoint

* wip: debugging - improvments

* wip: debugging

* wip: debugging

* wip: debugging

* revert-or-fixme: add error log lines

* revert-or-fixme: add debug log lines

* fix: set relay server handle function

* revert-or-fixme: add debug log lines

* chore: rename some chan vars

* feat: fix all bugs, e2e relay works

* chore: add some todo comments

* wip: debugging

* fix: use remote helm charts again

* fix: put adequate proxied services endpoitns, prevent session republishing

* chore: Refactor JSONRPCServer and server builder

* Upate a couple small comments in the maketfile

* revert: comment relayers out of tiltfile

* chore: fix subcmd name `relayerminer` -> `relayminer`

* chore: improve logging

* chore: cleanup error messaging & logging in appgate server

* refactor: rename misnamed `jsonRPCServer` receiver var

* chore: remove appgate server debug log

* chore: unexport `relayMiner` struct

* refactor: interrupt signal handling

* chore: improve comments

* chore: improve comments

* revert: tiltfile hot-reload dirs

* refactor: re-consolidate client contexts

* fix: typo

* chore: remove todo

* chore: add todo comment

* revert: comment change

* fix: error format strings

* chore: remove comment

* fix: error format strings

* chore: add `-features-path` flag to cucumber tests

* fix: set the relayminer URL in the curl cmd

* chore: remove redundant `-X` curl arg (says curl)

* squash: fix relayminer url: reword: s/relayminer/appgateserver/

* chore: improve error messaging

* fix: curl invocation

* test: implement step definition to assert agains relay response

* chore: improve error name & messaging

* Self review

* fixup: merge upstream

* chore: review feedback improvements

* chore: update anvil service port in make targets

* chore: review feedback improvements

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

* refactor: relayminer depinject helpers & godoc comments on all constructors

* refactor: separate tx and query client contexts 🙄

* fix: sessiontree store path check

* fix: sessiontree store path check

* chore: review feedback improvements

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

* chore: review feedback improvements

* chore: add long command description

* fix: supplier client test

* chore: cleanup flags and dependencies for appgateserver cmd

* chore: move shared dependency setup logic to shared pkg

* chore: update comment

* Update .gitignore

* Update OpenAPI spec

* Updated comments for post 177+179 work for okdas

* Update pkg/relayer/cmd/cmd.go

* Update the names and references to queryNode/sequencerNode/fullNode etc

* Update some comments and TODOs

* Added a couple more comments

* More tiny comment updates

* chore: review feedback improvements

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

* chore: add silent w/ error flag to curl

* refactor: observable types to work around gomock

* fix: `relayMiner#Stop()`

* test: relayminer

* chore: add godoc comments

* chore: add comments

* chore: review feedback improvements

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

---------

Co-authored-by: Redouane Lakrache <[email protected]>
Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: harry <[email protected]>
bryanchriswhite added a commit that referenced this pull request Nov 18, 2023
* 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

* wip: relayer CLI

* chore: finish first pass

* 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

* chore: tidy up cmd creation

* fix: incomplete refactor

* chore: simplify

* chore: add log lines

* wip: react to miner, refactor, construct miner, refactor

* chore: cleanup

* chore: Reflect responsibility changes of session manager

* feat: Use relay miner to start

* [WIP] Updating relay.feature to run curl command

* chore: Improve comment about startig relayer proxy

* wip: debugging

* Continued implementation but still failing

* Getting an invalid request right now but figuring it out...

* wip: debugging

* Added service and switched to AppGate

* wip: debugging

* chore: Rename falg variables

* wip: debugging

* revertme: disable tilt relayer service

* chore: use arg not flag

* chore: rename command

* Debugging checkpoint

* wip: debugging - improvments

* wip: debugging

* wip: debugging

* wip: debugging

* revert-or-fixme: add error log lines

* revert-or-fixme: add debug log lines

* fix: set relay server handle function

* revert-or-fixme: add debug log lines

* chore: rename some chan vars

* feat: fix all bugs, e2e relay works

* chore: add some todo comments

* wip: debugging

* fix: use remote helm charts again

* fix: put adequate proxied services endpoitns, prevent session republishing

* chore: Refactor JSONRPCServer and server builder

* Upate a couple small comments in the maketfile

* revert: comment relayers out of tiltfile

* chore: fix subcmd name `relayerminer` -> `relayminer`

* chore: improve logging

* chore: cleanup error messaging & logging in appgate server

* refactor: rename misnamed `jsonRPCServer` receiver var

* chore: remove appgate server debug log

* chore: unexport `relayMiner` struct

* refactor: interrupt signal handling

* chore: improve comments

* chore: improve comments

* revert: tiltfile hot-reload dirs

* refactor: re-consolidate client contexts

* fix: typo

* chore: remove todo

* chore: add todo comment

* revert: comment change

* fix: error format strings

* chore: remove comment

* fix: error format strings

* chore: add `-features-path` flag to cucumber tests

* fix: set the relayminer URL in the curl cmd

* chore: remove redundant `-X` curl arg (says curl)

* squash: fix relayminer url: reword: s/relayminer/appgateserver/

* chore: improve error messaging

* fix: curl invocation

* test: implement step definition to assert agains relay response

* chore: improve error name & messaging

* Self review

* fixup: merge upstream

* chore: review feedback improvements

* chore: update anvil service port in make targets

* chore: review feedback improvements

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

* refactor: relayminer depinject helpers & godoc comments on all constructors

* refactor: separate tx and query client contexts 🙄

* fix: sessiontree store path check

* fix: sessiontree store path check

* chore: review feedback improvements

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

* chore: review feedback improvements

* chore: add long command description

* fix: supplier client test

* chore: cleanup flags and dependencies for appgateserver cmd

* chore: move shared dependency setup logic to shared pkg

* chore: update comment

* Update .gitignore

* Update OpenAPI spec

* Updated comments for post 177+179 work for okdas

* Update pkg/relayer/cmd/cmd.go

* Update the names and references to queryNode/sequencerNode/fullNode etc

* Update some comments and TODOs

* Added a couple more comments

* More tiny comment updates

* chore: review feedback improvements

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

* chore: add silent w/ error flag to curl

* refactor: count difficulty; bit resolution

* test: count difficulty

* chore: review feedback improvements

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

---------

Co-authored-by: Redouane Lakrache <[email protected]>
Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: harry <[email protected]>
okdas pushed a commit that referenced this pull request Nov 14, 2024
* 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
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

* [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

* 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

---------

Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: harry <[email protected]>
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]>
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

* wip: relayer CLI

* chore: finish first pass

* 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

* chore: tidy up cmd creation

* fix: incomplete refactor

* chore: simplify

* chore: add log lines

* wip: react to miner, refactor, construct miner, refactor

* chore: cleanup

* chore: Reflect responsibility changes of session manager

* feat: Use relay miner to start

* [WIP] Updating relay.feature to run curl command

* chore: Improve comment about startig relayer proxy

* wip: debugging

* Continued implementation but still failing

* Getting an invalid request right now but figuring it out...

* wip: debugging

* Added service and switched to AppGate

* wip: debugging

* chore: Rename falg variables

* wip: debugging

* revertme: disable tilt relayer service

* chore: use arg not flag

* chore: rename command

* Debugging checkpoint

* wip: debugging - improvments

* wip: debugging

* wip: debugging

* wip: debugging

* revert-or-fixme: add error log lines

* revert-or-fixme: add debug log lines

* fix: set relay server handle function

* revert-or-fixme: add debug log lines

* chore: rename some chan vars

* feat: fix all bugs, e2e relay works

* chore: add some todo comments

* wip: debugging

* fix: use remote helm charts again

* fix: put adequate proxied services endpoitns, prevent session republishing

* chore: Refactor JSONRPCServer and server builder

* Upate a couple small comments in the maketfile

* revert: comment relayers out of tiltfile

* chore: fix subcmd name `relayerminer` -> `relayminer`

* chore: improve logging

* chore: cleanup error messaging & logging in appgate server

* refactor: rename misnamed `jsonRPCServer` receiver var

* chore: remove appgate server debug log

* chore: unexport `relayMiner` struct

* refactor: interrupt signal handling

* chore: improve comments

* chore: improve comments

* revert: tiltfile hot-reload dirs

* refactor: re-consolidate client contexts

* fix: typo

* chore: remove todo

* chore: add todo comment

* revert: comment change

* fix: error format strings

* chore: remove comment

* fix: error format strings

* chore: add `-features-path` flag to cucumber tests

* fix: set the relayminer URL in the curl cmd

* chore: remove redundant `-X` curl arg (says curl)

* squash: fix relayminer url: reword: s/relayminer/appgateserver/

* chore: improve error messaging

* fix: curl invocation

* test: implement step definition to assert agains relay response

* chore: improve error name & messaging

* Self review

* fixup: merge upstream

* chore: review feedback improvements

* chore: update anvil service port in make targets

* chore: review feedback improvements

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

* refactor: relayminer depinject helpers & godoc comments on all constructors

* refactor: separate tx and query client contexts 🙄

* fix: sessiontree store path check

* fix: sessiontree store path check

* chore: review feedback improvements

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

* chore: review feedback improvements

* chore: add long command description

* fix: supplier client test

* chore: cleanup flags and dependencies for appgateserver cmd

* chore: move shared dependency setup logic to shared pkg

* chore: update comment

* Update .gitignore

* Update OpenAPI spec

* Updated comments for post 177+179 work for okdas

* Update pkg/relayer/cmd/cmd.go

* Update the names and references to queryNode/sequencerNode/fullNode etc

* Update some comments and TODOs

* Added a couple more comments

* More tiny comment updates

* chore: review feedback improvements

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

---------

Co-authored-by: Redouane Lakrache <[email protected]>
Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: harry <[email protected]>
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

* wip: relayer CLI

* chore: finish first pass

* 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

* chore: tidy up cmd creation

* fix: incomplete refactor

* chore: simplify

* chore: add log lines

* wip: react to miner, refactor, construct miner, refactor

* chore: cleanup

* chore: Reflect responsibility changes of session manager

* feat: Use relay miner to start

* [WIP] Updating relay.feature to run curl command

* chore: Improve comment about startig relayer proxy

* wip: debugging

* Continued implementation but still failing

* Getting an invalid request right now but figuring it out...

* wip: debugging

* Added service and switched to AppGate

* wip: debugging

* chore: Rename falg variables

* wip: debugging

* revertme: disable tilt relayer service

* chore: use arg not flag

* chore: rename command

* Debugging checkpoint

* wip: debugging - improvments

* wip: debugging

* wip: debugging

* wip: debugging

* revert-or-fixme: add error log lines

* revert-or-fixme: add debug log lines

* fix: set relay server handle function

* revert-or-fixme: add debug log lines

* chore: rename some chan vars

* feat: fix all bugs, e2e relay works

* chore: add some todo comments

* wip: debugging

* fix: use remote helm charts again

* fix: put adequate proxied services endpoitns, prevent session republishing

* chore: Refactor JSONRPCServer and server builder

* Upate a couple small comments in the maketfile

* revert: comment relayers out of tiltfile

* chore: fix subcmd name `relayerminer` -> `relayminer`

* chore: improve logging

* chore: cleanup error messaging & logging in appgate server

* refactor: rename misnamed `jsonRPCServer` receiver var

* chore: remove appgate server debug log

* chore: unexport `relayMiner` struct

* refactor: interrupt signal handling

* chore: improve comments

* chore: improve comments

* revert: tiltfile hot-reload dirs

* refactor: re-consolidate client contexts

* fix: typo

* chore: remove todo

* chore: add todo comment

* revert: comment change

* fix: error format strings

* chore: remove comment

* fix: error format strings

* chore: add `-features-path` flag to cucumber tests

* fix: set the relayminer URL in the curl cmd

* chore: remove redundant `-X` curl arg (says curl)

* squash: fix relayminer url: reword: s/relayminer/appgateserver/

* chore: improve error messaging

* fix: curl invocation

* test: implement step definition to assert agains relay response

* chore: improve error name & messaging

* Self review

* fixup: merge upstream

* chore: review feedback improvements

* chore: update anvil service port in make targets

* chore: review feedback improvements

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

* refactor: relayminer depinject helpers & godoc comments on all constructors

* refactor: separate tx and query client contexts 🙄

* fix: sessiontree store path check

* fix: sessiontree store path check

* chore: review feedback improvements

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

* chore: review feedback improvements

* chore: add long command description

* fix: supplier client test

* chore: cleanup flags and dependencies for appgateserver cmd

* chore: move shared dependency setup logic to shared pkg

* chore: update comment

* Update .gitignore

* Update OpenAPI spec

* Updated comments for post 177+179 work for okdas

* Update pkg/relayer/cmd/cmd.go

* Update the names and references to queryNode/sequencerNode/fullNode etc

* Update some comments and TODOs

* Added a couple more comments

* More tiny comment updates

* chore: review feedback improvements

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

* chore: add silent w/ error flag to curl

* refactor: observable types to work around gomock

* fix: `relayMiner#Stop()`

* test: relayminer

* chore: add godoc comments

* chore: add comments

* chore: review feedback improvements

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

---------

Co-authored-by: Redouane Lakrache <[email protected]>
Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: harry <[email protected]>
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

* wip: relayer CLI

* chore: finish first pass

* 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

* chore: tidy up cmd creation

* fix: incomplete refactor

* chore: simplify

* chore: add log lines

* wip: react to miner, refactor, construct miner, refactor

* chore: cleanup

* chore: Reflect responsibility changes of session manager

* feat: Use relay miner to start

* [WIP] Updating relay.feature to run curl command

* chore: Improve comment about startig relayer proxy

* wip: debugging

* Continued implementation but still failing

* Getting an invalid request right now but figuring it out...

* wip: debugging

* Added service and switched to AppGate

* wip: debugging

* chore: Rename falg variables

* wip: debugging

* revertme: disable tilt relayer service

* chore: use arg not flag

* chore: rename command

* Debugging checkpoint

* wip: debugging - improvments

* wip: debugging

* wip: debugging

* wip: debugging

* revert-or-fixme: add error log lines

* revert-or-fixme: add debug log lines

* fix: set relay server handle function

* revert-or-fixme: add debug log lines

* chore: rename some chan vars

* feat: fix all bugs, e2e relay works

* chore: add some todo comments

* wip: debugging

* fix: use remote helm charts again

* fix: put adequate proxied services endpoitns, prevent session republishing

* chore: Refactor JSONRPCServer and server builder

* Upate a couple small comments in the maketfile

* revert: comment relayers out of tiltfile

* chore: fix subcmd name `relayerminer` -> `relayminer`

* chore: improve logging

* chore: cleanup error messaging & logging in appgate server

* refactor: rename misnamed `jsonRPCServer` receiver var

* chore: remove appgate server debug log

* chore: unexport `relayMiner` struct

* refactor: interrupt signal handling

* chore: improve comments

* chore: improve comments

* revert: tiltfile hot-reload dirs

* refactor: re-consolidate client contexts

* fix: typo

* chore: remove todo

* chore: add todo comment

* revert: comment change

* fix: error format strings

* chore: remove comment

* fix: error format strings

* chore: add `-features-path` flag to cucumber tests

* fix: set the relayminer URL in the curl cmd

* chore: remove redundant `-X` curl arg (says curl)

* squash: fix relayminer url: reword: s/relayminer/appgateserver/

* chore: improve error messaging

* fix: curl invocation

* test: implement step definition to assert agains relay response

* chore: improve error name & messaging

* Self review

* fixup: merge upstream

* chore: review feedback improvements

* chore: update anvil service port in make targets

* chore: review feedback improvements

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

* refactor: relayminer depinject helpers & godoc comments on all constructors

* refactor: separate tx and query client contexts 🙄

* fix: sessiontree store path check

* fix: sessiontree store path check

* chore: review feedback improvements

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

* chore: review feedback improvements

* chore: add long command description

* fix: supplier client test

* chore: cleanup flags and dependencies for appgateserver cmd

* chore: move shared dependency setup logic to shared pkg

* chore: update comment

* Update .gitignore

* Update OpenAPI spec

* Updated comments for post 177+179 work for okdas

* Update pkg/relayer/cmd/cmd.go

* Update the names and references to queryNode/sequencerNode/fullNode etc

* Update some comments and TODOs

* Added a couple more comments

* More tiny comment updates

* chore: review feedback improvements

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

* chore: add silent w/ error flag to curl

* refactor: count difficulty; bit resolution

* test: count difficulty

* chore: review feedback improvements

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

---------

Co-authored-by: Redouane Lakrache <[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.

2 participants