sidechain: change pooling time to 1s#4074
Conversation
In most cases, meta chain will see fractions of a second as a config, which is
too small a period that makes logs full of:
```
info blockchain/blockchain.go:365 waiting for synchronization with the blockchain network... {"component": "metadata chain (IR)"}
info sidechain/sidechain.go:116 waiting for synchronization with the blockchain network... {"component": "metadata chain (SN)"}
```
Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
263056f to
a419019
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4074 +/- ##
=======================================
Coverage 26.29% 26.30%
=======================================
Files 671 671
Lines 45865 45865
=======================================
+ Hits 12060 12063 +3
+ Misses 32673 32671 -2
+ Partials 1132 1131 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| t := time.NewTicker(s.core.GetConfig().Genesis.TimePerBlock) | ||
| t := time.NewTicker(time.Second) | ||
|
|
||
| for { |
There was a problem hiding this comment.
What's the purpose of this loop?
There was a problem hiding this comment.
notify if we are in sync. the same way for FSchain:
neofs-node/pkg/innerring/internal/blockchain/blockchain.go
Lines 364 to 375 in 5df4d7b
There was a problem hiding this comment.
Usually netServer has something to say on its own when it's in sync.
There was a problem hiding this comment.
Then this can be also changed for FS chain.
There was a problem hiding this comment.
so drop both loops? for neofs-dev it is clearer than neo-go internal logs
There was a problem hiding this comment.
i often searched for blockchain state successfully synchronized to be sure everything was ok
There was a problem hiding this comment.
To me they're useless, if you're running a netServer it will log the moment it detects sync state.
There was a problem hiding this comment.
neo-go's logger can be suppressed, it can be changed independently. current solution is neofs app level to me
There was a problem hiding this comment.
I still think it's useless, but if you need it we can leave it. It has to be consistent with FS chain though.
| go s.netServer.Start() | ||
|
|
||
| t := time.NewTicker(s.core.GetConfig().Genesis.TimePerBlock) | ||
| t := time.NewTicker(time.Second) |
There was a problem hiding this comment.
if frequent log records is the only problem, i'd just move waiting... record before loop
There was a problem hiding this comment.
as for me: if something is wrong, it would be better to repeat it until smth is done
There was a problem hiding this comment.
as i understand this is a background job. If observer does not care about synchronized message, it does not matter how many waiting... there was. If cares, again does not matter
overall, any spam is annoying, so im ok with this change
There was a problem hiding this comment.
as i understand this is a background job
yes it is. meta was enabled and configured incorrectly, there are no blocks/objects on the node, and this log is the only way to understand that smth must be done (ok, @roman-khimov, also says that there is smth inside neo-go that would also tell you that there are no new blocks, but i do not want to rely on it)
In most cases meta chain will see fractions of seconds as a config, that is too small period that make logs full of: