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

refactor(event-queue): improve event ordering #738

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

glevco
Copy link
Contributor

@glevco glevco commented Jul 28, 2023

Motivation

Reliable integration events could be generated in a non-consistent order on different runs, caused by a for-loop on an unordered set in the consensus. Although this was worked-around, making the for-loop ordered improves predictability of said events and also simplifies tests.

Acceptance Criteria

  • Sort the context.tx_affected for-loop in the consensus so its order is always the same
  • Fix event tests
  • Remove zip_chunkify() utils functions as it's not used anymore

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Merging #738 (2c3869d) into master (126017d) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #738      +/-   ##
==========================================
+ Coverage   84.55%   84.57%   +0.01%     
==========================================
  Files         252      252              
  Lines       21686    21688       +2     
  Branches     2936     2937       +1     
==========================================
+ Hits        18337    18342       +5     
+ Misses       2712     2710       -2     
+ Partials      637      636       -1     
Files Changed Coverage Δ
hathor/consensus/consensus.py 97.89% <100.00%> (+0.04%) ⬆️

... and 3 files with indirect coverage changes

@glevco glevco self-assigned this Jul 28, 2023
@glevco glevco added the enhancement New feature or request label Jul 28, 2023
@glevco glevco marked this pull request as ready for review July 28, 2023 21:51
@glevco glevco requested review from jansegre and msbrogli as code owners July 28, 2023 21:51
@glevco glevco merged commit e1aefa8 into master Jul 31, 2023
@glevco glevco deleted the refactor/event-queue/improve-event-ordering branch July 31, 2023 17:25
This was referenced Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants