You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Description
<!-- reviewpad:summarize:start -->
### Summary generated by Reviewpad on 03 Aug 23 20:11 UTC
This pull request introduces several changes across multiple files.
Here is a summary of the changes:
1. `go.mod`:
- The `golang.org/x/text` dependency is now listed explicitly instead of being an indirect dependency.
2. `scenario_test.go`:
- Added a new feature called "State Sync Namespace" that includes various commands and waits for specific amounts of time.
- Code improvements and TODO comments have been added.
3. `FAQ.md`:
- Updated an issue related to starting LocalNet with SELinux on an operating system. Replaced the command `make compose_and_watch` with `make lightweight_localnet` to avoid permission denied errors.
4. `.gitignore`:
- Removed the entry "main" from the list of ignored files.
- Removed the entries "rpc/server.gen.go" and "rpc/client.gen.go" from the list of ignored files.
- Added the entry "**/gomock_reflect_*/" to ignore mock temporary files.
5. `e2e/README.md`:
- Added a new section on `Keywords`.
- Modified scenario descriptions and code examples to replace instances of "Validator" with "Node".
- Included a flowchart depicting the E2E scenarios with updated terminology.
6. Consensus module files:
- Added a new logging statement in the `HandleDebugMessage` function.
- Simplified the handling of the `DEBUG_CONSENSUS_RESET_TO_GENESIS` action.
7. `.tiltignore`:
- Removed the entry "main" from the list of ignored files.
- Removed the entries "rpc/server.gen.go" and "rpc/client.gen.go" from the list of ignored files.
8. `CHANGELOG.md`:
- Updated build commands and added a new section on `Keywords`.
9. `persistence/docs/CHANGELOG.md`:
- Several changes related to deprecation, addition, and fixing of functions and issues.
10. `validator.feature`:
- Renamed file from "valdator.feature" to "validator.feature".
- Updated scenario titles and step descriptions to use more descriptive terminology.
- Replaced references to "validator" with "node".
11. `tilt_helpers.go`:
- Added a new file containing functions related to syncing network configuration and checking package installation.
12. `debug.go`:
- Added new debug commands and subcommands.
- Updated existing functions and added new functions for debug actions.
13. `account.feature`:
- Added a new file containing scenarios for testing node account functionalities.
14. `README.md` files:
- Updated sections, titles, dependencies, and instructions in various README.md files.
15. `build/config/README.md`:
- Updated usage instructions, changing the command `make compose_and_watch` to `make lightweight_localnet`.
16. `iteration_3_end_to_end_tx.md`:
- Updated commands to start LocalNet and consensus debugger.
17. Deleted files:
- `validator.go`
- `watch_build.sh`
18. New files added:
- `debug.feature`
- `tilt_helpers.go`
- `account.feature`
Please let me know if you need more information about any specific change.
<!-- reviewpad:summarize:end -->
## Issue
Fixes par of #579
## Type of change
Please mark the relevant option(s):
- [x] New feature, functionality or library
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Major breaking change
- [ ] Documentation
- [ ] Other <!-- add details here if it a different type of change -->
## List of changes
- `s/compose_and_watch/lightweight_localnet` and all related helpers
- `s/validator/node` in e2e tests for clarity
- Add fire-and-forget `Debug` CLI w/ several useful initial subcommands
- Add `keywords` to the `e2e` document
- Add an `e2e debug` test to trigger views and track the blockchain increasing
- Avoid rebuilding the actors if the CLI changes
- Small miscellaneous improvements & code cleanup
## Testing
- [x] `make develop_test`; if any code changes were made
- [ ] `make test_e2e` on [k8s LocalNet](https://github.com/pokt-network/pocket/blob/main/build/localnet/README.md); if any code changes were made
- [ ] `e2e-devnet-test` passes tests on [DevNet](https://pocketnetwork.notion.site/How-to-DevNet-ff1598f27efe44c09f34e2aa0051f0dd); if any code was changed
- [ ] [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
- [x] I have performed a self-review of my own code
- [x] 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
- [x] 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: d7t <[email protected]>
Copy file name to clipboardExpand all lines: Makefile
+29-22
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ help:
38
38
docker_check:
39
39
{ \
40
40
if ( ! ( command -v docker >/dev/null && (docker compose version >/dev/null ||command -v docker-compose >/dev/null) ));then \
41
-
echo"Seems like you don't have Docker or docker-compose installed. Make sure you review docs/development/README.md before continuing";\
41
+
echo"Seems like you don't have Docker or docker-compose installed. Make sure you review build/localnet/README.md and docs/development/README.md before continuing";\
42
42
exit 1;\
43
43
fi;\
44
44
}
@@ -47,11 +47,21 @@ docker_check:
47
47
kubectl_check:
48
48
{ \
49
49
if ( ! ( command -v kubectl >/dev/null ));then \
50
-
echo"Seems like you don't have Kubectl installed. Make sure you review docs/development/README.md before continuing";\
50
+
echo"Seems like you don't have Kubectl installed. Make sure you review build/localnet/README.md and docs/development/README.md before continuing";\
51
51
exit 1;\
52
52
fi;\
53
53
}
54
54
55
+
# Internal helper target - check if rsync is installed.
56
+
rsync_check:
57
+
{ \
58
+
if ( ! ( command -v kubectl >/dev/null ));then \
59
+
echo"Seems like you don't have rsync installed. Make sure you review build/localnet/README.md and docs/development/README.md before continuing";\
60
+
exit 1;\
61
+
fi;\
62
+
}
63
+
64
+
55
65
.PHONY: trigger_ci
56
66
trigger_ci: ## Trigger the CI pipeline by submitting an empty commit; See https://github.com/pokt-network/pocket/issues/900 for details
57
67
git commit --allow-empty -m "Empty commit"
@@ -133,6 +143,9 @@ go_imports: ## Group imports using rinchsan/gosimports
133
143
go_fmt: ## Format all the .go files in the project in place.
134
144
gofmt -w -s .
135
145
146
+
# TODO(#964): add `rsync_check`, `kubectl_check`, `docker_check` as a validation in `install_cli_deps`; https://github.com/pokt-network/pocket/assets/1892194/a7a24a11-f54d-46e2-a73e-9e8ea7d06726
147
+
# .PHONY: install_cli_deps
148
+
# install_cli_deps: rsync_check kubectl_check docker_check ## Installs `helm`, `tilt` and the underlying `ci_deps`
136
149
.PHONY: install_cli_deps
137
150
install_cli_deps: ## Installs `helm`, `tilt` and the underlying `ci_deps`
138
151
make install_ci_deps
@@ -163,33 +176,27 @@ develop_test: docker_check ## Run all of the make commands necessary to develop
163
176
make develop_start &&\
164
177
make test_all
165
178
166
-
.PHONY: client_start
167
-
client_start: docker_check ## Run a client daemon which is only used for debugging purposes
179
+
.PHONY: lightweight_localnet_client
180
+
lightweight_localnet_client: docker_check ## Run a client daemon which is only used for debugging purposes
181
+
# Add `--build` to rebuild the client
168
182
${docker-compose} up -d client
169
183
170
-
.PHONY: rebuild_client_start
171
-
rebuild_client_start: docker_check ## Rebuild and run a client daemon which is only used for debugging purposes
172
-
${docker-compose} up -d --build client
173
-
174
-
.PHONY: client_connect
175
-
client_connect: docker_check ## Connect to the running client debugging daemon
184
+
.PHONY: lightweight_localnet_client_debug
185
+
lightweight_localnet_client_debug: docker_check ## Connect to the running client debugging daemon
// TECHDEBT(#874): this is a magic number, but an alternative would be to have the p2p module wait until connections are open and to flush the message correctly
55
-
time.Sleep(500*time.Millisecond) // give p2p module time to start
56
-
handleSelect(cmd, cmd.Use)
57
-
time.Sleep(500*time.Millisecond) // give p2p module time to broadcast
71
+
Run: func(cmd*cobra.Command, args []string) {
72
+
runWithSleep(func() {
73
+
handleSelect(cmd, PromptPrintNodeState)
74
+
})
58
75
},
59
-
ValidArgs: items,
60
-
}
76
+
},
77
+
{
78
+
Use: "ResetToGenesis",
79
+
Aliases: []string{"reset", "genesis"},
80
+
Short: "Reset to genesis",
81
+
Long: "Broadcast a message to all visible nodes to reset the state to genesis",
Copy file name to clipboardExpand all lines: build/config/README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ It is not recommended at this time to build infrastructure components that rely
12
12
13
13
## Origin Document
14
14
15
-
Currently, the Genesis and Configuration generator is necessary to create development `localnet` environments for iterating on V1. A current example (as of 09/2022) of this is the `make compose_and_watch` debug utility that generates a `localnet` using `docker-compose` by injecting the appropriate `config.json` and `genesis.json` files.
15
+
Currently, the Genesis and Configuration generator is necessary to create development `localnet` environments for iterating on V1. A current example (as of 09/2022) of this is the `make lightweight_localnet` debug utility that generates a `localnet` using `docker-compose` by injecting the appropriate `config.json` and `genesis.json` files.
Copy file name to clipboardExpand all lines: build/docs/CHANGELOG.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -233,7 +233,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
233
233
## [0.0.0.1] - 2022-12-29
234
234
235
235
- Updated all `config*.json` files with the missing `max_mempool_count` value
236
-
- Added `is_client_only` to `config1.json` so Viper knows it can be overridden. The config override is done in the Makefile's `client_connect` target. Setting this can be avoided if we merge the changes in https://github.com/pokt-network/pocket/compare/main...issue/cli-viper-environment-vars-fix
236
+
- Added `is_client_only` to `config1.json` so Viper knows it can be overridden. The config override is done in the Makefile's `lightweight_localnet_client_debug` target. Setting this can be avoided if we merge the changes in https://github.com/pokt-network/pocket/compare/main...issue/cli-viper-environment-vars-fix
-[Addresses and keys on LocalNet](#addresses-and-keys-on-localnet)
19
+
-[Applications staked on LocalNet](#applications-staked-on-localnet)
20
+
-[Servicers staked on LocalNet](#servicers-staked-on-localnet)
19
21
-[How to change configuration files](#how-to-change-configuration-files)
20
22
-[Overriding default values for localnet with Tilt](#overriding-default-values-for-localnet-with-tilt)
21
23
-[How does it work?](#how-does-it-work)
@@ -26,7 +28,7 @@ This guide shows how to deploy a LocalNet using [pocket-operator](https://github
26
28
-[Full Cleanup](#full-cleanup)
27
29
-[Code Structure](#code-structure)
28
30
29
-
## TLDR
31
+
## TL;DR
30
32
31
33
If you feel adventurous, and you know what you're doing, here is a rapid guide to start LocalNet:
32
34
@@ -46,6 +48,7 @@ All necessary dependencies, except Docker and Kubernetes cluster, are installed
46
48
3.`Kubernetes cluster`: refer to [Choosing Kubernetes Distribution](#choosing-kubernetes-distribution) section for more details.
47
49
4.`kubectl`: CLI is required and should be configured to access the cluster. This should happen automatically if using Docker Desktop, Rancher Desktop, k3s, k3d, minikube, etc.
48
50
5.[helm](https://helm.sh/docs/intro/install): required to template the YAML manifests for the dependencies (e.g., Postgres, Grafana). Installation instructions available.
51
+
6.[rsync](https://www.hostinger.com/tutorials/how-to-use-rsync): required to for some extensions used with `Tilt`; https://github.com/tilt-dev/tilt-extensions/tree/master/syncback#usage
49
52
50
53
### Choosing Kubernetes Distribution
51
54
@@ -149,8 +152,8 @@ For example:
149
152
-`0010297b55fc9278e4be4f1bcfe52bf9bd0443f8` is a servicer #001.
150
153
-`314019dbb7faf8390c1f0cf4976ef1215c90b7e4` is an application #314.
151
154
152
-
153
155
#### Applications staked on LocalNet
156
+
154
157
Applications with the following addresses are staked on LocalNet, through the [applications field of the genesis.json in the LocalNet configuration](https://github.com/pokt-network/pocket/blob/main/build/localnet/manifests/configs.yaml#L4088)
155
158
156
159
-`00001fff518b1cdddd74c197d76ba5b5dedc0301`
@@ -159,6 +162,7 @@ Applications with the following addresses are staked on LocalNet, through the [a
159
162
These addresses can be used for e.g. testing the CLI.
160
163
161
164
#### Servicers staked on LocalNet
165
+
162
166
Servicers with the following addresses are staked on LocalNet, through the [servicers field of the genesis.json in the LocalNet configuration](https://github.com/pokt-network/pocket/blob/main/build/localnet/manifests/configs.yaml#L4120)
0 commit comments