-
Notifications
You must be signed in to change notification settings - Fork 33
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
[Utility] Session Interface - GetSession
Implementation (1st iteration)
#683
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing changelog in module: build/
Missing changelog in module: persistence/
Missing changelog in module: runtime/
Missing changelog in module: shared/
Missing changelog in module: utility/
Changelog verification failed. See error messages for more detail.
Please update the relevant CHANGELOG.md files and ensure they follow the correct format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing changelog in module: build/
Missing changelog in module: persistence/
Missing changelog in module: runtime/
Missing changelog in module: shared/
Missing changelog in module: utility/
Changelog verification failed. See error messages for more detail.
Please update the relevant CHANGELOG.md files and ensure they follow the correct format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing changelog in module: build/
Missing changelog in module: persistence/
Missing changelog in module: runtime/
Missing changelog in module: shared/
Missing changelog in module: utility/
Changelog verification failed. See error messages for more detail.
Please update the relevant CHANGELOG.md files and ensure they follow the correct format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing changelog in module: build/
Missing changelog in module: persistence/
Missing changelog in module: runtime/
Missing changelog in module: shared/
Missing changelog in module: utility/
Changelog verification failed. See error messages for more detail.
Please update the relevant CHANGELOG.md files and ensure they follow the correct format.
Removes the unneeded `stdnetwork` package. Covers removal goal of #266. The simplification goal is tracked by #553. TLDR; should close #266. Please mark the relevant option(s): - [ ] New feature, functionality or library - [ ] Bug fix - [x] Code health or cleanup - [ ] Major breaking change - [ ] Documentation - [ ] Other <!-- add details here if it a different type of change --> - Removed unneeded `stdnetwork` package - Removed unneeded `use_rain_tree` P2P config field - [ ] `make develop_test`; if any code changes were made - [x] [Docker Compose LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md); if any major functionality was changed or introduced - [x] [k8s LocalNet](https://github.com/pokt-network/pocket/blob/main/build/localnet/README.md); if any infrastructure or configuration changes were made - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added, or updated, [`godoc` format comments](https://go.dev/blog/godoc) on touched members (see: [tip.golang.org/doc/comment](https://tip.golang.org/doc/comment)) - [ ] I have tested my changes using the available tooling - [ ] I have updated the corresponding CHANGELOG - [ ] I have updated the corresponding README(s); local and/or global - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added, or updated, [mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding README(s) - [ ] I have added, or updated, documentation and [mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*` if I updated `shared/*`README(s)
## Description Refactors everything in the P2P module which previously referred to a "network" to instead be thought of as a "router". This begins with the `typesP2P.Network` interface and the changes propagates down from there, through implementations and into variable names, tests, etc. ## Issue Fixes #<issue_number> ## Type of change Please mark the relevant option(s): - [ ] New feature, functionality or library - [ ] Bug fix - [x] Code health or cleanup - [ ] Major breaking change - [ ] Documentation - [ ] Other <!-- add details here if it a different type of change --> ## List of changes - Renamed `Network` interface to `Router` - Shortened `Router#NetworkBroadcast` to `#Broadcast` - Shortened `Router#NetworkSend` to `#Send` - Shortened `Router#networkSendInternal` to `#sendInternal` - Shortened `Router#networkBroadcastAtLevel` to `#broadcastAtLevel` - Renamed `rainTreeNetwork` to `rainTreeRouter` - Renamed `rainTreeNetwork` method receivers - Renamed `p2pModule#network` to `#router` - Renamed `p2pModule#setupNetwork()` to `#setupRouter()` - Renamed config var in `rainTreeRouter#Create` - Renamed router logger - Renamed `NewRainTreeNetwork()` to `NewRainTreeRouter()` - Refactored peers_manager_test.go - Refactored network_test.go - Simplified p2p module/router config handoff - Updated debug logging ## Testing - [ ] `make develop_test`; if any code changes were made - [ ] [Docker Compose LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md); if any major functionality was changed or introduced - [ ] [k8s LocalNet](https://github.com/pokt-network/pocket/blob/main/build/localnet/README.md); if any infrastructure or configuration changes were made ## Required Checklist - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added, or updated, [`godoc` format comments](https://go.dev/blog/godoc) on touched members (see: [tip.golang.org/doc/comment](https://tip.golang.org/doc/comment)) - [ ] I have tested my changes using the available tooling - [ ] I have updated the corresponding CHANGELOG ### If Applicable Checklist - [ ] I have updated the corresponding README(s); local and/or global - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added, or updated, [mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding README(s) - [ ] I have added, or updated, documentation and [mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*` if I updated `shared/*`README(s)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 minor nits, nothing showstopping. Passes tests on my machine. ✅ Let's get this merged 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing changelog in module: logger/
Missing changelog in module: p2p/
Changelog verification failed. See error messages for more detail.
Please update the relevant CHANGELOG.md files and ensure they follow the correct format.
The check succeeded, dismissing the review comment.
Description
The first implementation of the session interface; the
GetSession
UtilityModule function.Issue
Fixes #569
AI-Generated Summary
This pull request includes updates and improvements to various files related to the configuration of local environments, setting up sessions and actors, and enhancing the test suite for several modules. Significant changes include the addition of new parameters and properties for fishermen, introduction of the Session message in the session.proto file, a new test file module_test.go for the utility package, and multiple updates to the gov.go file.
Additional enhancements encompass renaming files, removing unnecessary functions, adding and updating tests and test artifacts, implementing new methods and functions, and making minor formatting and optimization changes. Furthermore, ideas for future improvements and optimizations have been marked with TechDebt, suggesting potential refactoring or redesign later in development. Overall, these changes aim to make the codebase more maintainable, readable and efficient, while also extending the functionality of several modules.
Type of change
Please mark the relevant option(s):
List of changes
Primary Changes
Session
protobufGetSession
function to the Utility module interfaceGetSession
function from the Utility module interfacesessionHydrator
structure used to populate a new sessionfisherman_per_session
governance parameterSupplementary Changes
UtilityModule
interface implementationGetActor
function to the Persistence module interfaceGetActor
persistence modular functionNewGenesisState
helper for more thorough testingSecondary Changes
blocks_per_session
from4
to1
Testing
make develop_test
; if any code changes were madeRequired Checklist
godoc
format comments on touched members (see: tip.golang.org/doc/comment)If Applicable Checklist
shared/docs/*
if I updatedshared/*
README(s)