You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the current state, the relayer code liberally creates goroutines whenever a background task is started.
The called function is usually passed a context so it can be canceled, but in some instances goroutines
are leaked, leading to leaked memory. It can also make it hard to keep an overview of which goroutines
are running.
One approach the industry developed to avoid these problems is structured concurrency. As explained in [here] and [here], the core idea is that all goroutines must finish before the function starting them
returns.
Implementation details
We should first figure out the scope of these changes, following the proposed approach.
Testing details
TBD
Acceptance Criteria
relayers codebase uses structured concurrency throughout the codebase
The text was updated successfully, but these errors were encountered:
Auditor issue
In the current state, the relayer code liberally creates goroutines whenever a background task is started.
The called function is usually passed a context so it can be canceled, but in some instances goroutines
are leaked, leading to leaked memory. It can also make it hard to keep an overview of which goroutines
are running.
Location:
Chainsafe_Sygma_Relayer/comm/p2p/libp2p.go#L81-L87
Chainsafe_Sygma_Relayer/tss/common/base.go#L119
One approach the industry developed to avoid these problems is structured concurrency. As explained in
[here] and [here], the core idea is that all goroutines must finish before the function starting them
returns.
Implementation details
We should first figure out the scope of these changes, following the proposed approach.
Testing details
TBD
Acceptance Criteria
The text was updated successfully, but these errors were encountered: