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

Prysmctl: Interactive UI is broken for selecting validators to exit #14092

Closed
sjb933 opened this issue Jun 7, 2024 · 3 comments · Fixed by #14140
Closed

Prysmctl: Interactive UI is broken for selecting validators to exit #14092

sjb933 opened this issue Jun 7, 2024 · 3 comments · Fixed by #14140
Assignees
Labels
Bug Something isn't working Need-Info Need more information from author prysmctl

Comments

@sjb933
Copy link

sjb933 commented Jun 7, 2024

Describe the bug

The interactive UI for selecting which validator to exit in prysmctl is not rendering correctly. The user is not able to see which validator is currently selected, and long lists are cut off.

I have received a few user reports of this issue and have verified myself. This issue presented itself in v5.0.0 and is still present in the latest release v5.0.3 (it works as expected in v4.2.1).

Has this worked before in a previous version?

This worked in all versions `< v5`, verified working in `v4.2.1`.

🔬 Minimal Reproduction

This issue is very easy to reproduce with the standard command:

./prysmctl-v5.0.3-linux-amd64 validator exit --wallet-dir=/path/to/validatorwallet

Accept the TOS and then try to navigate the list of validators.

Error

Bugged interactive UI.

Platform(s)

Linux (x86)

What version of Prysm are you running? (Which release)

prysmctl v5.0.3

Anything else relevant (validator index / public key)?

No response

@sjb933 sjb933 added the Bug Something isn't working label Jun 7, 2024
@james-prysm
Copy link
Contributor

image
could you let me know what you were expecting? maybe more keys listed initially?

I pasted above what I see, you can scroll through the validator of choice using the arrow keys. Will test on another os

@james-prysm james-prysm added prysmctl Need-Info Need more information from author and removed Bug Something isn't working labels Jun 11, 2024
@sjb933
Copy link
Author

sjb933 commented Jun 20, 2024

Hi James, I think it may be that you need a long list of validator keys for the issue to present itself. In order to reproduce I am:

  1. Connected to a linux server via SSH
  2. Running the validator exit command on a validator with many keys (more than one page is perhaps necessary for the issue to present itself).

I also triggered a panic related to this issue using the latest v5.0.3 prysmctl - detail below.

Here is the latest/broken version (v5.0.3) with panic stack trace

You can see that the rendering goes beyond the visible range of the terminal. Jumping around in the list causes sporadic rendering and it appears to jump around randomly in the list.

This is rendered first:
broken-v5 0 3 (1)

Then if navigate with the arrow keys it jumps to the head of the list and you can no longer see the selection:
broken-v5 0 3 (2)

When in this state, I was able to produce a panic by pressing the arrow keys several times and then exiting with CTRL-C:

panic: runtime error: slice bounds out of range [4468:4451]

goroutine 269 [running]:
bytes.(*Buffer).Write(0x0?, {0x2f77324?, 0x0?, 0x0?})
        GOROOT/src/bytes/buffer.go:181 +0xc5
github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Clear(0xc00033e420)
        external/com_github_manifoldco_promptui/screenbuf/screenbuf.go:47 +0x7c
github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Write(0xc00033e420, {0xc000c8cd00, 0xe, 0x10})
        external/com_github_manifoldco_promptui/screenbuf/screenbuf.go:68 +0x65
github.com/manifoldco/promptui.(*Select).innerRun.func1({0x31ce6c0?, 0xc00071f080?, 0x2cc9500?}, 0xc00041f030?, 0xba5c48?)
        external/com_github_manifoldco_promptui/select.go:336 +0xa89
github.com/chzyer/readline.(*DumpListener).OnChange(0xc00041efa0?, {0x31ce6c0?, 0x0?, 0xc3a040?}, 0xc000ba5f00?, 0x1?)
        external/com_github_chzyer_readline/operation.go:522 +0x2b
github.com/chzyer/readline.(*Operation).ioloop(0xc0004820e0)
        external/com_github_chzyer_readline/operation.go:341 +0x1a13
created by github.com/chzyer/readline.NewOperation in goroutine 1
        external/com_github_chzyer_readline/operation.go:88 +0x2d6

Here is the prior version which works as expected (v4.2.1)

You can see that it limits its rendering to a few lines that can be properly navigated with arrow keys

working-v4 2 1

@james-prysm james-prysm added the Bug Something isn't working label Jun 21, 2024
@prestonvanloon
Copy link
Member

I think this PR might be related: #13542

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Need-Info Need more information from author prysmctl
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants