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

fix: 16657: State validation fails for round 191161423 on LSE #16757

Merged
merged 1 commit into from
Nov 23, 2024

Conversation

artemananiev
Copy link
Member

Fix summary:

  1. ReconnectNodeRemover: changed allNodesReceived() to work correctly, if the new leaf path range from the teacher is empty (-1, -1)
  2. VirtualHasher: hash listener is now notified about hashing started/finished even if the leaf path range is empty
  3. AbstractHashListener: changed onHashingCompleted() to run the final flush even if the list of collected dirty leaves and the list of dirty hashes are empty. This is needed to delete stale leaves from the data source. This method is now called by VirtualHasher even if the virtual map is empty on the teacher

Testing:

  1. Manual testing
  2. Existing reconnect unit tests are improved to run deeper virtual key checks. It made some existing tests (with empty learner maps) fail without this fix and pass with it, as expected. However, it also made some other tests fail, this is why these test changes are not included to this PR, but a separate ticket is filed: Some RandomVirtualMapReconnectTests tests fail with deep VirtualMap key validation #16754

Fixes: #16657
Signed-off-by: Artem Ananev artem.ananev@swirldslabs.com

Signed-off-by: Artem Ananev <artem.ananev@swirldslabs.com>
Copy link

codecov bot commented Nov 22, 2024

Codecov Report

Attention: Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.

Project coverage is 63.45%. Comparing base (82638c1) to head (75e2662).
Report is 17 commits behind head on develop.

Files with missing lines Patch % Lines
...wirlds/virtualmap/internal/hash/VirtualHasher.java 66.66% 1 Missing and 1 partial ⚠️
...rtualmap/internal/merkle/AbstractHashListener.java 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             develop   #16757      +/-   ##
=============================================
- Coverage      63.50%   63.45%   -0.05%     
- Complexity     20295    20316      +21     
=============================================
  Files           2544     2545       +1     
  Lines          94488    94604     +116     
  Branches        9868     9878      +10     
=============================================
+ Hits           60004    60033      +29     
- Misses         30873    30954      +81     
- Partials        3611     3617       +6     
Files with missing lines Coverage Δ
...almap/internal/reconnect/ReconnectNodeRemover.java 93.54% <100.00%> (-0.21%) ⬇️
...rtualmap/internal/merkle/AbstractHashListener.java 84.37% <66.66%> (+1.29%) ⬆️
...wirlds/virtualmap/internal/hash/VirtualHasher.java 86.59% <66.66%> (-0.45%) ⬇️

... and 58 files with indirect coverage changes

Impacted file tree graph

---- 🚨 Try these New Features:

Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.14% (target: -1.00%) 90.91%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (82638c1) 97253 63426 65.22%
Head commit (75e2662) 96900 (-353) 63057 (-369) 65.07% (-0.14%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#16757) 11 10 90.91%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@artemananiev artemananiev merged commit 11f5f17 into develop Nov 23, 2024
82 checks passed
@artemananiev artemananiev deleted the 16657-D-reconnect-empty-learnermap-leak branch November 23, 2024 01:35
thenswan pushed a commit that referenced this pull request Nov 26, 2024
Fixes: #16657
Reviewed-by: Ivan Malygin <ivan@swirldslabs.com>, Oleg Mazurov <oleg.mazurov@swirldslabs.com>
Signed-off-by: Artem Ananev <artem.ananev@swirldslabs.com>
thenswan pushed a commit that referenced this pull request Nov 26, 2024
Fixes: #16657
Reviewed-by: Ivan Malygin <ivan@swirldslabs.com>, Oleg Mazurov <oleg.mazurov@swirldslabs.com>
Signed-off-by: Artem Ananev <artem.ananev@swirldslabs.com>
Signed-off-by: artemananiev <33361937+artemananiev@users.noreply.github.com>
thenswan pushed a commit that referenced this pull request Nov 26, 2024
Fixes: #16657
Reviewed-by: Ivan Malygin <ivan@swirldslabs.com>, Oleg Mazurov <oleg.mazurov@swirldslabs.com>
Signed-off-by: Artem Ananev <artem.ananev@swirldslabs.com>
Signed-off-by: artemananiev <33361937+artemananiev@users.noreply.github.com>
Signed-off-by: Nikita Lebedev <nikita.lebedev@limechain.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

State validation fails for round 191161423 on LSE
3 participants