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

feat(test): implement missing resharding double signing fork test #12819

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

Trisfald
Copy link
Contributor

@Trisfald Trisfald commented Jan 28, 2025

  • Rephrased the description of the original double signing fork test slow_test_resharding_v3_double_sign_resharding_block_last_fork, to make it clearer and more accurate
  • Added another test to check the code path where, in the presence of multiple resharding points (because of forks), the chain ends up 'picking' the first resharding point, ignoring the following ones.

Copy link

codecov bot commented Jan 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.47%. Comparing base (8097202) to head (620902c).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #12819   +/-   ##
=======================================
  Coverage   70.47%   70.47%           
=======================================
  Files         847      847           
  Lines      175001   175004    +3     
  Branches   175001   175004    +3     
=======================================
+ Hits       123338   123342    +4     
- Misses      46413    46414    +1     
+ Partials     5250     5248    -2     
Flag Coverage Δ
backward-compatibility 0.16% <ø> (ø)
db-migration 0.16% <ø> (ø)
genesis-check 1.41% <ø> (ø)
linux 70.09% <ø> (+0.02%) ⬆️
linux-nightly 70.09% <100.00%> (-0.03%) ⬇️
pytests 1.70% <ø> (ø)
sanity-checks 1.52% <ø> (ø)
unittests 70.31% <100.00%> (+<0.01%) ⬆️
upgradability 0.20% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Trisfald Trisfald marked this pull request as ready for review January 28, 2025 15:23
@Trisfald Trisfald requested a review from a team as a code owner January 28, 2025 15:23
@Trisfald Trisfald requested a review from wacban January 28, 2025 15:23
@@ -80,7 +83,7 @@ pub(crate) fn fork_before_resharding_block(double_signing: bool) -> LoopAction {
base_block_height: tip.height - 1,
}
};
client_actor.adv_produce_blocks_on(3, true, height_selection);
client_actor.adv_produce_blocks_on(blocks_produced, true, height_selection);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why move it to an argument?

What exactly does this control? Does it have to be 3 in order to trigger fork at the right place?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's num of block produced

Yes it's a way to change which fork gets finalized. Small number of produced blocks -> discarded, large number -> not discarded

@Trisfald Trisfald added this pull request to the merge queue Jan 29, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 29, 2025
@Trisfald Trisfald added this pull request to the merge queue Jan 29, 2025
Merged via the queue into near:master with commit 867e790 Jan 29, 2025
29 checks passed
@Trisfald Trisfald deleted the missing-fork-test branch January 29, 2025 10:41
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.

2 participants