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

includes a test comparing rewards to float results #530

Merged
merged 5 commits into from
Jan 14, 2024

Conversation

oliviasaa
Copy link
Contributor

No description provided.

@oliviasaa
Copy link
Contributor Author

I have no idea what's going on with this unit test that is failing

@oliviasaa
Copy link
Contributor Author

oliviasaa commented Nov 19, 2023

also, I had to use api.ComputedFinalReward() and api.ComputedInitialReward(), otherwise the test would fail. I'm having trouble figuring out if those values are being fed to the code manually (thus, they are just arbitrary values) or if they are calculated incorrectly and that's why the tests fail when I don't use them.

@oliviasaa oliviasaa requested a review from daria305 November 19, 2023 17:49
@piotrm50
Copy link
Collaborator

The failing tests seem to be unrelated to your changes. It seems to be a data race in TipSelection component that we need to investigate separetely.

2023-11-19T17:42:36.9547917Z --- FAIL: TestLossOfAcceptanceFromGenesis (2.56s)
2023-11-19T17:42:36.9548122Z     testing.go:1465: race detected during execution of test

@karimodm karimodm linked an issue Nov 28, 2023 that may be closed by this pull request

targetRewardFloat := float64(t.api.ComputedFinalReward())

// targetRewardFloat := theta * S * gamma * d
Copy link
Contributor

Choose a reason for hiding this comment

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

We should get this part to work. As we discussed, this probably has something to do with different protocol parameters being used in different places, but otherwise there is a mistake somewhere in either calculation, so I think we need to figure this out rather than just leave it out.

@cyberphysic4l cyberphysic4l merged commit 53d8886 into develop Jan 14, 2024
4 checks passed
@cyberphysic4l cyberphysic4l deleted the addRewardsTests branch January 14, 2024 19:52
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.

New tests for the rewards calculations
4 participants