-
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
[CLI][Localnet][Bug] - [localnet_client_debug] Error 137 #607
Labels
Milestone
Comments
17 tasks
deblasis
added a commit
that referenced
this issue
Mar 24, 2023
…#608) ## Description This PR improves the keybase initialization by: - doing the work only if the `private_keys.yaml` has been changed - creating a backup of the keybase - loading it (which is way cheaper than parsing the yaml and rehydrating the keybase from scratch) ### Before At 1:46 I run `make localnet_client_debug` and you can see it takes a long time plus it's a very expensive operation https://user-images.githubusercontent.com/29378614/227202479-1320fdf4-f851-4a58-884e-a36b3c385b84.mp4 ### After At 1:12 I run `make localnet_client_debug` and it's basically instantaneous with no further spikes in CPU/RAM usage https://user-images.githubusercontent.com/29378614/227202494-a1eff819-e2d9-4881-a2e5-4b28448d574c.mp4 Where is the magic? We do the expensive operation only when needed and that means when the `private_keys.yaml` has changed. This is handled by a small binary that calculates the hash of the yaml file, compares it with the one we have already (if any) and if needed, it recreates a backup of the keybase that can be rehydrated from the debug client. Sloppy recording but it shows the whole process: https://user-images.githubusercontent.com/29378614/227204654-7b7f3ea8-6db5-473c-ac6c-75be13f60553.mp4 ## Issue Fixes #607 ## Type of change Please mark the relevant option(s): - [x] New feature, functionality or library - [x] Bug fix - [ ] Code health or cleanup - [ ] Major breaking change - [ ] Documentation - [ ] Other <!-- add details here if it a different type of change --> ## List of changes - Updated debug keybase initialization - Created small binary to help with the integrity check ## Testing - [x] `make develop_test` - [x] [LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md) w/ all of the steps outlined in the `README` <!-- REMOVE this comment block after following the instructions If you added additional tests or infrastructure, describe it here. Bonus points for images and videos or gifs. --> ## Required Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] 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)) - [x] I have tested my changes using the available tooling - [x] I have updated the corresponding CHANGELOG ### If Applicable Checklist - [ ] I have updated the corresponding README(s); local and/or global - [x] 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) --------- Co-authored-by: harry <[email protected]>
bryanchriswhite
added a commit
that referenced
this issue
Mar 28, 2023
…p-modules * pokt/main: [Utility][Persistence][Savepoints/Rollbacks] Refactor UtilityContext into UtilityUnitOfWork (Issue #563) (#577) [Consensus] Add Quorum Certificate to the block (#593) docs(wiki): ValueError: Duplicate wiki path: devlog/template (#620) Remove unused import [Infra][P2P] Bug: "address not found in peerstore" error in localnet_debug_client when scaling up Localnet - Issue #604 (#611) [CLI][Localnet][Bug] - [localnet_client_debug] Error 137 - Issue #607 (#608) [Documentation] Fix links to RPC module docs in README (#603)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Objective
Currently, the debug keybase is rehydrated from the
private_keys.yaml
that is embedded in the binary if it's built with the "debug" build tag.It works but it means that the rehydration process has to be performed every time the local keybase is emptied and that can happen a lot especially when developing with quick feedback loops in localnet with lots of
make localnet_down
followed bylocalnet_up
.We should improve this because it causes frustrations and slows down development.
Origin Document
Multiple conversations and first-hand experience. Just a fresh example:
I am also still experiencing random:
Goals
Deliverable
Non-goals / Non-deliverables
General issue deliverables
Testing Methodology
make ...
make test_all
LocalNet
is still functioning correctly by following the instructions at docs/development/README.mdCreator: @deblasis
Co-Owners: @gokutheengineer, @okdas
The text was updated successfully, but these errors were encountered: