Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Preimage requested twice for Referenda approved via Democracy #13534

@bernardo-xxnet

Description

@bernardo-xxnet

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Description of bug

When a Referendum is approved in the Democracy pallet, the preimage is held (requested) before the Scheduler is called.

T::Preimages::hold(&status.proposal);

The changes in #13340 make the Scheduler request a preimage for the call being scheduled.
This results in the preimage for any referendum passing via Democracy being requested twice.

When the Scheduled call runs, the preimage is unrequested only once, leaving a pending request for that preimage forever onchain.

This change is included in the latest release polkadot-v0.9.39.

I believe that the solution to this issue could be to not request the preimage in the Democracy pallet anymore, since the call to Scheduler will request it anyways.

Steps to reproduce

Run the dev network on Substrate branch polkadot-v0.9.3 and pass a proposal via Democracy.
After the proposal passes and is executed by the Scheduler, the preimage remains requested.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions