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

[Bug] No change of epochs will block governance #82

Open
andygolay opened this issue Oct 10, 2024 · 4 comments
Open

[Bug] No change of epochs will block governance #82

andygolay opened this issue Oct 10, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@andygolay
Copy link

🐛 Bug

Because Suzuka epoch is fixed at 1, functions that rely on aptos_governance::reconfigure won't work.

For example this script to enable feature flags:

script {
    use aptos_framework::aptos_governance;
    use std::features;

    fun enable_bridge_feature(core_resources: &signer) {
        let core_signer = aptos_governance::get_signer_testnet_only(core_resources, @0x1);

        let framework_signer = &core_signer;

        let enabled_blob: vector<u64> = vector[
            features::get_atomic_bridge_feature()
        ];

        let disabled_blob: vector<u64> = vector[];

        features::change_feature_flags_for_next_epoch(framework_signer, enabled_blob, disabled_blob);
        aptos_governance::reconfigure(framework_signer);
    }
}

To reproduce

Run the above script. You'll see the feature flag in features::PendingFeatures.

Expected Behavior

We need some way to do governance without the epoch change. Perhaps reconfiguration::reconfigure could advance to the next block instead, so that governance proposals are enacted on next block, rather than next epoch? This would require input from @mzabaluev / @l-monninger others who are more familiar with the inner workings for the repository, as far as what side effects or subtle issues that change might entail.

System information

Additional context

This is blocking client integration tests with the atomic bridge framework modules, because those modules are feature flagged out.

@andygolay andygolay added the bug Something isn't working label Oct 10, 2024
@andyjsbell
Copy link
Collaborator

andyjsbell commented Oct 10, 2024

Maybe you could use features::on_new_epoch(&framework_signer); instead of aptos_governance::reconfigure(framework_signer);

@0xmovses
Copy link
Collaborator

Catching up here, wouldn't on_new_epoch still not work as there is only ever one epoch on movement testnet. The epoch would never change.

@andygolay
Copy link
Author

Looks like it worked 🙏

on_new_epoch sets the flag as if there's a new epoch.

Do you think this issue should stay open or is it already known @andyjsbell ?
image

@andyjsbell
Copy link
Collaborator

Good. This will depend if this is by design so maybe @l-monninger or @mzabaluev can chip in on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants