Skip to content

Commit

Permalink
Merge branch 'v0.25-dev' into fix/dashmate/drive-log
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/dashmate/configs/getConfigFileMigrationsFactory.js
  • Loading branch information
shumkov committed Sep 25, 2023
2 parents c56d1ed + e53d5d4 commit 03ef89f
Show file tree
Hide file tree
Showing 34 changed files with 110 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .github/actions/docker/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ runs:
uses: dcginfra/buildkit-cache-dance/inject@main
if: ${{ inputs.cache_mounts != '' }}
with:
bucket: multi-runner-linux-x64-platform-cache-gy9micic
bucket: multi-runner-linux-x64-platform-cache-16w9s18k
mounts: ${{ inputs.cache_mounts }}

- name: Set suffix
Expand Down Expand Up @@ -136,5 +136,5 @@ runs:
uses: dcginfra/buildkit-cache-dance/extract@main
if: ${{ inputs.cache_mounts != '' }}
with:
bucket: multi-runner-linux-x64-platform-cache-gy9micic
bucket: multi-runner-linux-x64-platform-cache-16w9s18k
mounts: ${{ inputs.cache_mounts }}
2 changes: 1 addition & 1 deletion .github/actions/nodejs/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ runs:
uses: everpcpc/actions-cache@v1
if: contains(runner.name, 'ubuntu-platform')
with:
bucket: multi-runner-linux-x64-platform-cache-gy9micic
bucket: multi-runner-linux-x64-platform-cache-16w9s18k
root: actions-cache
path: |
.yarn/unplugged
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/rust/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ runs:
uses: everpcpc/actions-cache@v1
if: contains(runner.name, 'ubuntu-platform')
with:
bucket: multi-runner-linux-x64-platform-cache-gy9micic
bucket: multi-runner-linux-x64-platform-cache-16w9s18k
root: actions-cache
path: |
/home/ubuntu/.cargo/registry/index
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/s3-layer-cache-settings/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ inputs:
default: eu-west-1
bucket:
description: S3 bucket name
default: multi-runner-linux-x64-platform-cache-gy9micic
default: multi-runner-linux-x64-platform-cache-16w9s18k
prefix:
description: S3 key prefix
default: 'cache-layers/'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/all-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
- name: Load Docker mount cache
uses: dcginfra/buildkit-cache-dance/inject@main
with:
bucket: multi-runner-linux-x64-platform-cache-gy9micic
bucket: multi-runner-linux-x64-platform-cache-16w9s18k
mounts: |
cargo_registry_index
cargo_registry_cache
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
- name: Store Docker mount cache
uses: dcginfra/buildkit-cache-dance/extract@main
with:
bucket: multi-runner-linux-x64-platform-cache-gy9micic
bucket: multi-runner-linux-x64-platform-cache-16w9s18k
mounts: |
cargo_registry_index
cargo_registry_cache
Expand Down Expand Up @@ -226,7 +226,7 @@ jobs:
- name: Load Docker mount cache
uses: dcginfra/buildkit-cache-dance/inject@main
with:
bucket: multi-runner-linux-x64-platform-cache-gy9micic
bucket: multi-runner-linux-x64-platform-cache-16w9s18k
mounts: |
cargo_registry_index
cargo_registry_cache
Expand Down Expand Up @@ -277,7 +277,7 @@ jobs:
- name: Store Docker mount cache
uses: dcginfra/buildkit-cache-dance/extract@main
with:
bucket: multi-runner-linux-x64-platform-cache-gy9micic
bucket: multi-runner-linux-x64-platform-cache-16w9s18k
mounts: |
cargo_registry_index
cargo_registry_cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/js-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
if: ${{ inputs.start-local-network }}
uses: dcginfra/buildkit-cache-dance/inject@main
with:
bucket: multi-runner-linux-x64-platform-cache-gy9micic
bucket: multi-runner-linux-x64-platform-cache-16w9s18k
mounts: |
cargo_registry_index
cargo_registry_cache
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
if: ${{ inputs.start-local-network }}
uses: dcginfra/buildkit-cache-dance/extract@main
with:
bucket: multi-runner-linux-x64-platform-cache-gy9micic
bucket: multi-runner-linux-x64-platform-cache-16w9s18k
mounts: |
cargo_registry_index
cargo_registry_cache
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
## [0.25.0-dev.29](https://github.com/dashpay/platform/compare/v0.25.0-dev.28...v0.25.0-dev.29) (2023-09-22)


