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: rpc as a task with publishing signature #132

Merged
merged 8 commits into from
Jan 28, 2025

Conversation

ChaoticTempest
Copy link
Contributor

  • creates an RPC task where everything related to sending out requests to RPC services (whether NEAR or eth) are handled.
  • moves over all the publishing of signatures to this RPC task
  • publishing on either chains will be created as a separate task where each task will handle its own retrying as to not block the rpc task itself.
  • new NearClient and EthClient for easier handling

Going to defer moving the other RPC related calls like join and reshare till later because those will require additional changes to the state machine for better handling of errors across a channel

Copy link
Contributor

@jakmeier jakmeier left a comment

Choose a reason for hiding this comment

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

The code changes mostly makes sense to me!

But can I just ask, what is the main goal? Is it mainly a refactor to clean up code architecture? Or is it trying to unblock certain tasks and introduce more parallelism? It's not quite clear to me from the PR description, it only describes what the code does, not why.

Copy link
Contributor

@ppca ppca left a comment

Choose a reason for hiding this comment

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

🚢 from perspective of eth respond() publishing.

volovyks
volovyks previously approved these changes Jan 23, 2025
Copy link
Contributor

@volovyks volovyks left a comment

Choose a reason for hiding this comment

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

Good refactoring should make our lives easier when adding other chains. Other comments are reasonable.

@ChaoticTempest
Copy link
Contributor Author

But can I just ask, what is the main goal? Is it mainly a refactor to clean up code architecture? Or is it trying to unblock certain tasks and introduce more parallelism? It's not quite clear to me from the PR description, it only describes what the code does, not why.

whoops, forgot to mention this in the PR description: it's mostly to unblock new signature from not progressing. Before this PR, signature manager would try to make an RPC call and block the whole entire main loop from progressing. This was especially bad in the case that an error occurs during publishing and we would exponentially retry to publish while still in the signature_manager context, which meant other tasks couldn't progress or more signatures could not be processed.

?mpc_contract_id,
?account_id,
"initializing protocol with parameters"
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Seams useful to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's logged elsewhere

@ChaoticTempest ChaoticTempest merged commit 026835c into develop Jan 28, 2025
2 of 3 checks passed
@ChaoticTempest ChaoticTempest deleted the phuong/feat/rpc-task branch January 28, 2025 17:14
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.

4 participants