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

Fix "Unable to initialize bitlist for requested keys" error when trying to accept many items #1484

Closed
carver opened this issue Sep 25, 2024 · 3 comments · Fixed by #1485
Closed
Assignees

Comments

@carver
Copy link
Collaborator

carver commented Sep 25, 2024

Got this in my logs, and it seems like it shouldn't ever happen:

2024-09-25T00:47:52.235808Z ERROR trin_history::events: Error processing portal history request, responding with empty TALKRESP error=Error while building accept message: Unable to initialize bitlist for requested keys. request.discv5.id=aaa81102dc43bd18

Error is triggered here:

BitList::with_capacity(request.content_keys.len()).map_err(|_| {
OverlayRequestError::AcceptError(
"Unable to initialize bitlist for requested keys.".to_owned(),

The size of the Bitlist is defined by the Accept message here:

pub content_keys: BitList<typenum::U8>,

So it seems that our accept message only stores up to 8 items. The specs suggest that it should accept up to 64.

I'll open a PR to increase this to 64.

@carver
Copy link
Collaborator Author

carver commented Sep 25, 2024

Tangentially, I noticed a minor Bitlist bug: sigp/ethereum_ssz#33

@morph-dev
Copy link
Collaborator

It feels like we should add a hive tests for this as well:

  • sending 64 keys should work (and they should be available after they are accepted)
  • sending 65 should fail

@KolbyML
Copy link
Member

KolbyML commented Sep 25, 2024

It feels like we should add a hive tests for this as well:

  • sending 64 keys should work (and they should be available after they are accepted)

  • sending 65 should fail

I mentioned I would write one in Carvor's fix PR for this issue, for continuity sake.

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 a pull request may close this issue.

3 participants