-
Notifications
You must be signed in to change notification settings - Fork 53
fix(wasm-sdk): update stale default testnet DAPI node addresses #3485
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
base: v3.1-dev
Are you sure you want to change the base?
Changes from all commits
cef4216
4258d99
edf6dec
23e383a
0771e1a
97ae06d
59ed52c
531e46b
b446eb6
ca829b4
0c04457
c67cd57
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -37,6 +37,7 @@ use std::num::NonZeroUsize; | |||||||||||||||||||||||||||||||||
| use std::path::Path; | ||||||||||||||||||||||||||||||||||
| #[cfg(feature = "mocks")] | ||||||||||||||||||||||||||||||||||
| use std::path::PathBuf; | ||||||||||||||||||||||||||||||||||
| use std::str::FromStr; | ||||||||||||||||||||||||||||||||||
| use std::sync::atomic::Ordering; | ||||||||||||||||||||||||||||||||||
| use std::sync::{atomic, Arc}; | ||||||||||||||||||||||||||||||||||
| #[cfg(feature = "mocks")] | ||||||||||||||||||||||||||||||||||
|
|
@@ -788,6 +789,8 @@ impl SdkBuilder { | |||||||||||||||||||||||||||||||||
| /// This is a helper method that preconfigures [SdkBuilder] for testnet use. | ||||||||||||||||||||||||||||||||||
| /// Use this method if you want to connect to Dash Platform testnet during development and testing | ||||||||||||||||||||||||||||||||||
| /// of your solution. | ||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||
| /// Testnet addresses sourced from <https://quorums.testnet.networks.dash.org/masternodes>. | ||||||||||||||||||||||||||||||||||
| pub fn new_testnet() -> Self { | ||||||||||||||||||||||||||||||||||
| let address_list = default_address_list_for_network(Network::Testnet); | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
|
|
@@ -799,19 +802,28 @@ impl SdkBuilder { | |||||||||||||||||||||||||||||||||
| /// This is a helper method that preconfigures [SdkBuilder] for production use. | ||||||||||||||||||||||||||||||||||
| /// Use this method if you want to connect to Dash Platform mainnet with production-ready product. | ||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||
| /// ## Panics | ||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||
| /// This method panics if the mainnet configuration cannot be loaded. | ||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||
| /// ## Unstable | ||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||
| /// This method is unstable and can be changed in the future. | ||||||||||||||||||||||||||||||||||
| /// Mainnet addresses sourced from mnowatch.org. | ||||||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💬 Nitpick: Docstrings point to mnowatch.org / quorums.testnet, but addresses now come from dash_network_seeds Both 💡 Suggested change
Suggested change
source: ['claude'] |
||||||||||||||||||||||||||||||||||
| pub fn new_mainnet() -> Self { | ||||||||||||||||||||||||||||||||||
| let address_list = default_address_list_for_network(Network::Mainnet); | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| Self::new(address_list).with_network(Network::Mainnet) | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| /// Create a new SdkBuilder instance preconfigured for local network (dashmate gateway). | ||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||
| /// This is a helper method that preconfigures [SdkBuilder] for local development use | ||||||||||||||||||||||||||||||||||
| /// with a dashmate-managed node. | ||||||||||||||||||||||||||||||||||
| pub fn new_local() -> Self { | ||||||||||||||||||||||||||||||||||
| let addresses = AddressList::from_str("https://127.0.0.1:2443") | ||||||||||||||||||||||||||||||||||
| .expect("hardcoded local address must be valid"); | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| Self { | ||||||||||||||||||||||||||||||||||
| addresses: Some(addresses), | ||||||||||||||||||||||||||||||||||
| network: Network::Regtest, | ||||||||||||||||||||||||||||||||||
| ..Default::default() | ||||||||||||||||||||||||||||||||||
|
Comment on lines
794
to
+823
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Suggestion: The new preset builder helpers were added without smoke tests
source: ['claude'] 🤖 Fix this with AI agents |
||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+816
to
+825
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Suggestion: new_local diverges from new_testnet/new_mainnet construction style
💡 Suggested change
Suggested change
source: ['claude'] 🤖 Fix this with AI agents |
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| /// Configure network type. | ||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||
| /// Defaults to Network::Mainnet which is mainnet. | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
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.
🟡 Suggestion: FFI mainnet fallback now uses only 5 default nodes instead of the previous 8
This PR changes
dash_sdk_create_trusted()to delegate its no-address mainnet path toSdkBuilder::new_mainnet(). Before this change, the FFI code hardcoded 8 mainnet endpoints; after it,new_mainnet()supplies only 5 (149.28.241.190,198.7.115.48,134.255.182.186,93.115.172.39,5.189.164.253). That silently reduces the default fan-out for iOS/FFI consumers even though the PR is framed as a stale testnet address refresh. Either restore the three removed mainnet endpoints inSdkBuilder::new_mainnet()or call out the reduced default pool explicitly as an intended behavior change.source: ['claude']
🤖 Fix this with AI agents