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

Fail-fast when block sync #1350

Merged
merged 1 commit into from
Jul 6, 2021

Conversation

longfin
Copy link
Member

@longfin longfin commented Jun 23, 2021

This PR removes null check before chain swapping when block synchronization. it's to fail quickly instead of malfunctioning when a problem situation such as #1349

@longfin longfin self-assigned this Jun 23, 2021
@longfin longfin force-pushed the feature/tune-swarm-blocksync branch 2 times, most recently from 026ec04 to a5f2174 Compare June 23, 2021 12:31
@longfin longfin added bug Something isn't working network Related to networking (Libplanet.Net) labels Jun 23, 2021
@longfin longfin marked this pull request as ready for review June 23, 2021 12:32
@codecov
Copy link

codecov bot commented Jun 23, 2021

Codecov Report

Merging #1350 (b8518a6) into main (0033ed7) will decrease coverage by 9.11%.
The diff coverage is 53.64%.

❗ Current head b8518a6 differs from pull request most recent head 61f989b. Consider uploading reports for the commit 61f989b to get more accurate results

@@            Coverage Diff             @@
##             main    #1350      +/-   ##
==========================================
- Coverage   86.03%   76.92%   -9.12%     
==========================================
  Files         361      253     -108     
  Lines       32457    16982   -15475     
==========================================
- Hits        27925    13063   -14862     
- Misses       2747     3397     +650     
+ Partials     1785      522    -1263     
Impacted Files Coverage Δ
...bplanet.Explorer/Controllers/ExplorerController.cs 0.00% <0.00%> (ø)
...rer/Controllers/GenericControllerNameConvention.cs 0.00% <0.00%> (ø)
Libplanet.Explorer/Controllers/GraphQLBody.cs 0.00% <0.00%> (ø)
Libplanet.Explorer/ExplorerStartup.cs 0.00% <0.00%> (ø)
Libplanet.Explorer/GraphTypes/NodeStateType.cs 0.00% <0.00%> (ø)
...ibplanet.Explorer/Interfaces/IBlockChainContext.cs 0.00% <0.00%> (ø)
Libplanet.Explorer/Queries/BlockQuery.cs 0.00% <0.00%> (ø)
Libplanet.Explorer/Queries/ExplorerQuery.cs 0.00% <0.00%> (ø)
Libplanet.Explorer/Queries/TransactionQuery.cs 0.00% <0.00%> (ø)
Libplanet.Explorer/Store/AddressRefDoc.cs 0.00% <0.00%> (ø)
... and 245 more

) < 0
&& (canonComparer.Compare(
blockChain.PerceiveBlock(blockChain.Tip),
blockChain.PerceiveBlock(syncedB.Tip)) < 0
Copy link
Member

Choose a reason for hiding this comment

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

Is it okay without PerceivedTime?

Copy link
Member Author

@longfin longfin Jun 24, 2021

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

🆗

limebell
limebell previously approved these changes Jun 24, 2021
@longfin
Copy link
Member Author

longfin commented Jun 28, 2021

/rebase

limebell
limebell previously approved these changes Jun 29, 2021
@longfin longfin added this to the 0.12 milestone Jul 1, 2021
@longfin longfin force-pushed the feature/tune-swarm-blocksync branch from a32320f to 99dd04d Compare July 1, 2021 14:22
@longfin longfin requested a review from limebell July 1, 2021 14:22
dahlia
dahlia previously approved these changes Jul 2, 2021
limebell
limebell previously approved these changes Jul 5, 2021
@longfin
Copy link
Member Author

longfin commented Jul 5, 2021

/rebase

@libplanet libplanet force-pushed the feature/tune-swarm-blocksync branch from b1c65b8 to 61f989b Compare July 5, 2021 10:26
@dahlia dahlia requested a review from limebell July 6, 2021 01:58
@longfin longfin merged commit a14e7c8 into planetarium:main Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working network Related to networking (Libplanet.Net)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants