ergoplatform / oracle-core

Core off-chain component of Oracle Pools
Apache License 2.0
61 stars 37 forks source link

Node wallet re-scan after the update tx makes the pool go offline for a significant amount of time #242

Closed greenhat closed 1 year ago

greenhat commented 1 year ago

After #126

Motivation

It took more than 5 hours for all the oracles to finish the wallet re-scan. All this time the pool was offline. Keep in mind that it's testnet, so on mainnet re-scan should take even longer.

Possible mitigations against offline pool due to the wallet re-scan after update tx

Minimize the need for wallet re-scans #243

Although we might use only token ids in scans this would only help to avoid wallet rescan only in cases of changing ballot box contract. Because in all other cases, new token(s) are issued, thus triggering the wallet rescan anyway.

Minimize the time of wallet re-scan

I believe the re-scan performance can be improved since node restart significantly ( more than 10x) speeds up the wallet re-scan. I've experienced it several times already which leads me to believe this to be a systemic issue and not some fluke. https://github.com/ergoplatform/ergo/issues/1967

greenhat commented 1 year ago

With https://github.com/ergoplatform/ergo/pull/1975 scan goes considerably faster.