Skip to content

Conversation

@outerlook
Copy link
Member

No description provided.

The "includeOnly" field has been added to the core configuration and schema. This is an optional array that takes in glob-like patterns specifying the streams that should be tracked by the node. It's used as a filter; if the list is empty, all streams fetched from the contract will be tracked.
The update introduces glob-based stream filtering in the `LogStoreNetworkConfig` and `LogStoreNetworkPlugin`. This was achieved by adding 'micromatch' to the dependencies and creating a utility function 'globsMatch' that checks if a string matches any provided glob patterns. This function is now used to filter streams based on the newly added 'includeOnly' option in the plugins.
Refactored the filter logic for stream inclusion from the streamFilter() function to a newly introduced isStreamIncluded() function, improving code reusability. In addition, we introduced the shouldPublishQueryResponseFn() function in order to decide whether the query response should be published if the node opts to not participate in the propagation of the query response.
The method validateUserQueryAccess has been changed to validateQueryRequest, now taking a Request object as parameter. This allows more comprehensive validation such as checking if a stream is included in the network configuration. Error codes have also been added to the response, providing richer error handling capabilities.
Added a periodic check to ensure that the node configuration doesn't include specific streams while having an HTTP server enabled. This feature helps in generating meaningful alerts as these configurations might produce undesired 404 responses from clients. The check is implemented using a new 'createIncompatibleNodeUrlLogger' utility. The logger is subscribed in the LogStoreNetworkPlugin's start method and unsubscribed in its stop method.
The commit introduces utilities needed for effective management of 'logStoreNode' - start, stop, setup, and tear down of nodes. There's also enhancement on the utilities for account setup and cleanup. Alongside the utility scripts, a new integration test was added to verify if queries from a partially included stream are handled correctly by the 'logStoreNode'.
@outerlook outerlook self-assigned this Mar 27, 2024
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.

2 participants