Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

feat: adding functionality to stop sequencer on specific batch num from config param.#2282

Merged
Psykepro merged 1 commit intorelease/v0.2.0from
feature/stop-sequencer-on-batch-num
Jul 13, 2023
Merged

feat: adding functionality to stop sequencer on specific batch num from config param.#2282
Psykepro merged 1 commit intorelease/v0.2.0from
feature/stop-sequencer-on-batch-num

Conversation

@Psykepro
Copy link
Contributor

@Psykepro Psykepro commented Jul 12, 2023

Closes #2281

What does this PR do?

This pull request introduces a new configuration parameter for the sequencer, StopSequencerOnBatchNum. The purpose of this parameter is to offer more control over the operation of the sequencer. It allows system operators to halt the sequencer's transaction processing at a specific batch number, which can be helpful for various operational scenarios.

Here are the main changes implemented:

  1. Added StopSequencerOnBatchNum Parameter: A new parameter, StopSequencerOnBatchNum, has been added to the sequencer configuration.

[Sequencer]
[Sequencer.Finalizer]
StopSequencerOnBatchNum = 0

  1. Modified finalizeBatches Function: The main loop of the finalizeBatches function has been updated to check the current batch number against StopSequencerOnBatchNum. If they are equal, the function halts and logs a message to indicate that it has stopped processing new transactions at the specified batch number.

  2. Handled Disabling of the Feature: If StopSequencerOnBatchNum is set to 0, the function treats this as a signal that the stopping feature is disabled. It then continues to function as it would normally.

Reviewers

@Psykepro Psykepro added this to the v0.2.0 milestone Jul 12, 2023
@Psykepro Psykepro requested review from ARR552 and agnusmor July 12, 2023 15:07
@Psykepro Psykepro self-assigned this Jul 12, 2023
@cla-bot cla-bot bot added the cla-signed label Jul 12, 2023
@Psykepro Psykepro force-pushed the feature/stop-sequencer-on-batch-num branch from 8212c67 to 7e1287d Compare July 12, 2023 15:46
@Psykepro Psykepro requested a review from arnaubennassar as a code owner July 12, 2023 15:46
…om config param.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>
@Psykepro Psykepro force-pushed the feature/stop-sequencer-on-batch-num branch from 7e1287d to e7e9f5b Compare July 13, 2023 07:32
@Psykepro Psykepro requested a review from agnusmor July 13, 2023 07:32
@Psykepro Psykepro merged commit caa9a3a into release/v0.2.0 Jul 13, 2023
@Psykepro Psykepro deleted the feature/stop-sequencer-on-batch-num branch July 13, 2023 09:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants