-
Notifications
You must be signed in to change notification settings - Fork 15
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
finalization_vote.py is floating #1092
Labels
floating test
A test that sometimes but not always fails
Comments
It is supposed to be fixed in #1082. @kostyantyn ? |
@cmihai @frolosofsky I'll adjust the code in #1082 to fix the issue |
kostyantyn
pushed a commit
that referenced
this issue
May 15, 2019
When we have two consecutive justifications, finalize the latest one instead of the previous one. **Rationale** Let's say we have these two consecutive justified links. ``` J source epoch ------- target hash | | e2[101, .., 150] e3[151, ... 200] e4[201, ... 250] | | source epoch ------- target hash J ``` In Casper the finalized epoch would be e4 and in our case it's e3. However, we proved in [feature_fork_choice_forked_finalize_epoch.py](https://github.com/dtr-org/unit-e/blob/master/test/functional/feature_fork_choice_forked_finalize_epoch.py) that reorging e4, in this case, is not possible anymore as it will revert finalization for e3. Because of that we introduced `FinalizationState::GetCheckpointHeightAfterFinalizedEpoch` as a point of "not going back". However, if we count e4 as finalized, we can drop this extra entity. Moreover, we used to have such a convention and we changed but as it turned out wasn't a good idea. **Aditional fix** `CalculateWithdrawAmount` was broken as it didn't correctly take reward into account which led to a shrunk amount over time. We didn't have tests to catch it. Now we have `finalizationstate_calculate_withdraw_amount_tests.cpp` test that tests this part and shows that the amount is properly increasing. However the `finalization_withdraw.py` still shows that after withdraw the balance is not larger than the initial deposit (it's actually equal to initial deposit - fee). The reason is that the reward for finalizers is not implemented and I'll continue working on it in the following PR. Resolves #1092 Signed-off-by: Kostiantyn Stepaniuk <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Full log: log.txt
The text was updated successfully, but these errors were encountered: