substrate icon indicating copy to clipboard operation
substrate copied to clipboard

Abstracts elections-phragmen pallet to use NposSolver

Open gpestana opened this issue 3 years ago • 22 comments

This PR refactors the current elections-phragmen pallet to use an NposSolver instead of hardcoding one flavor of phragmen.

To-do:

  • [x] rename elections-phragmen to elections-generic
  • [x] change name of the pallet's dir from elections-phragmen to elections
  • [x] comments on changing the name of the pallet (but not the lockid)
  • [ ] try with follow-chain on a block that performs a council election

polkadot companion: https://github.com/paritytech/polkadot/pull/6278

Closes https://github.com/paritytech/substrate/issues/8250 Follow up of https://github.com/paritytech/substrate/pull/12563

gpestana avatar Oct 31 '22 07:10 gpestana

I think we should rename the pallet as well fwiw.

kianenigma avatar Nov 08 '22 10:11 kianenigma

I think we should rename the pallet as well fwiw.

Yes, was leaving that to the end. renaming now

gpestana avatar Nov 08 '22 22:11 gpestana

bot rebase

gpestana avatar Nov 13 '22 15:11 gpestana

/cmd queue -c bench-bot $ pallet dev pallet_elections

gpestana avatar Nov 17 '22 18:11 gpestana

bot rebase

gpestana avatar Nov 20 '22 15:11 gpestana

/cmd queue -c bench-bot $ pallet dev pallet_elections

gpestana avatar Nov 21 '22 21:11 gpestana

needs rebase + ~~would be good to re-weight the election pallet with the bot.~~

kianenigma avatar Dec 12 '22 20:12 kianenigma

/cmd queue -c bench-bot $ pallet dev pallet_elections

kianenigma avatar Dec 12 '22 20:12 kianenigma

/cmd queue -c bench-bot $ pallet dev pallet_elections

gpestana avatar Dec 14 '22 15:12 gpestana

bot rebase

gpestana avatar Jan 12 '23 13:01 gpestana

/cmd queue -c bench-bot $ pallet dev pallet_elections

gpestana avatar Feb 08 '23 23:02 gpestana

bot rebase

gpestana avatar Feb 14 '23 13:02 gpestana

/cmd queue -c bench-bot $ pallet dev pallet_election_provider_support

gpestana avatar Feb 20 '23 05:02 gpestana

bot rebase

gpestana avatar Feb 20 '23 05:02 gpestana

bot bench $ pallet dev pallet_election_provider_support_benchmarking

rossbulat avatar Feb 20 '23 10:02 rossbulat

bot bench $ pallet dev pallet_election_provider_support

gpestana avatar Feb 20 '23 11:02 gpestana

bot clean

gpestana avatar Feb 20 '23 11:02 gpestana

bot bench $ pallet dev pallet_election_provider_support_benchmarking

gpestana avatar Feb 20 '23 11:02 gpestana

@gpestana https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2414803 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_election_provider_support_benchmarking. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 42-94637b6e-48b1-45b4-8ea6-ac3345937e08 to cancel this command or bot cancel to cancel all commands in this pull request.

command-bot[bot] avatar Feb 20 '23 11:02 command-bot[bot]

@gpestana Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_election_provider_support_benchmarking has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2414803 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2414803/artifacts/download.

command-bot[bot] avatar Feb 20 '23 12:02 command-bot[bot]

Would be good to see a bit more context about upgrade choices in the PR description:

  1. One should not rename the pallet in construct_runtime, or else use move_pallet (not reocmmended)
  2. One should consider switching to a simpler Solver type like approval-voting.

kianenigma avatar Feb 20 '23 12:02 kianenigma

Would be good to see a bit more context about upgrade choices in the PR description:

  1. One should not rename the pallet in construct_runtime, or else use move_pallet (not reocmmended)
  2. One should consider switching to a simpler Solver type like approval-voting.

Good points, added to the PR comments.

gpestana avatar Feb 20 '23 12:02 gpestana

bot rebase

gpestana avatar Feb 21 '23 11:02 gpestana

Rebased

bot rebase

gpestana avatar Feb 23 '23 09:02 gpestana

Branch is already up-to-date

bot merge

gpestana avatar Feb 23 '23 10:02 gpestana

Error: Github API says https://github.com/paritytech/polkadot/pull/6278 is not mergeable

bot merge

gpestana avatar Feb 23 '23 11:02 gpestana

This pull request has been mentioned on Polkadot Forum. There might be relevant details there:

https://forum.polkadot.network/t/mis-configuring-pallet-elections-phragmen/2502/1

Polkadot-Forum avatar Apr 03 '23 18:04 Polkadot-Forum