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

Add committer from-block configuration option #104

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

iuwqyir
Copy link
Collaborator

@iuwqyir iuwqyir commented Oct 16, 2024

TL;DR

Added a new configuration option for the committer to specify the starting block.

What changed?

  • Introduced a new fromBlock parameter for the committer in the configuration.
  • Updated the README to document the new committer-from-block option.
  • Added a new command-line flag --committer-from-block with a default value of 0.
  • Modified the CommitterConfig struct to include the FromBlock field.
  • Updated the NewCommitter function to use the new FromBlock value from the committer config instead of the poller config.

How to test?

  1. Run the application with the new --committer-from-block flag:
    ./app --committer-from-block 20000000
    
  2. Alternatively, set the COMMITTER_FROMBLOCK environment variable:
    export COMMITTER_FROMBLOCK=20000000
    ./app
    
  3. Or update the YAML configuration file:
    committer:
      fromBlock: 20000000
  4. Verify that the committer starts processing blocks from the specified block number.

Why make this change?

This change allows users to specify a custom starting block for the committer, providing more flexibility in data processing. It's particularly useful for scenarios where users want to start committing from a specific block height, rather than always starting from the genesis block or the current latest block.

Copy link

zeet-co bot commented Oct 16, 2024

We're building your pull request over on Zeet.
Click me for more info about your build and deployment.
Once built, this branch can be tested at: https://insight-api-t20v-10-17-separate-c-7f9fd4.zeet-nftlabs.zeet.app before merging 😉

Copy link
Collaborator Author

iuwqyir commented Oct 16, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @iuwqyir and the rest of your teammates on Graphite Graphite

@iuwqyir iuwqyir changed the title separate config for committer from block Add committer from-block configuration option Oct 16, 2024
@iuwqyir iuwqyir marked this pull request as ready for review October 16, 2024 22:47
@iuwqyir iuwqyir merged commit 0f4dd40 into main Oct 16, 2024
6 checks passed
@iuwqyir iuwqyir deleted the 10-17-separate_config_for_committer_from_block branch October 16, 2024 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants