-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Ensure Block Processing Failures Return an Error #2325
Conversation
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.
Any regression test?
on it |
Codecov Report
@@ Coverage Diff @@
## master #2325 +/- ##
==========================================
+ Coverage 68.44% 68.78% +0.33%
==========================================
Files 118 117 -1
Lines 9428 9207 -221
==========================================
- Hits 6453 6333 -120
+ Misses 2277 2191 -86
+ Partials 698 683 -15 |
if _, err := chainService.ReceiveBlock(context.Background(), block); err == nil { | ||
t.Error("Expected block to fail processing, received nil") | ||
_, err = chainService.ReceiveBlock(context.Background(), block) | ||
if err != nil { |
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.
Looks like this test can pass if err is nil
* ensure block failed processing returns an error * fixed test * test assertion corrected * comments * fix tests * imports
* update attestation related protos * use root for hash32 * fixed a few typos * review comments * update historical batch, deposit and blk header fields * Add nogo to introduce built time linting (#2317) * Add nogo and fix lint issues * Run gazelle * better gazelle * ignore external struct tags * Exclude all third party code from unsafeptr (#2321) * Fix Assingments Bug (#2320) * fix * fix tests * Add feature flag to toggle gossip sub in p2p (#2322) * add feature flag to enable gossip sub in p2p * invert the enable/disable logic * add the flag in k8s and fix tests * gazellle * return empty config if nil * Prevent Canceling Goroutines in Validator Client (#2324) * do not cancel assignments goroutines * exclude rule * disable lostcancel for now * Fix Pending Attestations RPC Call (#2304) * pending atts * use proposal slot * attestation inclusion fix * lint * advance state transitions * gazelle * lint tests pass * Do Not Update Validator Registry on Nil Block (#2326) * no registry update if block is nil * regression test * lint * Ensure Block Processing Failures Return an Error (#2325) * ensure block failed processing returns an error * fixed test * test assertion corrected * comments * fix tests * imports * rebase * add spec badge. Thanks to ChainSafe/lodestar#166 for the idea :) * Update Crosslink Protobuf Fields (#2313) * rebase * rebase * rebase * Prevent Canceling Goroutines in Validator Client (#2324) * do not cancel assignments goroutines * exclude rule * disable lostcancel for now * starting proposer slashing * starting attester slashing * revert gen file * Update types.pb.go
No tracking issue. We have a problem in which the following code in block_processing.go in our blockchain package would not return an error if it failed: