-
Notifications
You must be signed in to change notification settings - Fork 44
chore(sdk): use correct port for evo-sdk mainnet #2699
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
Conversation
WalkthroughThis 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 Changes
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
Possibly related PRs
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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 introducingmainnet_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 parsingThe 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 innew_mainnet_trusted).
• Cuts wasm binary size (string duplication).
• Parses only once (or lazily viaLazy<Vec<Url>>).
• Replacesunwrap()withexpect()for clearer diagnostics.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 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
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:
For repository code-owners and collaborators only
Summary by CodeRabbit