-
Notifications
You must be signed in to change notification settings - Fork 391
feat(aggregation_mode): save last processed block in a file #1872
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
feat(aggregation_mode): save last processed block in a file #1872
Conversation
…-in-a-file' of github.com:yetanotherco/aligned_layer into 1870-refactoraggregation_mode-save-last-processed-block-in-a-file
JuArce
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
- It creates the file if it does not exist ✅
- It updates the file only if the verification was correctly sent to ethereum ✅
- It use the current block when the events were fetched and not when the process finishes, which is correct ✅
.gitignore
Outdated
| **/broadcast | ||
| volume | ||
| config-files/*.last_processed_batch.json | ||
| config-files/*.last_processed_block.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this to last_aggregated_block.json, or the folder/name to reflect this is for aggregation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
| fetch_logs_from_secs_ago: 86400 # 24hs | ||
| # Anvil start with block time is 7 seconds | ||
| block_time_secs: 7 | ||
| last_processed_block_filepath: config-files/proof-aggregator.last_processed_block.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idem the other suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
JuArce
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm but this structure could be removed to avoid an extra level of indirection
#[derive(Debug, Deserialize, Serialize)]
pub struct LastAggregatedBlock {
pub last_aggregated_block: u64,
}
Feat (aggregation mode) save last processed block in a file
Description
From Issue #1870
Save the last processed block in a json file which path is indicated in the argument config file.
Check if the last_processed_block is lower than the current block of the chain.
Add a method to the config to save the current last_processed_block (discarding the previous file)
Type of change
Please delete options that are not relevant.
Checklist
testnet, everything else tostaging