### Features

* **dashmate:** expose tenderdash metics ([#1419](https://github.com/dashpay/platform/issues/1419))


### Bug Fixes

* **dapi:** getTransaction google-protobuf AssertionError ([#1416](https://github.com/dashpay/platform/issues/1416))
* **dashmate:** platform reset failure ([#1415](https://github.com/dashpay/platform/issues/1415))


### Miscellaneous Chores

* **dashmate:** add images migrations for v25 ([#1377](https://github.com/dashpay/platform/issues/1377))
* update testnet genesis config for testnet-24 ([#1413](https://github.com/dashpay/platform/issues/1413))


### Continuous Integration

* make self-hosted actions-cache steps access S3 from correct region ([#1407](https://github.com/dashpay/platform/issues/1407))
* update cache target bucket ([#1418](https://github.com/dashpay/platform/issues/1418))

## [0.25.0-dev.28](https://github.com/dashpay/platform/compare/v0.25.0-dev.27...v0.25.0-dev.28) (2023-09-19)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dashevo/platform",
"version": "0.25.0-dev.28",
"version": "0.25.0-dev.29",
"private": true,
"scripts": {
"setup": "yarn install && yarn run build && yarn run configure",
Expand Down
2 changes: 1 addition & 1 deletion packages/bench-suite/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dashevo/bench-suite",
"private": true,
"version": "0.25.0-dev.28",
"version": "0.25.0-dev.29",
"description": "Dash Platform benchmark tool",
"scripts": {
"bench": "node ./bin/bench.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/dapi-grpc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dashevo/dapi-grpc",
"version": "0.25.0-dev.28",
"version": "0.25.0-dev.29",
"description": "DAPI GRPC definition file and generated clients",
"browser": "browser.js",
"main": "node.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/dapi/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dashevo/dapi",
"private": true,
"version": "0.25.0-dev.28",
"version": "0.25.0-dev.29",
"description": "A decentralized API for the Dash network",
"scripts": {
"api": "node scripts/api.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/dash-spv/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dashevo/dash-spv",
"version": "0.25.0-dev.28",
"version": "0.25.0-dev.29",
"description": "Repository containing SPV functions used by @dashevo",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions packages/dashmate/configs/defaults/getBaseConfigFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ function getBaseConfigFactory(homeDir) {
enabled: false,
port: 6060,
},
metrics: {
enabled: false,
port: 26660,
},
consensus: {
createEmptyBlocks: true,
createEmptyBlocksInterval: '3m',
Expand Down
6 changes: 6 additions & 0 deletions packages/dashmate/configs/defaults/getLocalConfigFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ function getLocalConfigFactory(getBaseConfig) {
rpc: {
port: 46657,
},
pprof: {
port: 46060,
},
metrics: {
port: 46660,
},
},
abci: {
validatorSet: {
Expand Down
6 changes: 6 additions & 0 deletions packages/dashmate/configs/defaults/getTestnetConfigFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ function getTestnetConfigFactory(homeDir, getBaseConfig) {
rpc: {
port: 36657,
},
pprof: {
port: 36060,
},
metrics: {
port: 36660,
},
genesis: {
genesis_time: '2023-04-26T10:43:20.921Z',
chain_id: 'dash-testnet-24',
Expand Down
20 changes: 17 additions & 3 deletions packages/dashmate/configs/getConfigFileMigrationsFactory.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-param-reassign */

const { NETWORK_LOCAL, NETWORK_TESTNET } = require('../src/constants');
const { NETWORK_LOCAL, NETWORK_TESTNET, NETWORK_MAINNET } = require('../src/constants');

/**
* @param {HomeDir} homeDir
Expand Down Expand Up @@ -139,7 +139,15 @@ function getConfigFileMigrationsFactory(homeDir, defaultConfigs) {
},
'0.25.0-dev.29': (configFile) => {
Object.entries(configFile.configs)
.forEach(([, options]) => {
.forEach(([name, options]) => {
if (options.network !== NETWORK_MAINNET) {
options.core.docker.image = base.get('core.docker.image');

options.platform.dapi.api.docker.image = base.get('platform.dapi.api.docker.image');
options.platform.drive.abci.docker.image = base.get('platform.drive.abci.docker.image');
options.platform.drive.tenderdash.docker.image = base.get('platform.drive.tenderdash.docker.image');
}

if (options.platform.drive.abci.log.jsonFile.level === 'fatal') {
options.platform.drive.abci.log.jsonFile.level = 'error';
}
Expand All @@ -149,7 +157,13 @@ function getConfigFileMigrationsFactory(homeDir, defaultConfigs) {
}

if (options.network === NETWORK_TESTNET) {
options.platform.drive.tenderdash.genesis = testnet.get('platform.drive.tenderdash.genesis');
options.platform.drive.tenderdash.genesis.chain_id = testnet.get('platform.drive.tenderdash.genesis.chain_id');
options.platform.drive.tenderdash
.genesis.initial_core_chain_locked_height = testnet.get('platform.drive.tenderdash.genesis.initial_core_chain_locked_height');
}

if (defaultConfigs.has(name) && !options.platform.drive.tenderdash.metrics) {
options.platform.drive.tenderdash.metrics = defaultConfigs.get(name).get('platform.drive.tenderdash.metrics');
}
});
return configFile;
Expand Down
1 change: 1 addition & 0 deletions packages/dashmate/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ services:
- ${DOCKER_NETWORK_BIND_IP:?err}:${PLATFORM_DRIVE_TENDERDASH_P2P_PORT:?err}:${PLATFORM_DRIVE_TENDERDASH_P2P_PORT:?err} # P2P
- 127.0.0.1:${PLATFORM_DRIVE_TENDERDASH_RPC_PORT:?err}:${PLATFORM_DRIVE_TENDERDASH_RPC_PORT:?err} # RPC
- 127.0.0.1:${PLATFORM_DRIVE_TENDERDASH_PPROF_PORT:?err}:${PLATFORM_DRIVE_TENDERDASH_PPROF_PORT:?err} # pprof
- 127.0.0.1:${PLATFORM_DRIVE_TENDERDASH_METRICS_PORT:?err}:${PLATFORM_DRIVE_TENDERDASH_METRICS_PORT:?err} # Metrics
volumes:
- drive_tenderdash:/tenderdash
- ${DASHMATE_HOME_DIR:?err}/${CONFIG_NAME:?err}/platform/drive/tenderdash:/tenderdash/config:ro
Expand Down
2 changes: 1 addition & 1 deletion packages/dashmate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dashmate",
"version": "0.25.0-dev.28",
"version": "0.25.0-dev.29",
"description": "Distribution package for Dash node installation",
"scripts": {
"lint": "eslint .",
Expand Down
16 changes: 15 additions & 1 deletion packages/dashmate/src/config/configJsonSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,20 @@ module.exports = {
required: ['enabled', 'port'],
additionalProperties: false,
},
metrics: {
description: 'Prometheus metrics',
type: 'object',
properties: {
enabled: {
type: 'boolean',
},
port: {
$ref: '#/definitions/port',
},
},
required: ['enabled', 'port'],
additionalProperties: false,
},
node: {
type: 'object',
properties: {
Expand All @@ -549,7 +563,7 @@ module.exports = {
type: 'object',
},
},
required: ['mode', 'docker', 'p2p', 'consensus', 'log', 'rpc', 'pprof', 'node', 'moniker', 'genesis'],
required: ['mode', 'docker', 'p2p', 'consensus', 'log', 'rpc', 'pprof', 'node', 'moniker', 'genesis', 'metrics'],
additionalProperties: false,
},
},
Expand Down
5 changes: 3 additions & 2 deletions packages/dashmate/src/listr/tasks/resetNodeTaskFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ function resetNodeTaskFactory(
{
title: 'Check services are not running',
skip: (ctx) => ctx.isForce,
task: async () => {
if (await dockerCompose.isNodeRunning(config)) {
task: async (ctx) => {
if (await dockerCompose.isNodeRunning(config,
{ profiles: ctx.isPlatformOnlyReset ? ['platform'] : [] })) {
throw new Error('Running services detected. Please ensure all services are stopped for this config before starting');
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ function setupLocalPresetTaskFactory(
config.set('platform.drive.tenderdash.p2p.port', config.get('platform.drive.tenderdash.p2p.port') + (i * 100));
config.set('platform.drive.tenderdash.rpc.port', config.get('platform.drive.tenderdash.rpc.port') + (i * 100));
config.set('platform.drive.tenderdash.pprof.port', config.get('platform.drive.tenderdash.pprof.port') + (i * 100));
config.set('platform.drive.tenderdash.metrics.port', config.get('platform.drive.tenderdash.metrics.port') + (i * 100));
config.set('platform.drive.tenderdash.moniker', config.name);

config.set('platform.drive.tenderdash.mode', 'validator');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,10 @@ psql-conn = ""
# When true, Prometheus metrics are served under /metrics on
# PrometheusListenAddr.
# Check out the documentation for the list of available metrics.
prometheus = false
prometheus = {{? it.platform.drive.tenderdash.metrics.enabled }}true{{??}}false{{?}}

# Address to listen for Prometheus collector(s) connections
prometheus-listen-addr = ":26660"
prometheus-listen-addr = ":{{= it.platform.drive.tenderdash.metrics.port }}"

# Maximum number of simultaneous connections.
# If you want to accept a larger number than the default, make sure
Expand All @@ -498,4 +498,4 @@ prometheus-listen-addr = ":26660"
max-open-connections = 3

# Instrumentation namespace
namespace = "drive_tendermint"
namespace = "drive_tenderdash"
2 changes: 1 addition & 1 deletion packages/dashpay-contract/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dashevo/dashpay-contract",
"version": "0.25.0-dev.28",
"version": "0.25.0-dev.29",
"description": "Reference contract of the DashPay DPA on Dash Evolution",
"scripts": {
"lint": "eslint .",
Expand Down
2 changes: 1 addition & 1 deletion packages/dpns-contract/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dashevo/dpns-contract",
"version": "0.25.0-dev.28",
"version": "0.25.0-dev.29",
"description": "A contract and helper scripts for DPNS DApp",
"scripts": {
"lint": "eslint .",
Expand Down
2 changes: 1 addition & 1 deletion packages/feature-flags-contract/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dashevo/feature-flags-contract",
"version": "0.25.0-dev.28",
"version": "0.25.0-dev.29",
"description": "Data Contract to store Dash Platform feature flags",
"scripts": {
"build": "",
Expand Down
2 changes: 1 addition & 1 deletion packages/js-dapi-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dashevo/dapi-client",
"version": "0.25.0-dev.28",
"version": "0.25.0-dev.29",
"description": "Client library used to access Dash DAPI endpoints",
"main": "lib/index.js",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/js-dash-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dash",
"version": "3.25.0-dev.28",
"version": "3.25.0-dev.29",
"description": "Dash library for JavaScript/TypeScript ecosystem (Wallet, DAPI, Primitives, BLS, ...)",
"main": "build/index.js",
"unpkg": "dist/dash.min.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/js-dpp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dashevo/dpp",
"version": "0.25.0-dev.28",
"version": "0.25.0-dev.29",
"description": "The JavaScript implementation of the Dash Platform Protocol",
"scripts": {
"lint": "eslint .",
Expand Down
2 changes: 1 addition & 1 deletion packages/js-grpc-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dashevo/grpc-common",
"version": "0.25.0-dev.28",
"version": "0.25.0-dev.29",
"description": "Common GRPC library",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/masternode-reward-shares-contract/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dashevo/masternode-reward-shares-contract",
"version": "0.25.0-dev.28",
"version": "0.25.0-dev.29",
"description": "A contract and helper scripts for reward sharing",
"scripts": {
"lint": "eslint .",
Expand Down
Loading

0 comments on commit 03ef89f

Please sign in to comment.