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

Check sync status of attestation service #2191

Merged
merged 4 commits into from
Dec 12, 2019

Conversation

nambrot
Copy link
Contributor

@nambrot nambrot commented Dec 11, 2019

Description

This PR copies the CLI sync check.

It also changes the default logging scheme from json to human.

Tested

  • Ran locally

if (blockNumber === 0) {
throw new Error(
'Could not fetch latest block from web3 provider ' + fetchEnv('CELO_PROVIDER')
// Copied from @celo/cli/src/utils/helpers
Copy link
Contributor

Choose a reason for hiding this comment

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

would be better to have a function for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought about it, but we only have utils and I did not want to add web3 as a dependency

@mcortesi mcortesi assigned nambrot and unassigned mcortesi Dec 11, 2019
@nambrot nambrot added the automerge Have PR merge automatically when checks pass label Dec 11, 2019
@codecov
Copy link

codecov bot commented Dec 12, 2019

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #2191    +/-   ##
========================================
  Coverage   74.88%   74.88%            
========================================
  Files         279      279            
  Lines        7797     7797            
  Branches      690      971   +281     
========================================
  Hits         5839     5839            
  Misses       1842     1842            
  Partials      116      116
Flag Coverage Δ
#mobile 74.88% <ø> (ø) ⬆️

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 8082dd5...abe697a. Read the comment docs.

@celo-ci-bot-user celo-ci-bot-user merged commit df88ed5 into master Dec 12, 2019
@celo-ci-bot-user celo-ci-bot-user deleted the nambrot/attestation-service-sync-status branch December 12, 2019 01:15
aaronmgdr added a commit that referenced this pull request Dec 12, 2019
* master:
  [Wallet] Use Charles proxy to see eth JSON rpc calls when using forno (#2204)
  [Wallet] Disable skip button when the user enable contact access (#2224)
  [Wallet] Redesigning notification lists (#1967)
  [Wallet] Fix crash on iOS when segment is enabled (#2222)
  Update documentation wrt. epoch rewards fractions (#2182)
  Improvement facilitating to run a full node (#2130)
  [BlockchainApi] Add ability to get exchange rates from/to cGLD or cUSD (#2005)
  Improve reliability of e2e governance test (#2208)
  Fix/protocol test flakyness (#2155)
  Fix bignumber display in CLI (#2212)
  Doc changes to address frequently asked questions (#2209)
  Upgrade TS version (#2196)
  Wait for only waitTime - 1 blocks (#2207)
  Minor baklava docs reconnection fixes (#2215)
  Update walletkit gateway fee to fix transactions in forno mode (#2211)
  Update baklava network ID in docs for 1.1 (#2214)
  Support more than 1 attesation bot at a time (#2192)
  Check sync status of attestation service (#2191)
  Indicate to run Twilio globally (#2193)
  Add Twilio and attestation bot envs (#2194)
}
}
} else {
throw new Error('Node is not syncing')
Copy link

Choose a reason for hiding this comment

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

Is this the right message? If eth_syncing returned a non-false then the node is syncing. Should this message read 'Node is not synced' instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch. I've opened #2372

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.

6 participants