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

fix: update check to verify string, otherwise it fails to verify #2

Closed
wants to merge 2 commits into from

Conversation

RafilxTenfen
Copy link
Contributor

No description provided.

@RafilxTenfen RafilxTenfen self-assigned this Aug 6, 2024
@RafilxTenfen
Copy link
Contributor Author

from talking with @KonradStaniec
We should not have this check for version v25 since the vigilante does use some deprecated calls like DumpPrivKey which is not available on version 25

Any opinions on what to do here? @SebastianElvis @gitferry

@SebastianElvis
Copy link
Member

Hmm I'm trying out local deployments of all migrated repositories, and come across this error

goroutine 1 [running]:
github.com/babylonlabs-io/vigilante/cmd/vigilante/cmd.GetReporterCmd.func1(0xc00140e600?, {0x4336581?, 0x4?, 0x43364e5?})
	/go/src/github.com/babylonlabs-io/vigilante/cmd/vigilante/cmd/reporter.go:53 +0x61c
github.com/spf13/cobra.(*Command).execute(0xc0013f2900, {0xc000ce5760, 0x2, 0x2})
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:987 +0xaa3
github.com/spf13/cobra.(*Command).ExecuteC(0xc0013f2600)
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(0x0?)
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:1039 +0x13
main.main()
	/go/src/github.com/babylonlabs-io/vigilante/cmd/vigilante/main.go:17 +0x1d
panic: failed to open BTC client: zmq is only supported by bitcoind, but got bitcoind v24.0.0-v25.0.0

Seems related to this fix?

Copy link
Member

@SebastianElvis SebastianElvis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! Caught this when debugging local deployment as well

@RafilxTenfen
Copy link
Contributor Author

waiting for a second look @SebastianElvis

@lesterli
Copy link
Collaborator

lesterli commented Aug 13, 2024

@RafilxTenfen This check is unnecessary b/c the switch statement already ensures we are in the types.Bitcoind case, and The rpcclient.New() function is called with specific config to bitcoind. Can we remove the redundant check to simplify the code?

Same for the check from the btcd case, redundant check and inconsistency issue that the error message states "websocket is only supported by btcd", but the check is for a specific version (rpcclient.BtcdPost2401).

If there's a specific reason to keep these check (e.g., to catch configuration mismatches), consider moving it to a separate validation function that's called before the switch statement.

@RafilxTenfen
Copy link
Contributor Author

#2 (comment)
sounds good, it was removed already
closing

@Lazar955 Lazar955 deleted the rafilx/fix-check-backend branch September 3, 2024 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants