diff --git a/.yarn/cache/fsevents-patch-19706e7e35-10.zip b/.yarn/cache/fsevents-patch-19706e7e35-10.zip new file mode 100644 index 00000000000..aff1ab12ce5 Binary files /dev/null and b/.yarn/cache/fsevents-patch-19706e7e35-10.zip differ diff --git a/CHANGELOG.md b/CHANGELOG.md index 8212fee199d..65cb35b0492 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +### [3.0.1-hotfix.2](https://github.com/dashpay/platform/compare/v3.0.1-hotfix.1...v3.0.1-hotfix.2) (2026-02-02) + + +### Bug Fixes + +* **dashmate:** pass --profile shortlived on letsencrypt renewal + +### [3.0.1-hotfix.1](https://github.com/dashpay/platform/compare/v3.0.0...v3.0.1-hotfix.1) (2026-01-26) + + +### Bug Fixes + +* use single quotes and preserve ctx values in merge + ## [3.0.0-rc.3](///compare/v3.0.0-rc.2...v3.0.0-rc.3) (2026-01-20) diff --git a/Cargo.lock b/Cargo.lock index 285fef55afc..ea1f91e7515 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -856,7 +856,7 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "check-features" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "toml 0.8.23", ] @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "dapi-grpc" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "dash-platform-macros", "futures-core", @@ -1378,7 +1378,7 @@ dependencies = [ [[package]] name = "dash-context-provider" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "dpp", "drive", @@ -1400,7 +1400,7 @@ dependencies = [ [[package]] name = "dash-platform-balance-checker" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "anyhow", "clap", @@ -1415,7 +1415,7 @@ dependencies = [ [[package]] name = "dash-platform-macros" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "heck 0.5.0", "quote", @@ -1424,7 +1424,7 @@ dependencies = [ [[package]] name = "dash-sdk" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "arc-swap", "assert_matches", @@ -1594,7 +1594,7 @@ dependencies = [ [[package]] name = "dashpay-contract" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "platform-value", "platform-version", @@ -1604,7 +1604,7 @@ dependencies = [ [[package]] name = "data-contracts" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "dashpay-contract", "dpns-contract", @@ -1753,7 +1753,7 @@ checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] name = "dpns-contract" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "platform-value", "platform-version", @@ -1763,7 +1763,7 @@ dependencies = [ [[package]] name = "dpp" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "anyhow", "assert_matches", @@ -1820,7 +1820,7 @@ dependencies = [ [[package]] name = "drive" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "arc-swap", "assert_matches", @@ -1861,7 +1861,7 @@ dependencies = [ [[package]] name = "drive-abci" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "arc-swap", "assert_matches", @@ -1916,7 +1916,7 @@ dependencies = [ [[package]] name = "drive-proof-verifier" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "bincode 2.0.0-rc.3", "dapi-grpc", @@ -2169,7 +2169,7 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "feature-flags-contract" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "platform-value", "platform-version", @@ -3342,7 +3342,7 @@ dependencies = [ [[package]] name = "json-schema-compatibility-validator" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "assert_matches", "json-patch", @@ -3461,7 +3461,7 @@ dependencies = [ [[package]] name = "keyword-search-contract" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "base58", "platform-value", @@ -3608,7 +3608,7 @@ dependencies = [ [[package]] name = "masternode-reward-shares-contract" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "platform-value", "platform-version", @@ -4276,7 +4276,7 @@ checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "platform-serialization" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "bincode 2.0.0-rc.3", "platform-version", @@ -4284,7 +4284,7 @@ dependencies = [ [[package]] name = "platform-serialization-derive" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "proc-macro2", "quote", @@ -4294,7 +4294,7 @@ dependencies = [ [[package]] name = "platform-value" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "base64 0.22.1", "bincode 2.0.0-rc.3", @@ -4313,7 +4313,7 @@ dependencies = [ [[package]] name = "platform-value-convertible" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "quote", "syn 2.0.111", @@ -4321,7 +4321,7 @@ dependencies = [ [[package]] name = "platform-version" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "bincode 2.0.0-rc.3", "grovedb-version", @@ -4332,7 +4332,7 @@ dependencies = [ [[package]] name = "platform-versioning" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "proc-macro2", "quote", @@ -4341,7 +4341,7 @@ dependencies = [ [[package]] name = "platform-wallet" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "dashcore", "dpp", @@ -5106,7 +5106,7 @@ dependencies = [ [[package]] name = "rs-dapi" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "async-trait", "axum 0.8.8", @@ -5155,7 +5155,7 @@ dependencies = [ [[package]] name = "rs-dapi-client" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "backon", "chrono", @@ -5180,7 +5180,7 @@ dependencies = [ [[package]] name = "rs-dash-event-bus" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "metrics", "tokio", @@ -5189,7 +5189,7 @@ dependencies = [ [[package]] name = "rs-sdk-ffi" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "bincode 2.0.0-rc.3", "bs58", @@ -5218,7 +5218,7 @@ dependencies = [ [[package]] name = "rs-sdk-trusted-context-provider" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "arc-swap", "dash-context-provider", @@ -5884,7 +5884,7 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "simple-signer" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "base64 0.22.1", "bincode 2.0.0-rc.3", @@ -5981,7 +5981,7 @@ dependencies = [ [[package]] name = "strategy-tests" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "bincode 2.0.0-rc.3", "dpp", @@ -6374,7 +6374,7 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "token-history-contract" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "platform-value", "platform-version", @@ -7117,7 +7117,7 @@ dependencies = [ [[package]] name = "wallet-utils-contract" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "platform-value", "platform-version", @@ -7249,7 +7249,7 @@ dependencies = [ [[package]] name = "wasm-dpp" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "anyhow", "async-trait", @@ -7273,7 +7273,7 @@ dependencies = [ [[package]] name = "wasm-dpp2" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "anyhow", "bincode 2.0.0-rc.3", @@ -7290,7 +7290,7 @@ dependencies = [ [[package]] name = "wasm-drive-verify" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "base64 0.22.1", "bincode 2.0.0-rc.3", @@ -7323,7 +7323,7 @@ dependencies = [ [[package]] name = "wasm-sdk" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "base64 0.22.1", "bip39", @@ -7783,7 +7783,7 @@ checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] name = "withdrawals-contract" -version = "3.0.0" +version = "3.0.1-hotfix.2" dependencies = [ "num_enum 0.5.11", "platform-value", diff --git a/Cargo.toml b/Cargo.toml index ee5ec101e15..bbe18704dd4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,5 +45,5 @@ members = [ [workspace.package] -version = "3.0.0" +version = "3.0.1-hotfix.2" rust-version = "1.92" diff --git a/package.json b/package.json index 5b595416e03..aed102026c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/platform", - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "private": true, "scripts": { "setup": "yarn install && yarn run build && yarn run configure", diff --git a/packages/bench-suite/package.json b/packages/bench-suite/package.json index 13c70a9f87b..9a925042f6c 100644 --- a/packages/bench-suite/package.json +++ b/packages/bench-suite/package.json @@ -1,7 +1,7 @@ { "name": "@dashevo/bench-suite", "private": true, - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "description": "Dash Platform benchmark tool", "scripts": { "bench": "node ./bin/bench.js", diff --git a/packages/dapi-grpc/package.json b/packages/dapi-grpc/package.json index 1776f57af6f..4821051b859 100644 --- a/packages/dapi-grpc/package.json +++ b/packages/dapi-grpc/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dapi-grpc", - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "description": "DAPI GRPC definition file and generated clients", "browser": "browser.js", "main": "node.js", diff --git a/packages/dapi/package.json b/packages/dapi/package.json index 232a586e90a..a2a95017b97 100644 --- a/packages/dapi/package.json +++ b/packages/dapi/package.json @@ -1,7 +1,7 @@ { "name": "@dashevo/dapi", "private": true, - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "description": "A decentralized API for the Dash network", "scripts": { "api": "node scripts/api.js", diff --git a/packages/dash-spv/package.json b/packages/dash-spv/package.json index bfd91054213..0e1f6b66461 100644 --- a/packages/dash-spv/package.json +++ b/packages/dash-spv/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dash-spv", - "version": "4.0.0", + "version": "4.0.1-hotfix.2", "description": "Repository containing SPV functions used by @dashevo", "main": "index.js", "scripts": { diff --git a/packages/dashmate/package.json b/packages/dashmate/package.json index bd77ad51abb..98c5dc62df7 100644 --- a/packages/dashmate/package.json +++ b/packages/dashmate/package.json @@ -1,6 +1,6 @@ { "name": "dashmate", - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "description": "Distribution package for Dash node installation", "scripts": { "lint": "eslint .", diff --git a/packages/dashmate/src/doctor/analyse/analyseConfigFactory.js b/packages/dashmate/src/doctor/analyse/analyseConfigFactory.js index 92458dd62fb..80007be0129 100644 --- a/packages/dashmate/src/doctor/analyse/analyseConfigFactory.js +++ b/packages/dashmate/src/doctor/analyse/analyseConfigFactory.js @@ -1,6 +1,7 @@ import chalk from 'chalk'; import { NETWORK_LOCAL, NETWORK_MAINNET } from '../../constants.js'; -import { ERRORS } from '../../ssl/zerossl/validateZeroSslCertificateFactory.js'; +import { ERRORS as LETSENCRYPT_ERRORS } from '../../ssl/letsencrypt/validateLetsEncryptCertificateFactory.js'; +import { ERRORS as ZEROSSL_ERRORS } from '../../ssl/zerossl/validateZeroSslCertificateFactory.js'; import { SEVERITY } from '../Prescription.js'; import Problem from '../Problem.js'; @@ -82,51 +83,80 @@ Private key file path: {bold.cyanBright ${ssl?.data?.privateFilePath}} Or use ZeroSSL https://docs.dash.org/en/stable/masternodes/dashmate.html#ssl-certificate`, }, // ZeroSSL validation errors - [ERRORS.API_KEY_IS_NOT_SET]: { + [ZEROSSL_ERRORS.API_KEY_IS_NOT_SET]: { description: 'ZeroSSL API key is not set.', solution: chalk`Please obtain your API key from {underline.cyanBright https://app.zerossl.com/developer} And then update your configuration with {block.cyanBright dashmate config set platform.gateway.ssl.providerConfigs.zerossl.apiKey [KEY]}`, }, - [ERRORS.EXTERNAL_IP_IS_NOT_SET]: { + [ZEROSSL_ERRORS.EXTERNAL_IP_IS_NOT_SET]: { description: 'External IP is not set.', solution: chalk`Please update your configuration to include your external IP using {block.cyanBright dashmate config set externalIp [IP]}`, }, - [ERRORS.CERTIFICATE_ID_IS_NOT_SET]: { + [ZEROSSL_ERRORS.CERTIFICATE_ID_IS_NOT_SET]: { description: 'ZeroSSL certificate is not configured', solution: chalk`Please run {bold.cyanBright dashmate ssl obtain} to get a new certificate`, }, - [ERRORS.PRIVATE_KEY_IS_NOT_PRESENT]: { + [ZEROSSL_ERRORS.PRIVATE_KEY_IS_NOT_PRESENT]: { description: chalk`ZeroSSL private key file not found in ${ssl?.data?.privateKeyFilePath}.`, solution: chalk`Please regenerate the certificate using {bold.cyanBright dashmate ssl obtain --force} and revoke the previous certificate in the ZeroSSL dashboard`, }, - [ERRORS.EXTERNAL_IP_MISMATCH]: { + [ZEROSSL_ERRORS.EXTERNAL_IP_MISMATCH]: { description: chalk`ZeroSSL IP ${ssl?.data?.certificate.common_name} does not match external IP ${ssl?.data?.externalIp}.`, solution: chalk`Please regenerate the certificate using {bold.cyanBright dashmate ssl obtain --force} and revoke the previous certificate in the ZeroSSL dashboard`, }, - [ERRORS.CSR_FILE_IS_NOT_PRESENT]: { + [ZEROSSL_ERRORS.CSR_FILE_IS_NOT_PRESENT]: { description: chalk`ZeroSSL certificate request file not found in ${ssl?.data?.csrFilePath}. This makes auto-renewal impossible.`, solution: chalk`If you need auto renew, please regenerate the certificate using {bold.cyanBright dashmate ssl obtain --force} and revoke the previous certificate in the ZeroSSL dashboard`, }, - [ERRORS.CERTIFICATE_EXPIRES_SOON]: { + [ZEROSSL_ERRORS.CERTIFICATE_EXPIRES_SOON]: { description: chalk`ZeroSSL certificate expires at ${ssl?.data?.certificate.expires}.`, solution: chalk`Please run {bold.cyanBright dashmate ssl obtain} to get a new one`, }, - [ERRORS.CERTIFICATE_IS_NOT_VALIDATED]: { + [ZEROSSL_ERRORS.CERTIFICATE_IS_NOT_VALIDATED]: { description: chalk`ZeroSSL certificate is not approved.`, solution: chalk`Please run {bold.cyanBright dashmate ssl obtain} to confirm certificate`, }, - [ERRORS.CERTIFICATE_IS_NOT_VALID]: { + [ZEROSSL_ERRORS.CERTIFICATE_IS_NOT_VALID]: { description: chalk`ZeroSSL certificate is not valid.`, solution: chalk`Please run {bold.cyanBright dashmate ssl zerossl obtain} to get a new one.`, }, - [ERRORS.ZERO_SSL_API_ERROR]: { + [ZEROSSL_ERRORS.ZERO_SSL_API_ERROR]: { description: ssl?.data?.error?.message, solution: chalk`Please contact ZeroSSL support if needed.`, }, + // Let's Encrypt validation errors + [LETSENCRYPT_ERRORS.EMAIL_IS_NOT_SET]: { + description: 'Let\'s Encrypt email is not set.', + solution: chalk`Please update your configuration with {bold.cyanBright dashmate config set platform.gateway.ssl.providerConfigs.letsencrypt.email [EMAIL]}`, + }, + [LETSENCRYPT_ERRORS.EXTERNAL_IP_IS_NOT_SET]: { + description: 'External IP is not set.', + solution: chalk`Please update your configuration to include your external IP using {bold.cyanBright dashmate config set externalIp [IP]}`, + }, + [LETSENCRYPT_ERRORS.CERTIFICATE_NOT_FOUND]: { + description: 'Let\'s Encrypt certificate is not configured', + solution: chalk`Please run {bold.cyanBright dashmate ssl obtain --provider=letsencrypt} to get a new certificate`, + }, + [LETSENCRYPT_ERRORS.PRIVATE_KEY_NOT_FOUND]: { + description: chalk`Let's Encrypt private key file not found.`, + solution: chalk`Please regenerate the certificate using {bold.cyanBright dashmate ssl obtain --provider=letsencrypt --force}`, + }, + [LETSENCRYPT_ERRORS.CERTIFICATE_IP_MISMATCH]: { + description: chalk`Let's Encrypt certificate does not match external IP ${ssl?.data?.externalIp}.`, + solution: chalk`Please regenerate the certificate using {bold.cyanBright dashmate ssl obtain --provider=letsencrypt --force}`, + }, + [LETSENCRYPT_ERRORS.CERTIFICATE_EXPIRES_SOON]: { + description: chalk`Let's Encrypt certificate expires at ${ssl?.data?.certificate?.expires}.`, + solution: chalk`Please run {bold.cyanBright dashmate ssl obtain --provider=letsencrypt} to renew`, + }, + [LETSENCRYPT_ERRORS.CERTIFICATE_NOT_VALID]: { + description: chalk`Let's Encrypt certificate is not valid.`, + solution: chalk`Please run {bold.cyanBright dashmate ssl obtain --provider=letsencrypt --force} to get a new one.`, + }, }[ssl.error] ?? {}; if (description) { diff --git a/packages/dashmate/src/listr/tasks/doctor/collectSamplesTaskFactory.js b/packages/dashmate/src/listr/tasks/doctor/collectSamplesTaskFactory.js index b36def7246e..46d8f4fd7ad 100644 --- a/packages/dashmate/src/listr/tasks/doctor/collectSamplesTaskFactory.js +++ b/packages/dashmate/src/listr/tasks/doctor/collectSamplesTaskFactory.js @@ -5,6 +5,7 @@ import process from 'process'; import si from 'systeminformation'; import obfuscateConfig from '../../../config/obfuscateConfig.js'; import { DASHMATE_VERSION } from '../../../constants.js'; +import LegoCertificate from '../../../ssl/letsencrypt/LegoCertificate.js'; import Certificate from '../../../ssl/zerossl/Certificate.js'; import providers from '../../../status/providers.js'; import hideString from '../../../util/hideString.js'; @@ -35,6 +36,7 @@ async function fetchTextOrError(url) { * @param {getOperatingSystemInfo} getOperatingSystemInfo * @param {HomeDir} homeDir * @param {validateZeroSslCertificate} validateZeroSslCertificate + * @param {validateLetsEncryptCertificate} validateLetsEncryptCertificate * @return {collectSamplesTask} */ export default function collectSamplesTaskFactory( @@ -46,6 +48,7 @@ export default function collectSamplesTaskFactory( getOperatingSystemInfo, homeDir, validateZeroSslCertificate, + validateLetsEncryptCertificate, ) { /** * @typedef {function} collectSamplesTask @@ -116,6 +119,27 @@ export default function collectSamplesTaskFactory( return; } + case 'letsencrypt': { + const { + error, + data, + } = await validateLetsEncryptCertificate( + config, + LegoCertificate.EXPIRATION_LIMIT_DAYS, + ); + + obfuscateObjectRecursive(data, (_field, value) => (typeof value === 'string' ? value.replaceAll( + process.env.USER, + hideString(process.env.USER), + ) : value)); + + ctx.samples.setServiceInfo('gateway', 'ssl', { + error, + data, + }); + + return; + } case 'file': { // SSL certificate const certificatesDir = homeDir.joinPath( diff --git a/packages/dashmate/src/listr/tasks/ssl/letsencrypt/obtainLetsEncryptCertificateTaskFactory.js b/packages/dashmate/src/listr/tasks/ssl/letsencrypt/obtainLetsEncryptCertificateTaskFactory.js index 004e45de7d9..0e33318edd7 100644 --- a/packages/dashmate/src/listr/tasks/ssl/letsencrypt/obtainLetsEncryptCertificateTaskFactory.js +++ b/packages/dashmate/src/listr/tasks/ssl/letsencrypt/obtainLetsEncryptCertificateTaskFactory.js @@ -36,6 +36,39 @@ export default function obtainLetsEncryptCertificateTaskFactory( */ function obtainLetsEncryptCertificateTask(config) { return new Listr([ + { + title: 'Initialize configuration', + task: async (ctx) => { + // Always load config values (needed even when --force is used) + ctx.email = config.get('platform.gateway.ssl.providerConfigs.letsencrypt.email'); + ctx.externalIp = config.get('externalIp'); + ctx.legoDir = homeDir.joinPath(config.getName(), 'platform', 'gateway', 'lego'); + ctx.sslConfigDir = homeDir.joinPath(config.getName(), 'platform', 'gateway', 'ssl'); + + if (!ctx.email) { + throw new Error("Let's Encrypt email is not set. Please set it in the config file"); + } + + if (!ctx.externalIp) { + throw new Error('External IP is not set. Please set it in the config file'); + } + + // Ensure lego directories exist + fs.mkdirSync(ctx.legoDir, { recursive: true }); + fs.mkdirSync(path.join(ctx.legoDir, 'certificates'), { recursive: true }); + fs.mkdirSync(path.join(ctx.legoDir, 'accounts'), { recursive: true }); + + // Set paths + ctx.legoCertPath = path.join(ctx.legoDir, 'certificates', `${ctx.externalIp}.crt`); + ctx.legoKeyPath = path.join(ctx.legoDir, 'certificates', `${ctx.externalIp}.key`); + + // When force is used, skip validation and obtain new certificate + if (ctx.force) { + ctx.certificateValid = false; + ctx.isRenewal = false; + } + }, + }, { title: 'Check if certificate already exists and is valid', skip: (ctx) => ctx.force, @@ -43,11 +76,12 @@ export default function obtainLetsEncryptCertificateTaskFactory( const expirationDays = ctx.expirationDays ?? LegoCertificate.EXPIRATION_LIMIT_DAYS; const { error, data } = await validateLetsEncryptCertificate(config, expirationDays); - Object.assign(ctx, data); - - // Ensure lego directory exists - fs.mkdirSync(ctx.legoDir, { recursive: true }); - fs.mkdirSync(path.join(ctx.legoDir, 'certificates'), { recursive: true }); + // Merge validation data (but don't overwrite already-set values) + Object.keys(data).forEach((key) => { + if (ctx[key] === undefined) { + ctx[key] = data[key]; + } + }); switch (error) { case undefined: @@ -109,6 +143,7 @@ export default function obtainLetsEncryptCertificateTaskFactory( // Build lego command arguments // --disable-cn is needed for IP address certificates + // --key-type rsa2048 is needed because node-forge doesn't support ECDSA const legoArgs = [ '--server=https://acme-v02.api.letsencrypt.org/directory', '--email', ctx.email, @@ -117,15 +152,15 @@ export default function obtainLetsEncryptCertificateTaskFactory( '--http.port', ':80', '--domains', ctx.externalIp, '--disable-cn', + '--key-type', 'rsa2048', '--path', '/data', command, ]; - // Add profile for initial run - if (!ctx.isRenewal) { - legoArgs.push('--profile', 'shortlived'); - } else { - // For renewal, renew if within 30 days of expiry (default) + // shortlived profile is required for IP address certificates + legoArgs.push('--profile', 'shortlived'); + + if (ctx.isRenewal) { legoArgs.push('--days', '30'); } diff --git a/packages/dashpay-contract/package.json b/packages/dashpay-contract/package.json index 630f5ebab03..212a647ce1f 100644 --- a/packages/dashpay-contract/package.json +++ b/packages/dashpay-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dashpay-contract", - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "description": "Reference contract of the DashPay DPA on Dash Evolution", "scripts": { "lint": "eslint .", diff --git a/packages/dpns-contract/package.json b/packages/dpns-contract/package.json index ef7e04ebf62..686566615d5 100644 --- a/packages/dpns-contract/package.json +++ b/packages/dpns-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dpns-contract", - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "description": "A contract and helper scripts for DPNS DApp", "scripts": { "lint": "eslint .", diff --git a/packages/feature-flags-contract/package.json b/packages/feature-flags-contract/package.json index a23e2072a28..fd12b822e87 100644 --- a/packages/feature-flags-contract/package.json +++ b/packages/feature-flags-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/feature-flags-contract", - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "description": "Data Contract to store Dash Platform feature flags", "scripts": { "build": "", diff --git a/packages/js-dapi-client/package.json b/packages/js-dapi-client/package.json index 764a5ef4359..fdd95ba2bc2 100644 --- a/packages/js-dapi-client/package.json +++ b/packages/js-dapi-client/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dapi-client", - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "description": "Client library used to access Dash DAPI endpoints", "main": "lib/index.js", "contributors": [ diff --git a/packages/js-dash-sdk/package.json b/packages/js-dash-sdk/package.json index 127e3eaeb8a..6b455650909 100644 --- a/packages/js-dash-sdk/package.json +++ b/packages/js-dash-sdk/package.json @@ -1,6 +1,6 @@ { "name": "dash", - "version": "6.0.0", + "version": "6.0.1-hotfix.2", "description": "Dash library for JavaScript/TypeScript ecosystem (Wallet, DAPI, Primitives, BLS, ...)", "main": "build/index.js", "unpkg": "dist/dash.min.js", diff --git a/packages/js-evo-sdk/package.json b/packages/js-evo-sdk/package.json index c6528c38993..1d96227ae5c 100644 --- a/packages/js-evo-sdk/package.json +++ b/packages/js-evo-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/evo-sdk", - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "type": "module", "main": "./dist/evo-sdk.module.js", "types": "./dist/sdk.d.ts", diff --git a/packages/js-grpc-common/package.json b/packages/js-grpc-common/package.json index 8151e7f4c54..7e18a2a3122 100644 --- a/packages/js-grpc-common/package.json +++ b/packages/js-grpc-common/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/grpc-common", - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "description": "Common GRPC library", "main": "index.js", "scripts": { diff --git a/packages/keyword-search-contract/package.json b/packages/keyword-search-contract/package.json index 647483bee2c..f1f15f7dd0c 100644 --- a/packages/keyword-search-contract/package.json +++ b/packages/keyword-search-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/keyword-search-contract", - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "description": "A contract that allows searching for contracts", "scripts": { "lint": "eslint .", diff --git a/packages/masternode-reward-shares-contract/package.json b/packages/masternode-reward-shares-contract/package.json index 811bae73afe..8cb0f20be52 100644 --- a/packages/masternode-reward-shares-contract/package.json +++ b/packages/masternode-reward-shares-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/masternode-reward-shares-contract", - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "description": "A contract and helper scripts for reward sharing", "scripts": { "lint": "eslint .", diff --git a/packages/platform-test-suite/package.json b/packages/platform-test-suite/package.json index bb09c35a236..3ccd184384b 100644 --- a/packages/platform-test-suite/package.json +++ b/packages/platform-test-suite/package.json @@ -1,7 +1,7 @@ { "name": "@dashevo/platform-test-suite", "private": true, - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "description": "Dash Network end-to-end tests", "scripts": { "test": "yarn exec bin/test.sh", diff --git a/packages/token-history-contract/package.json b/packages/token-history-contract/package.json index 0ff8a1fc1c0..1bd720af246 100644 --- a/packages/token-history-contract/package.json +++ b/packages/token-history-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/token-history-contract", - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "description": "The token history contract", "scripts": { "lint": "eslint .", diff --git a/packages/wallet-lib/package.json b/packages/wallet-lib/package.json index b058bce93a6..99c8f1860bb 100644 --- a/packages/wallet-lib/package.json +++ b/packages/wallet-lib/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wallet-lib", - "version": "10.0.0", + "version": "10.0.1-hotfix.2", "description": "Light wallet library for Dash", "main": "src/index.js", "unpkg": "dist/wallet-lib.min.js", diff --git a/packages/wallet-utils-contract/package.json b/packages/wallet-utils-contract/package.json index 531474d3f25..69a5c4ffc76 100644 --- a/packages/wallet-utils-contract/package.json +++ b/packages/wallet-utils-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wallet-utils-contract", - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "description": "A contract and helper scripts for Wallet DApp", "scripts": { "lint": "eslint .", diff --git a/packages/wasm-dpp/package.json b/packages/wasm-dpp/package.json index 4a0bfb9a7e1..b4c2e863929 100644 --- a/packages/wasm-dpp/package.json +++ b/packages/wasm-dpp/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wasm-dpp", - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "description": "The JavaScript implementation of the Dash Platform Protocol", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/wasm-dpp2/package.json b/packages/wasm-dpp2/package.json index a6ebe37cc4f..9b5fb490e9c 100644 --- a/packages/wasm-dpp2/package.json +++ b/packages/wasm-dpp2/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wasm-dpp2", - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "type": "module", "main": "./dist/dpp.js", "types": "./dist/dpp.d.ts", diff --git a/packages/wasm-drive-verify/package.json b/packages/wasm-drive-verify/package.json index b3a9966f7a1..94951334f62 100644 --- a/packages/wasm-drive-verify/package.json +++ b/packages/wasm-drive-verify/package.json @@ -3,7 +3,7 @@ "collaborators": [ "Dash Core Group " ], - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "license": "MIT", "description": "WASM bindings for Drive verify functions", "repository": { diff --git a/packages/wasm-sdk/package.json b/packages/wasm-sdk/package.json index a81af30aaab..570c6c7fa08 100644 --- a/packages/wasm-sdk/package.json +++ b/packages/wasm-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wasm-sdk", - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "type": "module", "main": "./dist/sdk.js", "types": "./dist/sdk.d.ts", diff --git a/packages/withdrawals-contract/package.json b/packages/withdrawals-contract/package.json index 01ac9cbaa19..2cca7ed1733 100644 --- a/packages/withdrawals-contract/package.json +++ b/packages/withdrawals-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/withdrawals-contract", - "version": "3.0.0", + "version": "3.0.1-hotfix.2", "description": "Data Contract to manipulate and track withdrawals", "scripts": { "build": "",