Skip to content

Reuse batch message worker for both relay contexts in a bi-relay context #21

Open
@soareschen

Description

@soareschen

Summary

In the constructor functions such as new_relay_context_with_batch, a batch message worker is spawned for each relay context created. However this means that messages from two relay context couple in a bi-relay context cannot be batched together by the same batch worker.

The spawning of batch message worker should instead be done in the constructor for a bi-relay context, so that they can be shared between the two relay contexts.

Details

For the case of FullCosmosRelay, the sharing can be done by creating one sender/receiver pair for the batch worker, then set it as the source channel for one relay context, and the destination channel for the other relay context.

A better way to manage the construction and spawning of the batch message worker can be done in informalsystems/hermes#3083, to define a bi-relay builder component that manage the sharing and spawning of the batch message workers.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions