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

fix: ethrpc: Don't lock up when eth subscriber goes away #10485

Merged
merged 3 commits into from
Mar 15, 2023

Conversation

magik6k
Copy link
Contributor

@magik6k magik6k commented Mar 15, 2023

Related Issues

Fixes #10484
Brings in filecoin-project/go-jsonrpc#98

Proposed Changes

  • Bring a fix for jsonrpc reverse client hang on closed connections
  • Buffer eth_subscribe messages if the subscriber is slow
  • Always uninstall sub-related filters when the sub dies, not only when it's explicitly cancelled

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

  • Commits have a clear commit message.
  • PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

@magik6k magik6k requested a review from a team as a code owner March 15, 2023 17:36
@magik6k magik6k changed the title Fix/ethsub hang fix: ethrpc: Don't lock up when eth subscriber goes away Mar 15, 2023
go.mod Outdated
@@ -319,6 +320,7 @@ require (
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/zondax/hid v0.9.1 // indirect
github.com/zondax/ledger-go v0.12.1 // indirect
github.com/zyedidia/generic v1.2.1 // indirect
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a very small library with a bunch of very nice generic helpers. Wanted to use it since forever, finally got a quality excuse.


for _, f := range e.filters {
// note: the context in actually unused in uninstallFilter
if err := e.uninstallFilter(context.TODO(), f); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

double checking: these don't take long and won't hang node shutdown right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct

@magik6k magik6k merged commit 4c80e17 into master Mar 15, 2023
@magik6k magik6k deleted the fix/ethsub-hang branch March 15, 2023 19:37
@TippyFlitsUK
Copy link
Contributor

Looking good Magik!! I've tested across three stack restarts and 8 Boost restarts and have been able to start every time!!

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.

Contract Deal Enabled Boost is Unable to Sart Due To EthRPC Subscription Lock
3 participants