Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Fix crashing the node when failing on execution or generation #8203

Merged
merged 4 commits into from
Mar 6, 2023

Conversation

shuse2
Copy link
Collaborator

@shuse2 shuse2 commented Mar 1, 2023

What was the problem?

This PR resolves #8172

How was it solved?

  • Add try catch and stop crashing

this seems to happen if block is received while generating a block.

How was it tested?

  • Check 2 node scenario with double block generation

@shuse2 shuse2 self-assigned this Mar 1, 2023
@shuse2 shuse2 requested review from bobanm and has5aan March 1, 2023 16:04
@codecov
Copy link

codecov bot commented Mar 1, 2023

Codecov Report

Merging #8203 (5eb91dc) into development (b455149) will decrease coverage by 0.03%.
The diff coverage is 60.00%.

❗ Current head 5eb91dc differs from pull request most recent head d55c96c. Consider uploading reports for the commit d55c96c to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #8203      +/-   ##
===============================================
- Coverage        82.89%   82.86%   -0.03%     
===============================================
  Files              578      578              
  Lines            21154    21158       +4     
  Branches          3082     3092      +10     
===============================================
- Hits             17535    17532       -3     
- Misses            3619     3626       +7     
Impacted Files Coverage Δ
framework/src/engine/consensus/network_endpoint.ts 93.82% <ø> (ø)
framework/src/engine/generator/generator.ts 82.00% <0.00%> (-0.29%) ⬇️
framework/src/engine/consensus/consensus.ts 80.61% <100.00%> (+0.14%) ⬆️
elements/lisk-api-client/src/codec.ts 62.00% <0.00%> (-2.79%) ⬇️
framework/src/modules/base_store.ts 89.79% <0.00%> (-0.41%) ⬇️
commander/src/utils/reader.ts 86.20% <0.00%> (-0.16%) ⬇️
elements/lisk-codec/src/codec.ts 93.40% <0.00%> (-0.08%) ⬇️
framework/src/modules/base_event.ts 100.00% <0.00%> (ø)
framework/src/modules/base_command.ts 100.00% <0.00%> (ø)
...r/src/bootstrapping/commands/transaction/create.ts 92.00% <0.00%> (+1.00%) ⬆️

Copy link
Contributor

@bobanm bobanm left a comment

Choose a reason for hiding this comment

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

The fix looks good 👍🏻
I made only a few minor grammar remarks.

framework/src/engine/consensus/consensus.ts Outdated Show resolved Hide resolved
framework/src/engine/consensus/consensus.ts Outdated Show resolved Hide resolved
framework/src/engine/generator/generator.ts Outdated Show resolved Hide resolved
Co-authored-by: Boban Milošević <[email protected]>
@shuse2 shuse2 requested a review from bobanm March 2, 2023 09:09
@shuse2 shuse2 enabled auto-merge (squash) March 6, 2023 11:44
@shuse2 shuse2 merged commit 8dd917a into development Mar 6, 2023
@shuse2 shuse2 deleted the 8172-fix_sync_fail branch March 6, 2023 12:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Syncing node crashes after reconfiguring generators
3 participants