AcalaNetwork / Acala

Acala - cross-chain DeFi hub and stablecoin based on Substrate for Polkadot and Kusama.
https://acala.network
GNU General Public License v3.0
741 stars 456 forks source link

Homa nominate validators #2734

Closed wangjj9219 closed 3 months ago

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 70.54264% with 38 lines in your changes are missing coverage. Please review.

Project coverage is 65.18%. Comparing base (16f147e) to head (0eae6d4).

Files Patch % Lines
modules/xcm-interface/src/lib.rs 0.00% 13 Missing :warning:
modules/homa/src/lib.rs 72.41% 8 Missing :warning:
modules/homa-validator-list/src/lib.rs 53.33% 7 Missing :warning:
modules/relaychain/src/lib.rs 20.00% 4 Missing :warning:
modules/support/src/lib.rs 0.00% 4 Missing :warning:
modules/nominees-election/src/lib.rs 96.61% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2734 +/- ## ========================================== - Coverage 65.35% 65.18% -0.18% ========================================== Files 69 67 -2 Lines 9808 9018 -790 ========================================== - Hits 6410 5878 -532 + Misses 3398 3140 -258 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

wangjj9219 commented 4 months ago

should also integrate with nominees-election to allow LDOT holders to elect validators

reviewed the designs of nominee-election and homa-validator-list. They are similar. It seems that nominee-election is an earlier design. Later, there was the pallet homa-validator-list. Similarly, LDOT holders can give validators Votes to increase its guarantee, and the locked guarantee can be frozen and slashed through governance

Need to confirm, is the design of homa-validator-list enough to replace nominee-election? Does it need optimization, or some renaming?

xlc commented 4 months ago

This is the intended usage:

Validators what wish to become LDOT validators needs to register themselves using homa-validator-list and provide insurance deposit.

Then LDOT holders can nominate LDOT validators using nominee-election to pick the top X validators out of all registered validators from homa-validator-list

So the deposit for homa-validator-list can be low as they have to be top X picked by LDOT holders anyway

wangjj9219 commented 4 months ago

This is the intended usage:

Validators what wish to become LDOT validators needs to register themselves using homa-validator-list and provide insurance deposit.

Then LDOT holders can nominate LDOT validators using nominee-election to pick the top X validators out of all registered validators from homa-validator-list

So the deposit for homa-validator-list can be low as they have to be top X picked by LDOT holders anyway

I understand, homa-validator-list serves as a filter, and the pick up logic should be placed in nominee-election, and homa read nominee from nominee-election.