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

Validator duties #570

Merged
merged 9 commits into from
Jul 8, 2021
Merged

Validator duties #570

merged 9 commits into from
Jul 8, 2021

Conversation

BeroBurny
Copy link
Collaborator

Short description of work done
Implement validator duties screen

PR Checklist

  • I have run type check locally
  • I have run linter locally
  • I have run unit and integration tests locally
  • Rebased to master branch / merged master

Changes

  • implement duties db
  • implement fetching duties
  • implement duties table

image

Issues

Closes #569

@BeroBurny BeroBurny added the enhancement New feature or request label Jul 6, 2021
@BeroBurny BeroBurny requested review from morrigan, mpetrunic and a team July 6, 2021 09:53
@BeroBurny BeroBurny self-assigned this Jul 6, 2021
@codecov
Copy link

codecov bot commented Jul 6, 2021

Codecov Report

Merging #570 (d649eb1) into develop (3fb6aac) will increase coverage by 0.29%.
The diff coverage is 53.33%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #570      +/-   ##
===========================================
+ Coverage    48.50%   48.79%   +0.29%     
===========================================
  Files          110      117       +7     
  Lines         1977     2080     +103     
  Branches       214      225      +11     
===========================================
+ Hits           959     1015      +56     
- Misses         989     1036      +47     
  Partials        29       29              
Flag Coverage Δ
unit 48.79% <53.33%> (+0.29%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...vices/eth2/client/eth2ApiClient/cgEth2BeaconApi.ts 31.25% <0.00%> (ø)
src/renderer/services/eth2/client/nimbus/index.ts 50.00% <0.00%> (ø)
src/renderer/models/attestationDuties.ts 13.33% <13.33%> (ø)
src/renderer/models/propositionDuties.ts 13.33% <13.33%> (ø)
...eth2/client/eth2ApiClient/cgEth2BeaconBlocksApi.ts 15.00% <20.00%> (+1.66%) ⬆️
...db/api/repositories/validator/attestationDuties.ts 65.21% <65.21%> (ø)
...db/api/repositories/validator/propositionDuties.ts 65.21% <65.21%> (ø)
src/renderer/ducks/validator/actions.ts 70.37% <66.66%> (-0.47%) ⬇️
src/renderer/constants/dutyStatus.ts 100.00% <100.00%> (ø)
src/renderer/models/types/attestationDuties.ts 100.00% <100.00%> (ø)
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3fb6aac...d649eb1. Read the comment docs.

@@ -0,0 +1,12 @@
export enum DutyStatus {
// dont change order of values
Copy link
Member

Choose a reason for hiding this comment

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

assign values mannually pls :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

intentionally did that way, without values enum is numerated like an array (but want to keep names for easier readability) and for storing in DB it is more efficient of storing strings and have some logic based on numbers inside put logic

Copy link
Member

Choose a reason for hiding this comment

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

Why not have

enum DutyStatus {
uknown: "Unknown"
}

?

Copy link
Collaborator Author

@BeroBurny BeroBurny Jul 7, 2021

Choose a reason for hiding this comment

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

src/renderer/constants/dutyStatus.ts Outdated Show resolved Hide resolved
@BeroBurny BeroBurny merged commit e29c8dd into develop Jul 8, 2021
@BeroBurny BeroBurny deleted the beroburny/statistics branch July 8, 2021 10:07
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
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants