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

[PVM] Introduced e2e test for claiming validator rewards #66

Merged
merged 2 commits into from
Apr 25, 2023

Conversation

knikos
Copy link
Member

@knikos knikos commented Apr 12, 2023

Why this should be merged

To add test coverage to the scenario of a validator claiming rewards. These rewards get exported to from C->P after an adequate number of txs on cchain have accumulated enough gas fees.

The PR addresses the following 2 issues:

  • jest timeout has been moved from e2etestlib to jest central configuration, since setting the timeout individually for each test did not make any sense as test could affect the other.
  • duplicate configs in jest.config.js have been removed (see 'transform' and 'moduleFileExtensions')

How this works

A dummy SC is deployed repeatedly on C Chain to accumulate gas fees. Then enough time (>feeRewardExportMinTimeInterval) is waited and a claim tx for a minimum amount is triggered for one of the validators. Finally, it's verified the claim tx gets committed and that the unlocked amounts of the validator are increased accordingly

How this was tested

Via newly introduced e2e test.

@knikos knikos requested a review from parousisv April 12, 2023 13:41
@knikos knikos marked this pull request as ready for review April 12, 2023 13:41
@knikos knikos force-pushed the feature/e2e-validator-rewards branch 2 times, most recently from 968f5b6 to 2bea571 Compare April 18, 2023 12:30
@knikos knikos marked this pull request as draft April 18, 2023 14:26
@knikos knikos marked this pull request as ready for review April 18, 2023 14:26
@github-actions
Copy link

github-actions bot commented Apr 18, 2023

⚠️ Found errors/fatal log records. Please review them(job:e2e, step:"Check produced logs") and resolve this comment.

3 errors
0 fatal

@knikos knikos force-pushed the feature/e2e-validator-rewards branch 3 times, most recently from 21da935 to 3c47dc9 Compare April 24, 2023 06:27
@knikos knikos requested review from peak3d and c4t-ag April 24, 2023 06:28
@knikos
Copy link
Member Author

knikos commented Apr 24, 2023

warning Found errors/fatal log records. Please review them(job:e2e, step:"Check produced logs") and resolve this comment.

2 errors
0 fatal

Checked logs. This error is expected and according to @evlekht should not be removed as it indicates problems if and only if it persists. In our case, it gets printed only cause of the first runs of a network with no previous transactions

@knikos knikos force-pushed the feature/e2e-validator-rewards branch from 3c47dc9 to 85813a2 Compare April 25, 2023 10:04
jest.config.js Outdated
testSequencer: "<rootDir>/e2eSequencer.js",
testTimeout: 300000 // 5 minutes
}
Copy link

Choose a reason for hiding this comment

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

Pls. add a newline, after this we can go....

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@knikos knikos force-pushed the feature/e2e-validator-rewards branch from 85813a2 to 48aa29a Compare April 25, 2023 11:14
@knikos knikos requested a review from c4t-ag April 25, 2023 11:15
@knikos knikos merged commit 2a4e158 into dev Apr 25, 2023
@knikos knikos deleted the feature/e2e-validator-rewards branch April 25, 2023 11:37
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.

3 participants