You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Right now the calculation of the delegate list is made from database. This degrades performance because the wallets that have changed during last round should be synced with database before the calculation occurs. Using very costly upsert.
Is your feature request related to a problem? Please describe.
Right now the calculation of the delegate list is made from database. This degrades performance because the wallets that have changed during last round should be synced with database before the calculation occurs. Using very costly upsert.
see the note https://github.com/ArkEcosystem/core/blob/blockchain_fix/packages/core-database-sequelize/lib/connection.js#L323
Describe the solution you'd like
The best way would be to to the calculation in wallet manager with a function
calculateDelegateList(delegateMax = 51)
inside https://github.com/ArkEcosystem/core/blob/blockchain_fix/packages/core-database/lib/wallet-manager.js#L16consisting on 2 separate actions:
and use it instead of the database calculation here https://github.com/ArkEcosystem/core/blob/blockchain_fix/packages/core-database/lib/interface.js#L71 instead of a database implementation
Describe alternatives you've considered
Even better would be to update the votes here https://github.com/ArkEcosystem/core/blob/blockchain_fix/packages/core-database/lib/wallet-manager.js inside the 4 functions:
in the end getting the delegate list would be as simple as sorting the most voted wallets
The text was updated successfully, but these errors were encountered: