Repository navigation
chore: merge master into feat/kotlin-sdk-phase-1 (#1583, #1634) #1649
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
Changes from all commits
7b2e231
cdaf542
1c1fa02
050e513
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 |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # Sakura Devnet | ||
|
|
||
| The `devnet` flavor targets `devnet-sakura`. Its application ID is | ||
| `org.dash.wallet.devnet`, reusing the existing Firebase-registered devnet app. | ||
| Only one devnet is supported at a time; this ID shares app storage with any | ||
| previously installed wallet using the same ID, but is separate from testnet and mainnet. | ||
| Wallet, chain, and bootstrap filenames use the existing `-sakura` suffix mechanism. | ||
| No DashJ release or key-derivation changes are required. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - No manual SDK install. The root `build.gradle` pins the legacy Platform SDK | ||
| (`dppVersion`, `5.0.0-20261016.200955-3`), which already has `NetworkConfiguration.sakura()` | ||
| and the explicit-network constructor, and the Kotlin SDK (`dashSdkVersion`, | ||
| `5.0.0-int31-20261019.192942-1`). Gradle resolves both from the snapshots repository. | ||
| - Set `sakuraSporkAddress` in local.properties or with `-PsakuraSporkAddress=...`. | ||
| This is the operator's public signing address, never a private key. No other | ||
| devnet's address is substituted. Missing values fail the devnet build; malformed | ||
| addresses are also rejected when constructing the network parameters. | ||
| - Core port defaults to `20001` by assumption; override with `-PsakuraCorePort=...`. | ||
|
|
||
| Build with `./gradlew :wallet:assembleDevnetDebug`. | ||
| The local, Git-ignored `wallet/google-services.json` must contain | ||
| `org.dash.wallet.devnet` so Firebase-dependent startup workers can initialize. | ||
|
|
||
| ## Validation Still Required | ||
|
|
||
| Core peers come from the Sakura status page's 13 validator IP addresses. | ||
| The SDK supplies HTTPS DAPI endpoints on port 1443. Core protocol is 70240. | ||
| DashJ's default devnet quorum and activation settings are retained as an explicit | ||
| testing assumption, not verified Sakura consensus configuration. | ||
|
|
||
| Before funding the wallet, confirm Core synchronization, refresh the Platform | ||
| protocol version, check fresh block timestamps, and fetch a data contract with | ||
| proof verification enabled. The existing masternode-list quorum callback remains | ||
| in use; no proof verification or TLS validation is bypassed. | ||
|
|
||
| Source: https://status.testnet.networks.dash.org/n/devnet-sakura/connect |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -250,6 +250,25 @@ if (file("../local.properties").exists()) { | |||||||||||||||||||||||||||||||||||||||||||||
| file("../local.properties").withInputStream { localProps.load(it) } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| def sakuraSporkAddress = providers.gradleProperty("sakuraSporkAddress") | ||||||||||||||||||||||||||||||||||||||||||||||
| .getOrElse(localProps.getProperty("sakuraSporkAddress", "")) | ||||||||||||||||||||||||||||||||||||||||||||||
| def sakuraCorePort = providers.gradleProperty("sakuraCorePort").getOrElse("20001").toInteger() | ||||||||||||||||||||||||||||||||||||||||||||||
| def validateSakuraConfiguration = tasks.register("validateSakuraConfiguration") { | ||||||||||||||||||||||||||||||||||||||||||||||
| doLast { | ||||||||||||||||||||||||||||||||||||||||||||||
| if (sakuraSporkAddress.trim().isEmpty()) { | ||||||||||||||||||||||||||||||||||||||||||||||
| throw new GradleException("Set sakuraSporkAddress to Sakura's public spork address before building devnet") | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| if (sakuraCorePort < 1 || sakuraCorePort > 65535) { | ||||||||||||||||||||||||||||||||||||||||||||||
| throw new GradleException("sakuraCorePort must be between 1 and 65535") | ||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+253
to
+262
Contributor
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: Defer invalid Sakura port rejection until devnet validation
Suggested change
source:
Collaborator
Author
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. Out of scope for this PR. This is master's code (#1583), brought over unchanged by the merge. The fix belongs on master, and phase-1 will pick it up with the next master merge. It's also only reachable with a malformed
Contributor
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. Still applies (re-reviewed at |
||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| tasks.configureEach { | ||||||||||||||||||||||||||||||||||||||||||||||
| if (name.startsWith("preDevnet") && name.endsWith("Build")) { | ||||||||||||||||||||||||||||||||||||||||||||||
| dependsOn(validateSakuraConfiguration) | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| // Year of the most recent commit on the current branch, used for the copyright notice. | ||||||||||||||||||||||||||||||||||||||||||||||
| // Uses providers.exec so it stays compatible with the Gradle configuration cache. | ||||||||||||||||||||||||||||||||||||||||||||||
| // Falls back to the current year if git is unavailable (e.g. building from a source tarball). | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -326,6 +345,8 @@ android { | |||||||||||||||||||||||||||||||||||||||||||||
| buildConfigField("String", "DASH_SDK_VERSION", "\"$dashSdkVersion\"") | ||||||||||||||||||||||||||||||||||||||||||||||
| buildConfigField("int", "COMMIT_YEAR", "$commitYear") | ||||||||||||||||||||||||||||||||||||||||||||||
| buildConfigField("String", "GIT_COMMIT", "\"$gitCommit\"") | ||||||||||||||||||||||||||||||||||||||||||||||
| buildConfigField("String", "SAKURA_SPORK_ADDRESS", groovy.json.JsonOutput.toJson(sakuraSporkAddress)) | ||||||||||||||||||||||||||||||||||||||||||||||
| buildConfigField("int", "SAKURA_CORE_PORT", sakuraCorePort.toString()) | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| buildTypes { | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -378,16 +399,20 @@ android { | |||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| prod { | ||||||||||||||||||||||||||||||||||||||||||||||
| manifest.srcFile 'prod/AndroidManifest.xml' | ||||||||||||||||||||||||||||||||||||||||||||||
| java.srcDirs += ['standard/src'] | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| _testNet3 { | ||||||||||||||||||||||||||||||||||||||||||||||
| manifest.srcFile 'testNet3/AndroidManifest.xml' | ||||||||||||||||||||||||||||||||||||||||||||||
| java.srcDirs += ['standard/src'] | ||||||||||||||||||||||||||||||||||||||||||||||
| res.srcDirs = ["testNet3/res"] | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| staging { | ||||||||||||||||||||||||||||||||||||||||||||||
| res.srcDirs = ["staging/res"] | ||||||||||||||||||||||||||||||||||||||||||||||
| java.srcDirs += ['standard/src'] | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| devnet { | ||||||||||||||||||||||||||||||||||||||||||||||
| res.srcDirs = ["devnet/res"] | ||||||||||||||||||||||||||||||||||||||||||||||
| java.srcDirs += ['devnet/src'] | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| flavorDimensions "default" | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -474,7 +499,7 @@ android { | |||||||||||||||||||||||||||||||||||||||||||||
| buildConfigField("String", "APPSFLYER_BRAND_DOMAIN", "\"dashpaytest.onelink.me\"") | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| devnet { | ||||||||||||||||||||||||||||||||||||||||||||||
| applicationId = "org.dash.dashpay.devnet" | ||||||||||||||||||||||||||||||||||||||||||||||
| applicationId = "org.dash.wallet.devnet" | ||||||||||||||||||||||||||||||||||||||||||||||
| def imgurClientId = props.getProperty("UPHOLD_CLIENT_ID_SANDBOX") | ||||||||||||||||||||||||||||||||||||||||||||||
| def imgurClientSecret = props.getProperty("UPHOLD_CLIENT_SECRET_SANDBOX") | ||||||||||||||||||||||||||||||||||||||||||||||
| if (imgurClientId == null) { | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| <?xml version='1.0' encoding='UTF-8'?> | ||
| <resources> | ||
| <string name="net_type_indicator">Devnet</string> | ||
| <string name="net_type_indicator">Sakura Devnet</string> | ||
| </resources> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| package de.schildbach.wallet.service.platform | ||
|
|
||
| import de.schildbach.wallet.network.SakuraDevNetParams | ||
| import org.bitcoinj.core.NetworkParameters | ||
| import org.dashj.platform.sdk.client.NetworkConfiguration | ||
| import org.dashj.platform.sdk.platform.Platform | ||
|
|
||
| internal fun createNetworkPlatform(params: NetworkParameters): Platform { | ||
| require(params is SakuraDevNetParams) { "The devnet flavor requires Sakura parameters" } | ||
| return Platform(params, NetworkConfiguration.sakura()) | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.
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.
Defer invalid-port failure until devnet validation.
If
-PsakuraCorePortcontains a non-integer value,toInteger()throws while Gradle configures the project. Even a prod build or Gradle Sync then fails beforevalidateSakuraConfigurationcan report the devnet setting. Keep a safe configuration-time value for other flavors, and reject the original invalid value in the devnet validation task. (raw.githubusercontent.com)Based on learnings, “defer strict validation of required values to task execution time.”
Source: Learnings
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.
Out of scope for this PR. This is master's code (#1583), brought over unchanged by the merge. The fix belongs on master, and phase-1 will pick it up with the next master merge. It's also only reachable with a malformed
-PsakuraCorePort; the default20001parses fine.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.
@HashEngineering Understood. The default
20001parses correctly. The malformed-value case remains valid, but it belongs in a follow-up onmaster, not this merge PR. I won’t request a change here.Would you like me to open a GitHub issue for the
masterfollow-up?You are interacting with an AI system.