Skip to content

Commit

Permalink
Bump gas version on main
Browse files Browse the repository at this point in the history
and update release.yaml template closer to what is used in the release, and add more details on release folder issues.
  • Loading branch information
igor-aptos committed Jan 31, 2025
1 parent f246671 commit 453339a
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 20 deletions.
2 changes: 1 addition & 1 deletion aptos-move/aptos-gas-schedule/src/ver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
/// global operations.
/// - V1
/// - TBA
pub const LATEST_GAS_FEATURE_VERSION: u64 = gas_feature_versions::RELEASE_V1_26;
pub const LATEST_GAS_FEATURE_VERSION: u64 = gas_feature_versions::RELEASE_V1_27;

pub mod gas_feature_versions {
pub const RELEASE_V1_8: u64 = 11;
Expand Down
15 changes: 8 additions & 7 deletions aptos-move/aptos-release-builder/data/release.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
---
remote_endpoint: https://fullnode.mainnet.aptoslabs.com
name: "TBD"
# replace with below for actual release, compat test needs concrete URL above:
# remote_endpoint: ~
name: "vX.YY.Z"
proposals:
- name: proposal_1_upgrade_framework
metadata:
title: "Multi-step proposal to upgrade mainnet framework, version TBD"
description: "This includes changes in (TBA: URL to changes)"
title: "Multi-step proposal to upgrade mainnet framework, version vX.YY.Z"
description: "This includes changes in https://github.com/aptos-labs/aptos-core/releases/tag/aptos-node-vX.YY.Z"
execution_mode: MultiStep
update_sequence:
- Gas:
new: current
# replace with below for actual release, above "current" is needed for compat tests:
# old: https://raw.githubusercontent.com/aptos-labs/aptos-networks/main/gas/vX.WW.Z.json
# new: https://raw.githubusercontent.com/aptos-labs/aptos-networks/main/gas/vX.YY.Z.json
- Framework:
bytecode_version: 7
git_hash: ~
- FeatureFlag:
enabled:
- allow_serialized_script_args

61 changes: 49 additions & 12 deletions aptos-move/aptos-release-builder/src/components/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,21 +599,41 @@ impl ReleaseConfig {

source_dir.push("sources");

std::fs::create_dir(source_dir.as_path())
.map_err(|err| anyhow!("Fail to create folder for source: {:?}", err))?;
std::fs::create_dir(source_dir.as_path()).map_err(|err| {
anyhow!(
"Fail to create folder for source {}: {:?}",
source_dir.display(),
err
)
})?;

source_dir.push(&self.name);
std::fs::create_dir(source_dir.as_path())
.map_err(|err| anyhow!("Fail to create folder for source: {:?}", err))?;
std::fs::create_dir(source_dir.as_path()).map_err(|err| {
anyhow!(
"Fail to create folder for source {}: {:?}",
source_dir.display(),
err
)
})?;

let mut metadata_dir = base_path.to_path_buf();
metadata_dir.push("metadata");

std::fs::create_dir(metadata_dir.as_path())
.map_err(|err| anyhow!("Fail to create folder for metadata: {:?}", err))?;
std::fs::create_dir(metadata_dir.as_path()).map_err(|err| {
anyhow!(
"Fail to create folder for metadata {}: {:?}",
metadata_dir.display(),
err
)
})?;
metadata_dir.push(&self.name);
std::fs::create_dir(metadata_dir.as_path())
.map_err(|err| anyhow!("Fail to create folder for metadata: {:?}", err))?;
std::fs::create_dir(metadata_dir.as_path()).map_err(|err| {
anyhow!(
"Fail to create folder for metadata {}: {:?}",
metadata_dir.display(),
err
)
})?;

// If we are generating multi-step proposal files, we generate the files in reverse order,
// since we need to pass in the hash of the next file to the previous file.
Expand All @@ -623,8 +643,13 @@ impl ReleaseConfig {
proposal_dir.push(&self.name);
proposal_dir.push(proposal.name.as_str());

std::fs::create_dir(proposal_dir.as_path())
.map_err(|err| anyhow!("Fail to create folder for proposal: {:?}", err))?;
std::fs::create_dir(proposal_dir.as_path()).map_err(|err| {
anyhow!(
"Fail to create folder for proposal {}: {:?}",
proposal_dir.display(),
err
)
})?;

let mut result: Vec<(String, String)> = vec![];
if let ExecutionMode::MultiStep = &proposal.execution_mode {
Expand Down Expand Up @@ -657,7 +682,13 @@ impl ReleaseConfig {
script_path.set_extension("move");

std::fs::write(script_path.as_path(), append_script_hash(script).as_bytes())
.map_err(|err| anyhow!("Failed to write to file: {:?}", err))?;
.map_err(|err| {
anyhow!(
"Failed to write to file {}: {:?}",
script_path.display(),
err
)
})?;
}

let mut metadata_path = base_path.to_path_buf();
Expand All @@ -669,7 +700,13 @@ impl ReleaseConfig {
metadata_path.as_path(),
serde_json::to_string_pretty(&proposal.metadata)?,
)
.map_err(|err| anyhow!("Failed to write to file: {:?}", err))?;
.map_err(|err| {
anyhow!(
"Failed to write to file {}: {:?}",
metadata_path.display(),
err
)
})?;
}

Ok(())
Expand Down

0 comments on commit 453339a

Please sign in to comment.