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

feat(eigen-client-m0-implementation): optimize concurrent dispatcher #345

Conversation

juan518munoz
Copy link

What ❔

Why ❔

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via zkstack dev fmt and zkstack dev lint.

@juan518munoz juan518munoz marked this pull request as ready for review November 15, 2024 21:07
@@ -145,15 +154,14 @@ impl RawEigenClient {
.unwrap()
.payload
.ok_or_else(|| anyhow::anyhow!("No payload in response"))?;
drop(client_lock);

Choose a reason for hiding this comment

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

This is not really nice, we could just do it all in a single line like we used to in our older implementation, and just call the disperse data before the disperse blob authenticated, since it doesnt depend on it

Copy link
Author

Choose a reason for hiding this comment

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

The use of drop is widely used across the proyect's code (connection to the database for example).

Copy link

@gianbelinche gianbelinche left a comment

Choose a reason for hiding this comment

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

LGTM

@juan518munoz juan518munoz merged commit 54edd50 into eigen-client-m0-grafana-metrics Nov 19, 2024
12 of 24 checks passed
@juan518munoz juan518munoz deleted the eigen-client-optimize-concurrent-dispatcher branch November 19, 2024 20:28
juan518munoz added a commit that referenced this pull request Nov 19, 2024
* initial commit

* initial commit

* fix ambiguous job name & add docker restart command

* fix integration test command

* update readme, remove fetching lambda repo

* reorganize readme instructions

* Fix concurrent dispatcher (#338)

* Add shutdown to dispatch batches

* Add JoinSet

* Format code

* Fix unbounded channel breaking authenticated dispersal

* Fix pr comments

* feat(eigen-client-m0-implementation): optimize concurrent dispatcher (#345)

* initial commit

* optimize dispatch_batches fn

* remove commented code

* remove needless variables

* optimize inclusion_poller fn

* break loop if dispatch fail

* remove client_lock variable

* switch to retriable err

* replace arbitrary value with config

---------

Co-authored-by: Gianbelinche <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants