decred / dcrstakepool

Stakepool for Decred.
Other
72 stars 75 forks source link

stakepoold: Make startup redeem script checking more efficient #613

Closed JoeGruffins closed 2 years ago

JoeGruffins commented 4 years ago

More discussion here: #606

Currently scripts are gathered from all wallets and compared against each other. It should be possible to get all addresses and scripts from the database and have stakepoold compare addresses fetched from dcrwallet to the database results and import the scripts they need independently. I do not think stakepooldclient needs to do any work at all. Only stop on and report errors.

stakepoold will work without having a connection to a database, which must be changed in order for this to be effective.

The code in question is here:

https://github.com/decred/dcrstakepool/blob/3394b5069f4b459435e5c9fcfb56ecd1929a767c/stakepooldclient/stakepooldclient.go#L348-L435

and stakepoold's ListScripts command.

itswisdomagain commented 4 years ago

It should be possible to get all addresses and scripts from the database and have stakepoold compare addresses fetched from dcrwallet to the database results and import the scripts they need independently.

There's still the question of whether or not we should allow stakepoold run independently of dcrstakepool. Compare https://github.com/decred/dcrstakepool/issues/495#issuecomment-605817819.

JoeGruffins commented 2 years ago

Closing as repo is deprecated.