Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change to 12 hour voting delay #23

Merged
merged 1 commit into from
Jan 8, 2024
Merged

Change to 12 hour voting delay #23

merged 1 commit into from
Jan 8, 2024

Conversation

jferas
Copy link
Contributor

@jferas jferas commented Jan 4, 2024

As requested by Radworks, a 12 hour voting delay at deployment

@jferas
Copy link
Contributor Author

jferas commented Jan 4, 2024

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

Copy link

github-actions bot commented Jan 4, 2024

Coverage after merging voting-delay-12-hours into main will be

76.00%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   RadworksGovernor.sol73.91%75%69.23%76%101, 126–127, 135, 138, 152, 203, 84

@@ -2,7 +2,7 @@
pragma solidity ^0.8.20;

contract DeployInput {
uint256 constant INITIAL_VOTING_DELAY = 7200; // 24 hours
uint256 constant INITIAL_VOTING_DELAY = 3600; // 12 hours
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the clock mode on this contract blocks or timestamp? in either case, is this correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocks... the RadworksGovernor inherits from GovernorVotesComp, and GovernorVotesComp defines its clock function in such as way that if the underlying governance token has a clock function, that it called and its value is returned.. if it does not (and the Radicle token does not) the current block number is returned:

(from GovernorVotesComp)
   /**
     * @dev Clock (as specified in EIP-6372) is set to match the token's clock. Fallback to block numbers if the token
     * does not implement EIP-6372.
     */
    function clock() public view virtual override returns (uint48) {
        try token.clock() returns (uint48 timepoint) {
            return timepoint;
        } catch {
            return SafeCast.toUint48(block.number);
        }
    }

At 12 seconds per block (5 per minute) an hour's worth of blocks would be 300 .. so 12 hours would be 3600.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the explanation @jferas, i stand corrected, looks good to me!

@wildmolasses wildmolasses self-requested a review January 8, 2024 20:57
@jferas jferas merged commit cf60c1f into main Jan 8, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants