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

Add validator:signed-blocks command and fix validator:status bug #2456

Merged
merged 13 commits into from
Jan 22, 2020

Conversation

nategraf
Copy link
Contributor

@nategraf nategraf commented Jan 16, 2020

Description

The validator:status command currently makes an incorrect assumption that the index of a validator in the election list is constant across epochs. This PR fixes that assumption and adds a validator:signed-blocks command to cover a need in seeing which blocks are or are not signed.

Tested

Manual testing

Copy link
Contributor

@timmoreton timmoreton left a comment

Choose a reason for hiding this comment

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

Nice! Can I suggest validator:signed or similar? I can see a use for something like validator:heartbeat as a command which just returns an exit status if it's not elected or not signed the last block -- for folks to integrate for monitoring purposes.

In both commands, having flags to fill these use cases would be helpful:

  • all blocks in current epoch
  • all blocks in previous complete epoch
  • all blocks in a given epoch, e
  • last b blocks

I can also foresee a request for calculating uptime for an epoch based on this... but it is accessible via the end of epoch block (somehow!)

Also you might need to add some documentation and rebuild the docs too.

@timmoreton timmoreton assigned nategraf and unassigned timmoreton Jan 21, 2020
@nategraf nategraf changed the title Add validator:heartbeat command and fix validator:status bug Add validator:signed-blocks command and fix validator:status bug Jan 22, 2020
@nategraf nategraf added automerge Have PR merge automatically when checks pass and removed do not merge labels Jan 22, 2020
@codecov
Copy link

codecov bot commented Jan 22, 2020

Codecov Report

Merging #2456 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #2456   +/-   ##
======================================
  Coverage    73.6%   73.6%           
======================================
  Files         554     554           
  Lines       13667   13667           
  Branches     1352    1352           
======================================
  Hits        10059   10059           
  Misses       3330    3330           
  Partials      278     278
Flag Coverage Δ
#mobile 74.79% <ø> (ø) ⬆️
#web 71.95% <ø> (ø) ⬆️

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 c9ab254...a4077b0. Read the comment docs.

@celo-ci-bot-user celo-ci-bot-user merged commit c290ce2 into master Jan 22, 2020
@celo-ci-bot-user celo-ci-bot-user deleted the victor/validator-status branch January 22, 2020 17:19
aaronmgdr added a commit that referenced this pull request Jan 22, 2020
* master:
  Fixes governance CLI bugs encountered while running election contract upgrade (#2482)
  Add validator:signed-blocks command and fix validator:status bug (#2456)
  Bump @celo/celocli version to 0.0.34 (#2420)
  Fix Logo + backers number change (#2453)
  Improve election efficiency by short circuiting (#2475)
  Page for Experience / BrandKit / Composition (#2462)
  Configure the time to wait for text messages (#2450)

# Conflicts:
#	packages/web/package.json
aaronmgdr added a commit that referenced this pull request Jan 22, 2020
* master:
  add celo.org/about#contributors id (#2488)
  [Wallet] Fix integration build firebase db url on Android (#2495)
  Fixes governance CLI bugs encountered while running election contract upgrade (#2482)
  Add validator:signed-blocks command and fix validator:status bug (#2456)
  Bump @celo/celocli version to 0.0.34 (#2420)
  Fix Logo + backers number change (#2453)
  Improve election efficiency by short circuiting (#2475)
  Page for Experience / BrandKit / Composition (#2462)
  Configure the time to wait for text messages (#2450)
  Add react-testing-utils + Fix Analytics (#2437)
  collect coverage on web (#2415)
  Add callouts to serve text messages in regions (#2458)
  [Wallet] Historical currency conversions in the transaction feed (#2446)
  CLI relock fix (#2464)
  Update copyright year + inline button  (#2468)
  Voting bot for stake off (#2327)
aaronmgdr added a commit that referenced this pull request Jan 23, 2020
* master: (72 commits)
  [Wallet] Fix incorrect empty state on the gold tab (#2510)
  Added ingress resource for celostats DNS (#2480)
  Fix celotool testnet deploy (#2501)
  [Wallet] Navigate to wallet home after payment request (#2500)
  Require Consent for tracking globally (#2489)
  new academic papers + minor fix to web events (#2502)
  [Wallet] Fetch tobin tax for exchanges (#1492)
  add celo.org/about#contributors id (#2488)
  [Wallet] Fix integration build firebase db url on Android (#2495)
  Fixes governance CLI bugs encountered while running election contract upgrade (#2482)
  Add validator:signed-blocks command and fix validator:status bug (#2456)
  Bump @celo/celocli version to 0.0.34 (#2420)
  Fix Logo + backers number change (#2453)
  Improve election efficiency by short circuiting (#2475)
  Page for Experience / BrandKit / Composition (#2462)
  Configure the time to wait for text messages (#2450)
  Add react-testing-utils + Fix Analytics (#2437)
  collect coverage on web (#2415)
  Add callouts to serve text messages in regions (#2458)
  [Wallet] Historical currency conversions in the transaction feed (#2446)
  ...

# Conflicts:
#	.circleci/config.yml
#	packages/web/src/brandkit/common/Page.tsx
#	packages/web/src/logos/LogoLightBg.tsx
#	packages/web/static/locales/en/brand.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Have PR merge automatically when checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants