DragonX SDK: increase batch size and update server endpoints

- Increase DOWNLOAD_BATCH_SIZE from 50 to 500 for faster sync
- Update default server endpoints to dragonx.is (mainnet and testnet)
- Add jniLibs source dir for Rust native libraries in build config
This commit is contained in:
2026-03-21 03:53:53 -05:00
parent 3a66f165a4
commit 74155fd1bd
4 changed files with 8 additions and 13 deletions

View File

@@ -35,9 +35,9 @@ object ZcashSdk {
* Default size of batches of blocks to request from the compact block service.
*/
// Because blocks are buffered in memory upon download and storage into SQLite, there is an upper bound
// above which OutOfMemoryError is thrown. Experimentally, this value is below 50 blocks.
// Back of the envelope calculation says the maximum block size is ~100kb.
const val DOWNLOAD_BATCH_SIZE = 50
// above which OutOfMemoryError is thrown. DragonX compact blocks are small (~1-2kb each),
// so a larger batch size significantly reduces gRPC call overhead during initial sync.
const val DOWNLOAD_BATCH_SIZE = 500
/**
* Default size of batches of blocks to scan via librustzcash. The smaller this number the more granular information

View File

@@ -164,14 +164,6 @@ class LightWalletGrpcService private constructor(
.enableFullStreamDecompression()
.apply {
useTransportSecurity()
/*
if (lightWalletEndpoint.isSecure) {
useTransportSecurity()
} else {
twig("WARNING: Using insecure channel")
usePlaintext()
}
*/
}
.build()
}

View File

@@ -24,14 +24,14 @@ private const val DEFAULT_PORT = 443
val LightWalletEndpoint.Companion.Mainnet
get() = LightWalletEndpoint(
"dragonlite.printogre.com",
"lite.dragonx.is",
DEFAULT_PORT,
isSecure = true
)
val LightWalletEndpoint.Companion.Testnet
get() = LightWalletEndpoint(
"dragonlite.printogre.com",
"lite.dragonx.is",
DEFAULT_PORT,
isSecure = true
)