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
Reduce JSON-RPC queries #6221
Reduce JSON-RPC queries #6221
Conversation
beacon-chain/powchain/service.go
Outdated
@@ -613,9 +606,13 @@ func (s *Service) run(done <-chan struct{}) { | |||
|
|||
s.initPOWService() | |||
|
|||
ticker := time.NewTicker(1 * time.Second) | |||
ticker := time.NewTicker(5 * time.Minute) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we instead change this to the eth1 block time ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, we don't need a second ticker. I've just combined this with the headTicker case in the select statement.
Codecov Report
@@ Coverage Diff @@
## master #6221 +/- ##
=======================================
Coverage 59.90% 59.90%
=======================================
Files 322 322
Lines 27337 27337
=======================================
Hits 16375 16375
Misses 8730 8730
Partials 2232 2232 |
…m into reduce-json-rpc-calls
What type of PR is this?
Bug fix
What does this PR do? Why is it needed?
This reduces the total 1 request per second call to ETH1 to ETH1 block seconds interval
Given that we only need to process logs after a new ETH1 follow distance voting around (1024 slots), these calls to ETH1 should be rather infrequent.
Setting this to 5 minutes for now to relieve the immediate pressure on users.Set to ETH1 block time interval based on feedback.Which issues(s) does this PR fix?
Fixes #6206
Other notes for review
Also deleted "client" field which was unused.