-
Notifications
You must be signed in to change notification settings - Fork 624
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: added custom status code for a missed block #12402
base: master
Are you sure you want to change the base?
feat: added custom status code for a missed block #12402
Conversation
hmm is UNKNOWN_BLOCK right one? From what i know, in nearcore, UNKNOWN_CHUNK is used when a node receives a chunk for the future block. So in that sense, UNKNOWN_BLOCK sounds like something similar (e.g. orphaned block). Maybe the meaning is different with RPC? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we test it somehow?
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12402 +/- ##
==========================================
+ Coverage 71.62% 71.69% +0.06%
==========================================
Files 842 843 +1
Lines 170738 170807 +69
Branches 170738 170807 +69
==========================================
+ Hits 122299 122458 +159
+ Misses 43058 42988 -70
+ Partials 5381 5361 -20
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@frolvanya From explorer:block#131,402,418 observe that the parent is explorer:block#131,402,416. The network seemed to have skipped # 131,402,417 |
Thanks for the info! Then I have 2 updates:
|
@frolvanya could you add a unit test so that we know if something breaks it in the future? |
Sure, I'm currently working on it |
Hi team, can we get an ETA of when will this PR gets merged? Currently waiting for this new status code to unblock us, many thanks! |
Hi @xingyaow, sine this is nearcore fix, even when it is merged, it won't be automatically deployed. It needs to go through protocol version upgrade (either major or minor). By default, after the PR is merged in, it becomes candidate for 2.4 release, which is scheduled in mid December. If it is very urgent from your end, we can try to prepare upgrade and release early next week. Let us know- |
Thanks, @walnut-the-cat! Yes it's urgent from our side as it's blocking us to launch Near by the end of December. We can't wait til mid December as we will have code freeze in December. Much appreciate it if this can be deployed and released sooner! |
We will try that. In the meantime, this PR is basically code complete and missing part is thorough testing. @frolvanya thinks this should not cause any major issue even in the worst case, since it does not change any RPC logic. If you are in hurry, it should be fairly safe for you to apply the PR on your RPC and unblock yourself for timebeing (Then later replace with proper binary) |
Since we didn't succeed first time on retrieving block height out of hash, then we don't need to try the same thing again
6a13c2d
to
385f1d1
Compare
As requested from our partner, custom status code for a missing block was added. I decided to go with 422 Unprocessable Content which seems pretty logical to me, but let me know if this is a bad choice
closes #12399