Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,14 @@ export default function getBaseConfigFactory() {
tenderdash: {
mode: 'full',
docker: {
image: 'dashpay/tenderdash:1.5',
image: 'dashpay/tenderdash:1.6-dev.1',
},
p2p: {
host: '0.0.0.0',
port: 26656,
persistentPeers: [],
seeds: [],
allowlistOnly: false,
flushThrottleTimeout: '100ms',
maxPacketMsgPayloadSize: 10240,
sendRate: 5120000,
Expand Down
21 changes: 21 additions & 0 deletions packages/dashmate/configs/getConfigFileMigrationsFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -1403,6 +1403,27 @@ export default function getConfigFileMigrationsFactory(homeDir, defaultConfigs)
.forEach(([, options]) => {
options.core.docker.image = 'dashpay/dashd:23';
});

return configFile;
},
'3.1.0': (configFile) => {
Object.entries(configFile.configs)
.forEach(([name, options]) => {
const defaultConfig = getDefaultConfigByNameOrGroup(name, options.group);

if (options.platform?.drive?.tenderdash?.docker
&& defaultConfig.has('platform.drive.tenderdash.docker.image')) {
options.platform.drive.tenderdash.docker.image = defaultConfig
.get('platform.drive.tenderdash.docker.image');
}

if (options.platform?.drive?.tenderdash?.p2p
&& typeof options.platform.drive.tenderdash.p2p.allowlistOnly === 'undefined') {
options.platform.drive.tenderdash.p2p.allowlistOnly = defaultConfig
.get('platform.drive.tenderdash.p2p.allowlistOnly');
}
});

return configFile;
},
};
Expand Down
1 change: 1 addition & 0 deletions packages/dashmate/docs/config/tenderdash.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ These settings control the peer-to-peer network for Tenderdash nodes:
| `platform.drive.tenderdash.p2p.host` | Host binding for P2P | `0.0.0.0` | `127.0.0.1` |
| `platform.drive.tenderdash.p2p.persistentPeers` | Array of peers to maintain persistent connections with | `[]` | See example below |
| `platform.drive.tenderdash.p2p.seeds` | Array of seed nodes for peer discovery | `[]` | See example below |
| `platform.drive.tenderdash.p2p.allowlistOnly` | Only allow peers from `persistentPeers` and `seeds` | `false` | `true` |
| `platform.drive.tenderdash.p2p.flushThrottleTimeout` | Throttle timeout for P2P data | `100ms` | `200ms` |
| `platform.drive.tenderdash.p2p.maxPacketMsgPayloadSize` | Maximum P2P message size | `10240` | `20480` |
| `platform.drive.tenderdash.p2p.sendRate` | P2P send rate limit | `5120000` | `10240000` |
Expand Down
5 changes: 4 additions & 1 deletion packages/dashmate/src/config/configJsonSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,9 @@ export default {
$ref: '#/definitions/tenderdashNodeAddress',
},
},
allowlistOnly: {
type: 'boolean',
},
Comment thread
coderabbitai[bot] marked this conversation as resolved.
flushThrottleTimeout: {
$ref: '#/definitions/duration',
},
Expand All @@ -1097,7 +1100,7 @@ export default {
minimum: 1,
},
},
required: ['host', 'port', 'persistentPeers', 'seeds', 'flushThrottleTimeout', 'maxPacketMsgPayloadSize', 'sendRate', 'recvRate', 'maxConnections', 'maxOutgoingConnections'],
required: ['host', 'port', 'persistentPeers', 'seeds', 'allowlistOnly', 'flushThrottleTimeout', 'maxPacketMsgPayloadSize', 'sendRate', 'recvRate', 'maxConnections', 'maxOutgoingConnections'],
additionalProperties: false,
},
mempool: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ bootstrap-peers = "{{~it.platform.drive.tenderdash.p2p.seeds :seed:index}}{{? in
# Comma separated list of nodes to keep persistent connections to
persistent-peers = "{{~it.platform.drive.tenderdash.p2p.persistentPeers :peer:index}}{{? index }},{{?}}{{=peer.id}}@{{=peer.host}}:{{=peer.port}}{{~}}"

# If true, only peers from persistent-peers and bootstrap-peers are allowed
# to connect (inbound and outbound).
allowlist-only = {{? it.platform.drive.tenderdash.p2p.allowlistOnly }}true{{??}}false{{?}}

# UPNP port forwarding
upnp = false

Expand Down
Loading