Skip to content
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

chore(dashmate): limit concurrent state transition checks #1824

Merged
merged 4 commits into from
Apr 26, 2024
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
3 changes: 2 additions & 1 deletion packages/dashmate/configs/defaults/getBaseConfigFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export default function getBaseConfigFactory(homeDir) {
tenderdash: {
mode: 'full',
docker: {
image: 'dashpay/tenderdash:0.14.0-dev.5',
image: 'dashpay/tenderdash:0.14.0-dev.6',
},
p2p: {
host: '0.0.0.0',
Expand Down Expand Up @@ -241,6 +241,7 @@ export default function getBaseConfigFactory(homeDir) {
txEnqueueTimeout: '0',
txSendRateLimit: 0,
txRecvRateLimit: 0,
maxConcurrentCheckTx: 250,
},
consensus: {
createEmptyBlocks: true,
Expand Down
9 changes: 9 additions & 0 deletions packages/dashmate/configs/getConfigFileMigrationsFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,15 @@ export default function getConfigFileMigrationsFactory(homeDir, defaultConfigs)

return configFile;
},
'1.0.0-dev.12': (configFile) => {
Object.entries(configFile.configs)
.forEach(([, options]) => {
options.platform.drive.tenderdash.docker.image = base.get('platform.drive.tenderdash.docker.image');
options.platform.drive.tenderdash.mempool.maxConcurrentCheckTx = base.get('platform.drive.tenderdash.mempool.maxConcurrentCheckTx');
});

return configFile;
},
};
}

Expand Down
6 changes: 5 additions & 1 deletion packages/dashmate/src/config/configJsonSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -656,9 +656,13 @@ export default {
type: 'integer',
minimum: 0,
},
maxConcurrentCheckTx: {
type: 'integer',
minimum: 0,
},
},
additionalProperties: false,
required: ['size', 'maxTxsBytes', 'cacheSize', 'timeoutCheckTx', 'txEnqueueTimeout', 'txSendRateLimit', 'txRecvRateLimit'],
required: ['size', 'maxTxsBytes', 'cacheSize', 'timeoutCheckTx', 'txEnqueueTimeout', 'txSendRateLimit', 'txRecvRateLimit', 'maxConcurrentCheckTx'],
},
consensus: {
type: 'object',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
### Main Base Config Options ###
#######################################################################

# TCP or UNIX socket address of the ABCI application,
# or the name of an ABCI application compiled in with the Tendermint binary
#proxy-app = "tcp://drive_abci:26658"
proxy-app = "CheckTx:grpc:drive_abci:26670,*:socket:tcp://drive_abci:26658"

# A custom human readable name for this node
{{?it.platform.drive.tenderdash.moniker}}moniker = "{{=it.platform.drive.tenderdash.moniker}}"{{?}}

Expand Down Expand Up @@ -72,13 +67,38 @@ genesis-file = "config/genesis.json"
# Path to the JSON file containing the private key to use for node authentication in the p2p protocol
node-key-file = "config/node_key.json"

# Mechanism to connect to the ABCI application: socket | grpc
abci = "routed"

# If true, query the ABCI app on connecting to a new peer
# so the app can decide if we should keep the connection or not
filter-peers = false

#######################################################
### ABCI App Connection Options ###
#######################################################
[abci]
# TCP or UNIX socket address of the ABCI application,
# or routing rules for routed multi-app setup,
# or the name of an ABCI application compiled in with the Tendermint binary
# Example for routed multi-app setup:
# abci = "routed"
# address = "Info:socket:unix:///tmp/socket.1,Info:socket:unix:///tmp/socket.2,CheckTx:socket:unix:///tmp/socket.1,*:socket:unix:///tmp/socket.3"
address = "CheckTx:grpc:drive_abci:26670,*:socket:tcp://drive_abci:26658"
# Transport mechanism to connect to the ABCI application: socket | grpc | routed
transport = "routed"
# Maximum number of simultaneous connections to the ABCI application
# per each method. Map of a gRPC method name,like "echo", to the number of concurrent connections.
# Special value "*" can be used to set the default limit for methods not explicitly listed.
#
# Example:
#
# grpc-concurrency = [
# { "*" = 10 },
# { "echo" = 2 },
# { "info" = 2 },
#]
grpc-concurrency = [
{ "check_tx" = {{= it.platform.drive.tenderdash.mempool.maxConcurrentCheckTx }} },
]


#######################################################
### Priv Validator Configuration ###
Expand Down
Loading