GithubHelp home page GithubHelp logo

Comments (2)

maltekliemann avatar maltekliemann commented on July 17, 2024 2

Thanks, that settles it then!

The question came up in a discussion with the Polkassembly team about why their app shows a proposal passing outside of the decision period. Played around with the tests of pallet-referendum and then verified using the Polkadot dev node.

from polkadot-wiki.

DrW3RK avatar DrW3RK commented on July 17, 2024 1

Thanks for reporting. I skimmed through the source code and observed that the time elapsed could be greater than the deciding period, provided the referendum is confirming. So, your claim "if a proposal starts confirming one block before the end of the decision period and stays in confirming state for the duration of the confirmation period, it is approved. " makes sense to me.

Time elapsed is calculated here https://github.com/paritytech/polkadot-sdk/blob/9bf1a5e23884921498b381728bfddaae93f83744/substrate/frame/referenda/src/lib.rs#L1153

If the referendum is confirming, then it lets elapsed time be greater than the deciding period here https://github.com/paritytech/polkadot-sdk/blob/9bf1a5e23884921498b381728bfddaae93f83744/substrate/frame/referenda/src/lib.rs#L1300 and if the voting tally reverses, the referendum is no longer confirming and gets rejected as the decision period has elapsed.

We will update the Wiki. Just curious how you experimented with this!

from polkadot-wiki.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.