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

Increasing number of service agreements considered in command and command executor #3241

Merged
merged 5 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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 @@ -54,7 +54,7 @@ class BlockchainEpochCheckCommand extends Command {
// We don't expect to have this many transactions in one epoch check window.
// This is just to make sure we don't schedule too many commands and block the queue
// TODO: find general solution for all commands scheduling blockchain transactions
totalTransactions = Math.min(totalTransactions, COMMAND_QUEUE_PARALLELISM * 0.3);
totalTransactions = Math.min(totalTransactions, Math.floor(COMMAND_QUEUE_PARALLELISM / 3));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change this part?

Copy link
Collaborator Author

@Mihajlo-Pavlovic Mihajlo-Pavlovic Jul 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We added *0.5 as we added gnosis chain, and changed it to 0.3 when base was added, not to let a single chain. With 0.3 we let 10% of queue go unused so just fixed that.

When I think about maybe it makes sense to go with / number_of_enabled_chains


const transactionQueueLength =
this.blockchainModuleManager.getTotalTransactionQueueLength(blockchain);
Expand Down
2 changes: 1 addition & 1 deletion src/constants/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ export const ARCHIVE_UPDATE_RESPONSES_FOLDER = 'update_responses';
* How many commands will run in parallel
* @type {number}
*/
export const COMMAND_QUEUE_PARALLELISM = 100;
export const COMMAND_QUEUE_PARALLELISM = 150;

export const GET_LATEST_SERVICE_AGREEMENT_BATCH_SIZE = 50;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class ServiceAgreementRepository {
['scoreFunctionId', 'DESC'],
[Sequelize.col('timeLeftInSubmitCommitWindow'), 'ASC'],
],
limit: 100,
limit: 500,
raw: true,
});
}
Expand Down Expand Up @@ -249,7 +249,7 @@ class ServiceAgreementRepository {
['scoreFunctionId', 'DESC'],
[Sequelize.col('timeLeftInSubmitProofWindow'), 'ASC'],
],
limit: 100,
limit: 500,
raw: true,
});
}
Expand Down
Loading