-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
randomness #12: disable randomness-breaking governance functions #12420
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12420 +/- ##
========================================
Coverage 63.9% 64.0%
========================================
Files 816 817 +1
Lines 180664 181104 +440
========================================
+ Hits 115548 115929 +381
- Misses 65116 65175 +59 ☔ View full report in Codecov by Sentry. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
proposals: | ||
- name: step_1_increase_max_txn_gas | ||
metadata: | ||
title: "Increase max txn gas temporarily for framework upgrade" | ||
description: "Increase max txn gas temporarily for framework upgrade" | ||
execution_mode: MultiStep | ||
update_sequence: | ||
- DefaultGasWithOverride: | ||
- DefaultGasWithOverrideOld: # This is translated to `gas_schedule::set_gas_schedule(...)`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if randomness is not yet enabled, does the new DefaultGasWithOverride work, or is it required to use DefaultGasWithOverrideOld ?
I understand that DefaultGasWithOverrideOld will not work after randomness is enabled, but I am asking for the opposite.
ReleaseEntry::DefaultGasWithOverrideOld(gas_overrides) => { | ||
let gas_schedule = gas_override_default(gas_overrides)?; | ||
if !fetch_and_equals::<GasScheduleV2>(client, &gas_schedule)? { | ||
result.append(&mut gas::generate_gas_upgrade_proposal( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we actually need this? should we just pass the flag based on whether randomness is enabled on-chain?
though I am fine with explicit way as it is now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we want to check the on-chain framework version then. is framework version a thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
argh. I don't think that's possible
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
✅ Forge suite
|
Disable governance functions that breaks randomness
The following governance functions need to be disabled (except some genesis/test usage), because they internally call
aptos_framework::reconfiguration::reconfigure()
which break randomness for an epoch.aptos_framework::consensus_config::set()
aptos_framework::execution_config::set()
aptos_framework::version::set()
aptos_framework::gas_schedule::set_gas_schedule()
std::features::change_feature_flags()
aptos_framework::jwks::upsert_oidc_provider()
aptos_framework::jwks::remove_oidc_provider()
The new way to update these on-chain configs is to write the change(s) into a buffer, and immediately trigger
aptos_governance::reconfigure
(which maybe immediate/async, depending on whether randomness is enabled): buffered change will be applied at the end of the reconfig. Typically a governance proposal script will look like:See
aptos-move/aptos-release-builder/data/example-release-with-randomness-framework
for full details.Release builder updates
aptos-release-builder
is updated accordingly to use the new governance functions when translating release entries.NOTE that a new entry
DefaultGasWithOverrideOld
is temporarily added to support the following release proposal sequence:txn.max_execution_gas
using the old governance functionaptos_framework::gas_schedule::update_gas_schedule()
(so the next txn can fit).aptos_framework::gas_schedule::update_for_next_epoch()
Update some existing tests accordingly
Added release entries for randomness release