Skip to content

Conversation

@durkmurder
Copy link
Member

@durkmurder durkmurder commented Nov 28, 2025

Context

This PR updates Requester Engine to the latest guidelines we are using for BFT Engines.

What was done:

  • Engine now implements MessageProcessor interface.
  • Engine now uses fixed-bound queues for inbound messages.
  • Engine now relines on the ComponentManager to implement a restartable component.

I have decided to keep logic as it is to prevent changes to the actual business logic to reduce surface of changes and to keep the existing working code as it is.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 28, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@codecov-commenter
Copy link

codecov-commenter commented Nov 28, 2025

@durkmurder durkmurder marked this pull request as ready for review November 28, 2025 17:51
@durkmurder durkmurder requested a review from a team as a code owner November 28, 2025 17:51
Copy link
Member

@jordanschalm jordanschalm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work.

My main suggestion is this one regarding the ability to disable identity validation: I think we should remove that option.

I also created a follow-up PR #8254 including a few documentation and naming updates, as well as moving a test over to synctest to avoid sleeping. Feel free to adjust that PR as you see fit directly.

Comment on lines +28 to +29
// DefaultEntityRequestCacheSize is the default max message queue size for the provider engine.
// This equates to ~5GB of memory usage with a full queue (10M*500)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// DefaultEntityRequestCacheSize is the default max message queue size for the provider engine.
// This equates to ~5GB of memory usage with a full queue (10M*500)
// DefaultEntityRequestCacheSize is the default max message queue size for the requester engine.
// This equates to ~5GB of memory usage with a full queue (10M*500)

Where are you getting the 10M/EntityResponse estimate from?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 114 to 127
selector = filter.And(
selector,
filter.Not(filter.HasNodeID[flow.Identity](me.NodeID())),
filter.Not(filter.HasParticipationStatus(flow.EpochParticipationStatusEjected)),
)

// make sure we only send requests to nodes that are active in the current epoch and have positive weight
if cfg.ValidateStaking {
selector = filter.And(
selector,
filter.HasInitialWeight[flow.Identity](true),
filter.HasParticipationStatus(flow.EpochParticipationStatusActive),
)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
selector = filter.And(
selector,
filter.Not(filter.HasNodeID[flow.Identity](me.NodeID())),
filter.Not(filter.HasParticipationStatus(flow.EpochParticipationStatusEjected)),
filter.HasInitialWeight[flow.Identity](true),
)

I think we should remove the ValidateStaking option entirely and always at least check that the sender is not ejected. I don't think there is a good reason to have an option that disables identity validation.

This option is only used in the Execution Node. I am guessing this was added because ENs may request collections from LNs who are joining or leaving the network near epoch boundaries. Now that we have explicit epoch statuses in the identity, filter.Not(filter.HasParticipationStatus(flow.EpochParticipationStatusEjected)) will include both joining and leaving LNs that are otherwise in good standing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 this pull request may close these issues.

5 participants