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

feat: add ws endpoint to SubnetRegistrator.sol #112

Merged
merged 6 commits into from
Nov 6, 2023
Merged

Conversation

JDawg287
Copy link
Member

@JDawg287 JDawg287 commented Oct 23, 2023

Description

This PR adds an extra WebSocket parameter, for registering a subnet. It is to avoid inferring the WebSocket endpoint from the HTTP endpoint.

BREAKING CHANGES

  • SubnetRegistrator's endpoint field for subnets has been renamed to endpointHttp (see more details below)

Additions and Changes

  • Renamed the regular endpoint to endpointHttp
  • Added the endpointWs parameter for the registerSubnet func
  • Changed relevant unit tests

PR Checklist:

  • I have performed a self-review of my code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added or updated tests that comprehensively prove my change is effective or that my feature works

Signed-off-by: Jawad Tariq <[email protected]>
@sebastiendan
Copy link
Member

Small detail that can have some degree of importance: I would rename to endpointHttp and endpointWs so that the two fields are kept together in an alphabetically ordered list of variables and so that same-domain variables are also grouped by the same prefix (domain-qualifier instead of qualifier-domain).

@JDawg287
Copy link
Member Author

Small detail that can have some degree of importance: I would rename to endpointHttp and endpointWs so that the two fields are kept together in an alphabetically ordered list of variables and so that same-domain variables are also grouped by the same prefix (domain-qualifier instead of qualifier-domain).

Done!

@sebastiendan
Copy link
Member

Small detail that can have some degree of importance: I would rename to endpointHttp and endpointWs so that the two fields are kept together in an alphabetically ordered list of variables and so that same-domain variables are also grouped by the same prefix (domain-qualifier instead of qualifier-domain).

Done!

Nice! Just a note: I didn't mean you should have reordered the function args in an alphabetically ordered list (should looks odd and very uncommon to me).

One more thing: Can you open the sibling PR on local-erc20-messaging-infra to have an e2e test passing and linked here? (as you did recently for contract/script updates)

@sebastiendan
Copy link
Member

@JDawg287 Here's the green e2e tests ✅
https://github.com/topos-protocol/e2e-tests/actions/runs/6733686509

I will merge the PR later today as there's still one thing to update.

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.

3 participants