-
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] Local Proof of Stake Code Health Preparation #111
Labels
Milestone
Comments
Olshansk
added
utility
Utility specific changes
code health
Nice to have code improvement
priority:medium
labels
Jul 14, 2022
andrewnguyen22
pushed a commit
that referenced
this issue
Jul 22, 2022
…tence-foundation-interim-merge' into issue-#111
andrewnguyen22
pushed a commit
that referenced
this issue
Jul 27, 2022
andrewnguyen22
pushed a commit
that referenced
this issue
Jul 30, 2022
# Objective Reduce the code footprint of the utility module, so it is more understandable to new readers while finding a balance between minimizing legacy complexity in the future and not over-generalizing the existing code. # Origin Document PR73 ([First iteration of a PostgreSQL based Persistence Schema](#73)) underwent several iterations in order to make the [persistence module implementation](https://github.com/pokt-network/pocket/tree/main/persistence) have the optionality to remain verbose on a per-actor basis but also avoid code duplication and redundancy. The first iteration of the [utility module](https://github.com/pokt-network/pocket/tree/main/persistence) did not undergo the same iterations and therefore has some low-hanging fruit to simplify the codebase before further functionality is added. # Goals / Deliverables - [x] Extract common actor functionality into general interfaces - [x] Reduce the code complexity and code footprint so it is more approachable and maintainable - [ ] Identify and document/cleanup parts of the code that are unclear to new readers - [x] Generalize both unit tests and functionality where possible - [x] Maintain verbose entry points for each actor General: - [x] Update the CHANGELOG - [x] Update the README - [x] Update the global documentation & references - [x] Document small issues / TODOs along the way ## Testing Methodology - **Utility tests**: `make test_utility_*` - **All tests**: `make test_all` - **LocalNet**: works following the instructions in [docs/development](https://github.com/pokt-network/pocket/tree/main/docs/development) ## Non-goals - Adding any new functionality --- ## Changes Made - Removed transaction fees from the transaction structure as fees will be enforced at the state level - Removed actor specific messages (besides DoubleSign) and added actorType field to the struct - Removed pause messages and functionality as it is out of scope for the current POS iteration - Removed session and test-scoring as it's out of scope for the current POS iteration - Consolidated unit test functionality for actors - Modified pre-persistence to match persistence for Update(actor), 'amountToAdd' is now just 'amount' ## Future work - There's more documentation that is needed for this to be complete. In a separate issue, I'd like to tackle connecting Utility with Persistence. - Further cleanup / refactoring / optimizations can be made, but that can be left to future iteration of the module. --- Co-authored-by: Daniel Olshansky <olshansky.daniel@gmail.com> Co-authored-by: Andrew Nguyen <andrewnguyen@Andrews-MacBook-Pro-2.local> Co-authored-by: Andrew Nguyen <andrewnguyen@Andrews-MBP-2.lan> Co-authored-by: Daniel Olshansky <olshansky@pokt.network>
16 tasks
Olshansk
modified the milestones:
Utility - Local Proof of Stake,
M1: Pocket PoS (Proof of Stake)
Aug 22, 2022
@andrewnguyen22 Is there any other work you were thinking of doing here? |
Closing this out as we tended to some of the work in other PRs and the scope is too large to capture. Follow up issues will be created where necessary. |
Repository owner
moved this from In Progress
to Done
in V1 Dashboard
Sep 4, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Objective
Reduce the code footprint of the utility module so it is more understandble to new readers while finding a balance between minimizing legacy complexity in the future and not over-generalizing the existing code.
Origin Document
PR73 (First iteration of a PostgreSQL based Persistence Schema) underwent several iterations in order to make the persistence module implementation have the optionality to remain verbose on a per-actor basis but also avoid code duplication and redundancy.
The first iteration of the utility module did not undergo the same iterations and therefore has some low-hanging fruit to simplify the codebase before further functionality is added.
Goals / Deliverables
General:
Testing Methodology
make test_utility_*
make test_all
Non-goals
Creator: @Olshansk
Co-Owners: @andrewnguyen22
The text was updated successfully, but these errors were encountered: