-
Notifications
You must be signed in to change notification settings - Fork 662
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(bandwidth_scheduler) - include parent's receipts in bandwidth requests #12728
Changes from 1 commit
d73b46e
13cecd3
b81fc17
9149443
65b744d
d1e11e0
6fca834
af293e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2053,6 +2053,7 @@ impl Runtime { | |
let pending_delayed_receipts = processing_state.delayed_receipts; | ||
let processed_delayed_receipts = process_receipts_result.processed_delayed_receipts; | ||
let promise_yield_result = process_receipts_result.promise_yield_result; | ||
let shard_layout = epoch_info_provider.shard_layout(&apply_state.epoch_id)?; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This might break replayability, but AFAIU we now support only the last two versions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why would it break replayability? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's fine to have this here as long as we are not doing something different for past protocol versions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Previously the call to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I probably wouldn't be too worried 😅 |
||
|
||
if promise_yield_result.promise_yield_indices | ||
!= promise_yield_result.initial_promise_yield_indices | ||
|
@@ -2074,7 +2075,6 @@ impl Runtime { | |
|
||
let (all_shards, shard_seed) = | ||
if ProtocolFeature::SimpleNightshadeV4.enabled(protocol_version) { | ||
let shard_layout = epoch_info_provider.shard_layout(&apply_state.epoch_id)?; | ||
let shard_ids = shard_layout.shard_ids().collect_vec(); | ||
let shard_index = shard_layout | ||
.get_shard_index(apply_state.shard_id) | ||
|
@@ -2095,7 +2095,8 @@ impl Runtime { | |
); | ||
} | ||
|
||
let bandwidth_requests = receipt_sink.generate_bandwidth_requests(&state_update, true)?; | ||
let bandwidth_requests = | ||
receipt_sink.generate_bandwidth_requests(&state_update, &shard_layout, true)?; | ||
|
||
if cfg!(debug_assertions) { | ||
if let Err(err) = check_balance( | ||
|
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 resharding tries to empty the parent buffers first - (double check please) - so I would feel better to do it in the same order here. It may be important.
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.
Agree, might start mattering what exactly do we fill within the bandwidth request as it's based on the order.
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.
Ah good catch, I wanted to have the parent buffer first but I did the opposite by mistake