mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-16 12:28:24 +00:00
Fix DataColumnsByRoot request limit validation bug (#7928)
Fixes #7926
This was a bug I introduced in #7890 and @pawanjay176 noticed it on some running nodes, and added a rpc test to confirm it.
The culprit is this line, where I failed to fill the vec to it's max size, so it doesn't calculate the max size properly, resulting in all `DataColumnByRoot` requests exceeding the max size during validation:
d24a6d2a45/consensus/types/src/chain_spec.rs (L1984)
The PR fixes this and includes new regression tests for this fix.
This commit is contained in:
@@ -1981,7 +1981,7 @@ fn max_data_columns_by_root_request_common<E: EthSpec>(max_request_blocks: u64)
|
||||
|
||||
let empty_data_columns_by_root_id = DataColumnsByRootIdentifier {
|
||||
block_root: Hash256::zero(),
|
||||
columns: VariableList::from(vec![0]),
|
||||
columns: VariableList::from(vec![0; E::number_of_columns()]),
|
||||
};
|
||||
|
||||
RuntimeVariableList::<DataColumnsByRootIdentifier<E>>::from_vec(
|
||||
|
||||
Reference in New Issue
Block a user