-
Notifications
You must be signed in to change notification settings - Fork 45
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: Replace Class Hash issue resolved, gas fees bug resolved, cap removed for pending tick #409
Conversation
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.
Some aspects of this pr seem a bit strange to me and might need some tidying up.
@@ -77,6 +77,15 @@ pub enum Error { | |||
#[error("State diff error when continuing the pending block: {0:#}")] | |||
PendingStateDiff(#[from] StateDiffToStateMapError), | |||
} | |||
|
|||
struct ContinueBlockResult { |
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.
could you document this struct for rust doc?
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.
added
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
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.
i think you should also reset the intervals in block_production_task when a block is closed,
interval_pending_block_update.reset_at(instant + interval_pending_block_update.period());
interval_block_time.reset_at(instant + interval_block_time.period());
@@ -353,8 +351,13 @@ impl<Mempool: MempoolProvider> BlockProductionTask<Mempool> { | |||
|
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.
i think you should split the on_block_time function in two: on_block_time and close_block and on_pending_block_tick should call close_block instead of on_block_time
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.
did something very similar, lmk wdyt?
interval_pending_block_update.reset_at(instant + interval_pending_block_update.period()); | ||
interval_block_time.reset_at(instant + interval_block_time.period()); | ||
} | ||
self.current_pending_tick += 1; |
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.
could you reset the current_pending_tick to 0 as well?
(i believe the current pending tick variable is now useless, is that the case?
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.
yeah I thought about it as well, pushing the changes that I think made sense, lmk wdyt
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.
yes :)
Pull Request type
What is the current behavior?
Resolves: #NA
What is the new behavior?
Does this introduce a breaking change?
No