Skip to content

feat: add validate rpc when setup relayer#1409

Open
anhductn2001 wants to merge 2 commits intomainfrom
ducnt/validaterpc
Open

feat: add validate rpc when setup relayer#1409
anhductn2001 wants to merge 2 commits intomainfrom
ducnt/validaterpc

Conversation

@anhductn2001
Copy link
Contributor

PR Standards

Close #1366

Opening a pull request should be able to meet the following requirements


For Author:

  • Targeted PR against correct branch
  • Included the correct type prefix in the PR title
  • Linked to Github issue with discussion and accepted design
  • Targets only one github issue
  • Wrote unit and integration tests
  • All CI checks have passed
  • Added relevant godoc comments

For Reviewer:

  • Confirmed the correct type prefix in the PR title
  • Reviewers assigned
  • Confirmed all author checklist items have been addressed

After reviewer approval:

  • In case PR targets main branch, PR should be squashed and merged.
  • In case PR targets a release branch, PR should be rebased.

@anhductn2001 anhductn2001 requested a review from a team as a code owner November 3, 2025 07:51
case strings.HasPrefix(endpoint, "http://"), strings.HasPrefix(endpoint, "https://"):
return endpoint
default:
return "http://" + endpoint
Copy link
Collaborator

Choose a reason for hiding this comment

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

the default should be https endpoint, otherwise the http will try to point to port 80, which is not where anything runs.

} `json:"result"`
}

func validateRollappRPCEndpoint(rollappID, endpoint string) (string, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

so this checks that the on chain rpc endpoint, provided by the sequencer is actually pointing to the correct chain id?

move it to utils/sequencer, other then that - lgtm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea thx @artemijspavlovs . I pushed a fix

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.

add chain-id check during relayer setup

2 participants