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: avail submission was stuck waiting for finalization #438

Merged

Conversation

mtsitrin
Copy link
Contributor

@mtsitrin mtsitrin commented Aug 9, 2023

PR Standards

Opening a pull request should be able to meet the following requirements


For Author:

  • Targeted PR against correct branch
  • included the correct type prefix in the PR title
  • Linked to Github issue with discussion and accepted design
  • Targets only one github issue
  • Wrote unit and integration tests
  • All CI checks have passed
  • Added relevant godoc comments

For Reviewer:

  • confirmed the correct type prefix in the PR title
  • Reviewers assigned
  • confirmed all author checklist items have been addressed

After reviewer approval:

  • In case targets main branch, PR should be squashed and merged.
  • In case PR targets a release branch, PR should be rebased.

@mtsitrin mtsitrin requested a review from a team as a code owner August 9, 2023 08:27
@mtsitrin mtsitrin linked an issue Aug 9, 2023 that may be closed by this pull request
@mtsitrin mtsitrin requested a review from omritoptix August 9, 2023 08:27
@codecov
Copy link

codecov bot commented Aug 9, 2023

Codecov Report

Merging #438 (057e0c8) into main (9ce91a0) will decrease coverage by 0.05%.
Report is 1 commits behind head on main.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #438      +/-   ##
==========================================
- Coverage   52.55%   52.50%   -0.05%     
==========================================
  Files          94       94              
  Lines       14404    14421      +17     
==========================================
+ Hits         7570     7572       +2     
- Misses       5760     5774      +14     
- Partials     1074     1075       +1     
Files Changed Coverage Δ
block/manager.go 69.37% <ø> (-0.06%) ⬇️
da/avail/avail.go 19.14% <0.00%> (-0.70%) ⬇️
da/celestia/celestia.go 62.44% <ø> (ø)
settlement/dymension/dymension.go 69.14% <ø> (-0.95%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@omritoptix omritoptix left a comment

Choose a reason for hiding this comment

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

We only want to panic if the err is from a configuration error (otherwise we keep trying to submit and emit health events).

Seems like you changed the errors returned that they can't be detected as ErrBroacastConfigError so this part will never execute.

Copy link
Contributor

@omritoptix omritoptix left a comment

Choose a reason for hiding this comment

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

We only want to panic if the err is from a configuration error (otherwise we keep trying to submit and emit health events) (line 260)

Seems like you changed the errors returned from broadcastTx that they can't be detected as ErrBroacastConfigError so this part will never execute.

@mtsitrin
Copy link
Contributor Author

mtsitrin commented Aug 9, 2023

I'll revert it back, but few things to notice,

  1. the err check is wrong, should be errors.Is instead of ==
  2. this error if meant to be unrecoverable, should break the retries loop as well
  3. not sure why we panicking for DA errors, but not for SL errors...

@mtsitrin mtsitrin requested a review from omritoptix August 10, 2023 07:01
@omritoptix
Copy link
Contributor

omritoptix commented Aug 10, 2023

we're only panicing for configuration/bugs errors not for network errors (i.e base layer unavailable). both for SL and DA.

you can see for example in the SL we're panicing if can't find a key, not passing validation etc.

We don't panic for DA if we failed to send due to network error. same as we don't panic for SL if we failed to send due to network error.

@mtsitrin mtsitrin merged commit aa1e967 into main Aug 10, 2023
@mtsitrin mtsitrin deleted the mtsitrin/437-avail-submission-was-stuck-waiting-for-finalization branch August 10, 2023 12:03
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.

avail submission was stuck waiting for finalization
2 participants