Skip to content

Conversation

@ktechmidas
Copy link
Collaborator

@ktechmidas ktechmidas commented Jul 14, 2025

Issue being fixed or feature implemented

Use correct port for mainnet

What was done?

Switch from 1443 to 443 for mainnet

How Has This Been Tested?

evo-sdk.dash.org

Breaking Changes

None, it fixes things...

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

Summary by CodeRabbit

  • Chores
    • Updated mainnet node URLs to use the standard HTTPS port (443) instead of 1443.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 14, 2025

Walkthrough

This change updates all hardcoded mainnet node URLs within the Wasm SDK to use port 443 instead of 1443. The modifications are limited to replacing the port number in constant address lists used by the WasmSdkBuilder methods. No other logic or public interfaces are affected.

Changes

File(s) Change Summary
packages/wasm-sdk/src/sdk.rs Updated mainnet node URLs in three places: changed port from 1443 to 443 in address lists within WasmSdkBuilder methods.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant WasmSdkBuilder

    User->>WasmSdkBuilder: new_mainnet() / new_mainnet_trusted()
    WasmSdkBuilder->>WasmSdkBuilder: Use mainnet node URLs with port 443
    WasmSdkBuilder-->>User: Return SDK instance configured with updated URLs
Loading

Possibly related PRs

  • fix(dapi): invalid mainnet seed ports #2173: Both PRs address correcting the mainnet seed node port configurations by removing or changing the port 1443 to the standard HTTPS port, directly relating to the same configuration issue in different packages.

Poem

A hop and a skip, a port we revise,
From 1443 to 443, we standardize!
Mainnet nodes now clearer,
Connection paths nearer,
This bunny approves with sparkling eyes! 🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
packages/wasm-sdk/src/sdk.rs (1)

372-582: Reuse the constant extracted above—don’t repeat the entire list

new_mainnet_trusted() copies the same URLs. After introducing mainnet_urls(), this becomes:

- let mainnet_addresses = vec![ /* 200 lines */ ];
+ let mainnet_addresses = mainnet_urls();

Keeps both builders in sync and simplifies maintenance.

🧹 Nitpick comments (1)
packages/wasm-sdk/src/sdk.rs (1)

134-345: Extract the mainnet address list into a shared constant to stay DRY and avoid repeated parsing

The 200-line literal is huge, duplicated later, and each call to new_mainnet() re-parses the strings with .parse().unwrap().
Refactor outline:

static MAINNET_DAPI_URLS: &[&str] = &[
    "https://149.28.241.190:443",
    // … (rest of the urls)
];

fn mainnet_urls() -> Vec<Url> {
    MAINNET_DAPI_URLS
        .iter()
        .map(|u| u.parse().expect("Hard-coded URL failed to parse"))
        .collect()
}

Then:

- let mainnet_addresses = vec![ /* … */ ];
+ let mainnet_addresses = mainnet_urls();

Benefits
• Eliminates duplication (also used in new_mainnet_trusted).
• Cuts wasm binary size (string duplication).
• Parses only once (or lazily via Lazy<Vec<Url>>).
• Replaces unwrap() with expect() for clearer diagnostics.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3c26b56 and 7b0d81a.

📒 Files selected for processing (1)
  • packages/wasm-sdk/src/sdk.rs (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs

Instructions used from:

Sources:
📄 CodeRabbit Inference Engine

  • CLAUDE.md
🧠 Learnings (2)
📓 Common learnings
Learnt from: shumkov
PR: dashpay/platform#2162
File: packages/dashmate/src/status/providers.js:121-127
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In the `mnowatch.checkPortStatus` function, failures should resolve with `PortStateEnum.ERROR` instead of rejecting the promise.
Learnt from: shumkov
PR: dashpay/platform#2162
File: packages/dashmate/src/status/providers.js:121-127
Timestamp: 2024-09-26T14:28:54.892Z
Learning: In the `mnowatch.checkPortStatus` function, failures should resolve with `PortStateEnum.ERROR` instead of rejecting the promise.
Learnt from: lklimek
PR: dashpay/platform#2318
File: .github/workflows/tests-build-image.yml:45-45
Timestamp: 2024-11-13T10:31:30.891Z
Learning: In the dashpay/platform repository, changes to `.github/workflows/tests-build-image.yml` that switch the Docker image platform from `linux/arm64` to `linux/amd64` for testing purposes are acceptable when required to run on GitHub-hosted runners. ARM64 testing is covered on the testnet.
packages/wasm-sdk/src/sdk.rs (1)
Learnt from: shumkov
PR: dashpay/platform#2317
File: packages/rs-dapi-client/src/address_list.rs:175-180
Timestamp: 2024-11-28T13:49:17.301Z
Learning: In Rust code in `packages/rs-dapi-client/src/address_list.rs`, do not change the interface of deprecated methods like `add_uri`, even to fix potential panics.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build JS packages / Build JS
  • GitHub Check: build-wasm-sdk

@QuantumExplorer QuantumExplorer changed the title chore: use correct port chore(sdk): use correct port for evo-sdk mainnet Jul 14, 2025
@QuantumExplorer QuantumExplorer merged commit 399d146 into v2.1-dev Jul 14, 2025
21 checks passed
@QuantumExplorer QuantumExplorer deleted the feat/mnlist branch July 14, 2025 10:35
@thephez thephez added this to the v2.1.0 milestone Oct 7, 2025
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