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

perry try fix release yaml #8715

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 43 additions & 50 deletions .github/workflows/docker-build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,43 +171,8 @@ jobs:
FEATURES: consensus-only-perf-test
BUILD_ADDL_TESTING_IMAGES: true

rust-images-all:
needs:
[
determine-docker-build-metadata,
rust-images,
rust-images-indexer,
rust-images-failpoints,
rust-images-performance,
rust-images-consensus-only-perf-test,
]
if: always() # this ensures that the job will run even if the previous jobs were skipped
runs-on: ubuntu-latest
steps:
- name: fail if rust-images job failed
if: ${{ needs.rust-images.result == 'failure' }}
run: exit 1
- name: fail if rust-images-indexer job failed
if: ${{ needs.rust-images-indexer.result == 'failure' }}
run: exit 1
- name: fail if rust-images-failpoints job failed
if: ${{ needs.rust-images-failpoints.result == 'failure' }}
run: exit 1
- name: fail if rust-images-performance job failed
if: ${{ needs.rust-images-performance.result == 'failure' }}
run: exit 1
- name: fail if rust-images-consensus-only-perf-test job failed
if: ${{ needs.rust-images-consensus-only-perf-test.result == 'failure' }}
run: exit 1
outputs:
rustImagesResult: ${{ needs.rust-images.result }}
rustImagesIndexerResult: ${{ needs.rust-images-indexer.result }}
rustImagesFailpointsResult: ${{ needs.rust-images-failpoints.result }}
rustImagesPerformanceResult: ${{ needs.rust-images-performance.result }}
rustImagesConsensusOnlyPerfTestResult: ${{ needs.rust-images-consensus-only-perf-test.result }}

sdk-release:
needs: [rust-images, determine-docker-build-metadata] # runs with the default release docker build variant "rust-images"
needs: [permission-check, rust-images, determine-docker-build-metadata] # runs with the default release docker build variant "rust-images"
if: |
(github.event_name == 'push' && github.ref_name != 'main') ||
github.event_name == 'workflow_dispatch' ||
Expand All @@ -220,7 +185,7 @@ jobs:
GIT_SHA: ${{ needs.determine-docker-build-metadata.outputs.gitSha }}

cli-e2e-tests:
needs: [rust-images, determine-docker-build-metadata] # runs with the default release docker build variant "rust-images"
needs: [permission-check, rust-images, determine-docker-build-metadata] # runs with the default release docker build variant "rust-images"
if: |
!contains(github.event.pull_request.labels.*.name, 'CICD:skip-sdk-integration-test') && (
github.event_name == 'push' ||
Expand All @@ -235,7 +200,7 @@ jobs:
GIT_SHA: ${{ needs.determine-docker-build-metadata.outputs.gitSha }}

indexer-grpc-e2e-tests:
needs: [rust-images, determine-docker-build-metadata] # runs with the default release docker build variant "rust-images"
needs: [permission-check, rust-images, determine-docker-build-metadata] # runs with the default release docker build variant "rust-images"
if: |
(github.event_name == 'push' && github.ref_name != 'main') ||
github.event_name == 'workflow_dispatch' ||
Expand All @@ -248,9 +213,16 @@ jobs:
GIT_SHA: ${{ needs.determine-docker-build-metadata.outputs.gitSha }}

forge-e2e-test:
needs: [rust-images-all, determine-docker-build-metadata]
if: | # always() ensures that the job will run even if some of the previous docker variant build jobs were skipped https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions
always() && needs.rust-images-all.result == 'success' && (
needs:
- permission-check
- determine-docker-build-metadata
- rust-images
- rust-images-indexer
- rust-images-failpoints
- rust-images-performance
- rust-images-consensus-only-perf-test
if: |
!failure() && !cancelled() && needs.permission-check.result == 'success' && (
(github.event_name == 'push' && github.ref_name != 'main') ||
github.event_name == 'workflow_dispatch' ||
contains(github.event.pull_request.labels.*.name, 'CICD:run-e2e-tests') ||
Expand All @@ -272,9 +244,16 @@ jobs:

# Run e2e compat test against testnet branch
forge-compat-test:
needs: [rust-images-all, determine-docker-build-metadata]
if: | # always() ensures that the job will run even if some of the previous docker variant build jobs were skipped https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions
always() && needs.rust-images-all.result == 'success' && (
needs:
- permission-check
- determine-docker-build-metadata
- rust-images
- rust-images-indexer
- rust-images-failpoints
- rust-images-performance
- rust-images-consensus-only-perf-test
if: |
!failure() && !cancelled() && needs.permission-check.result == 'success' && (
(github.event_name == 'push' && github.ref_name != 'main') ||
github.event_name == 'workflow_dispatch' ||
contains(github.event.pull_request.labels.*.name, 'CICD:run-e2e-tests') ||
Expand All @@ -293,9 +272,16 @@ jobs:

# Run forge framework upgradability test
forge-framework-upgrade-test:
needs: [rust-images-all, determine-docker-build-metadata]
if: | # always() ensures that the job will run even if some of the previous docker variant build jobs were skipped https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions
always() && needs.rust-images-all.result == 'success' && (
needs:
- permission-check
- determine-docker-build-metadata
- rust-images
- rust-images-indexer
- rust-images-failpoints
- rust-images-performance
- rust-images-consensus-only-perf-test
if: |
!failure() && !cancelled() && needs.permission-check.result == 'success' && (
(github.event_name == 'push' && github.ref_name != 'main') ||
github.event_name == 'workflow_dispatch' ||
contains(github.event.pull_request.labels.*.name, 'CICD:run-e2e-tests') ||
Expand All @@ -313,9 +299,16 @@ jobs:
FORGE_NAMESPACE: forge-framework-upgrade-${{ needs.determine-docker-build-metadata.outputs.targetCacheId }}

forge-consensus-only-perf-test:
needs: [rust-images-all, determine-docker-build-metadata]
if: | # always() ensures that the job will run even if some of the previous docker variant build jobs were skipped https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions
always() && needs.rust-images-all.result == 'success' &&
needs:
- permission-check
- determine-docker-build-metadata
- rust-images
- rust-images-indexer
- rust-images-failpoints
- rust-images-performance
- rust-images-consensus-only-perf-test
if: |
!failure() && !cancelled() && needs.permission-check.result == 'success' &&
contains(github.event.pull_request.labels.*.name, 'CICD:run-consensus-only-perf-test')
uses: aptos-labs/aptos-core/.github/workflows/workflow-run-forge.yaml@main
secrets: inherit
Expand Down
4 changes: 3 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -627,14 +627,14 @@ inherits = "release"
opt-level = 3
debug = true
overflow-checks = true
lto = true
lto = "thin"
codegen-units = 1

[profile.cli]
inherits = "release"
debug = false
opt-level = "z"
lto = true
lto = "thin"
strip = true
codegen-units = 1

Expand Down
6 changes: 4 additions & 2 deletions aptos-move/aptos-gas-profiling/src/profiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,13 @@ where
&mut self,
addr: AccountAddress,
ty: impl TypeView,
loaded: Option<(NumBytes, impl ValueView)>,
val: Option<impl ValueView>,
bytes_loaded: NumBytes,
) -> PartialVMResult<()> {
let ty_tag = ty.to_type_tag();

let (cost, res) = self.delegate_charge(|base| base.charge_load_resource(addr, ty, loaded));
let (cost, res) =
self.delegate_charge(|base| base.charge_load_resource(addr, ty, val, bytes_loaded));

self.active_event_stream()
.push(ExecutionGasEvent::LoadResource {
Expand Down
14 changes: 10 additions & 4 deletions aptos-move/aptos-gas/src/gas_meter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ use move_vm_types::{
use std::collections::BTreeMap;

// Change log:
// - V9
// - Accurate tracking of the cost of loading resource groups
// - V8
// - Added BLS12-381 operations.
// - V7
Expand All @@ -59,7 +61,7 @@ use std::collections::BTreeMap;
// global operations.
// - V1
// - TBA
pub const LATEST_GAS_FEATURE_VERSION: u64 = 8;
pub const LATEST_GAS_FEATURE_VERSION: u64 = 9;

pub(crate) const EXECUTION_GAS_MULTIPLIER: u64 = 20;

Expand Down Expand Up @@ -489,11 +491,12 @@ impl MoveGasMeter for StandardGasMeter {
&mut self,
_addr: AccountAddress,
_ty: impl TypeView,
loaded: Option<(NumBytes, impl ValueView)>,
val: Option<impl ValueView>,
bytes_loaded: NumBytes,
) -> PartialVMResult<()> {
if self.feature_version != 0 {
// TODO(Gas): Rewrite this in a better way.
if let Some((_, val)) = &loaded {
if let Some(val) = &val {
self.use_heap_memory(
self.gas_params
.misc
Expand All @@ -502,10 +505,13 @@ impl MoveGasMeter for StandardGasMeter {
)?;
}
}
if self.feature_version <= 8 && val.is_none() && bytes_loaded != 0.into() {
return Err(PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR).with_message("in legacy versions, number of bytes loaded must be zero when the resource does not exist ".to_string()));
}
let cost = self
.storage_gas_params
.pricing
.calculate_read_gas(loaded.map(|(num_bytes, _)| num_bytes));
.calculate_read_gas(val.is_some(), bytes_loaded);
self.charge_io(cost)
}

Expand Down
20 changes: 11 additions & 9 deletions aptos-move/aptos-gas/src/transaction/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,8 @@ impl StoragePricingV2 {
}
}

fn calculate_read_gas(&self, loaded: Option<NumBytes>) -> InternalGas {
self.per_item_read * (NumArgs::from(1))
+ match loaded {
Some(num_bytes) => self.per_byte_read * num_bytes,
None => 0.into(),
}
fn calculate_read_gas(&self, loaded: NumBytes) -> InternalGas {
self.per_item_read * (NumArgs::from(1)) + self.per_byte_read * loaded
}

fn io_gas_per_write(&self, key: &StateKey, op: &WriteOp) -> InternalGas {
Expand All @@ -177,12 +173,18 @@ pub enum StoragePricing {
}

impl StoragePricing {
pub fn calculate_read_gas(&self, loaded: Option<NumBytes>) -> InternalGas {
pub fn calculate_read_gas(&self, resource_exists: bool, bytes_loaded: NumBytes) -> InternalGas {
use StoragePricing::*;

match self {
V1(v1) => v1.calculate_read_gas(loaded),
V2(v2) => v2.calculate_read_gas(loaded),
V1(v1) => v1.calculate_read_gas(
if resource_exists {
Some(bytes_loaded)
} else {
None
},
),
V2(v2) => v2.calculate_read_gas(bytes_loaded),
}
}

Expand Down
40 changes: 8 additions & 32 deletions aptos-move/aptos-release-builder/data/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
remote_endpoint: ~
name: "v1.5"
proposals:
- name: upgrade_framework
- name: step_1_upgrade_framework
metadata:
title: "Multi-step proposal to upgrade mainnet framework to v1.4.0"
description: "This includes changes outlined in https://github.com/aptos-labs/aptos-core/releases/aptos-node-v1.4.0. Struct constructor, generic cryptography algebra, ed25519 returns false if wrong length, quorum store, and transaction shuffling will be enabled in separate proposals."
title: "Multi-step proposal to upgrade mainnet framework to v1.5.0"
description: "This includes changes outlined in https://github.com/aptos-labs/aptos-core/releases/aptos-node-v1.5.0. bls12381, crytography algebra natives, and charging for invariant violations will be enabled in separate proposals."
discussion_url: "https://github.com/aptos-labs/aptos-core/issues/8574"
execution_mode: MultiStep
update_sequence:
- DefaultGas
- Framework:
bytecode_version: 6
git_hash: ~
- name: enable_bls12381
- name: step_2_enable_bls12381
metadata:
title: "Enable bls12381"
description: "AIP-20: Support of generic cryptography algebra operations in Aptos standard library."
Expand All @@ -23,36 +24,11 @@ proposals:
enabled:
- cryptography_algebra_natives
- bls12381_structures
- name: enable_quorum_store
metadata:
title: "Enable Quorum Store"
description: "AIP-26: Quorum Store is a production-optimized implementation of Narwhal [1], that improves consensus throughput."
discussion_url: "https://github.com/aptos-foundation/AIPs/issues/108"
execution_mode: MultiStep
update_sequence:
- Consensus:
V2:
decoupled_execution: true
back_pressure_limit: 10
exclude_round: 40
proposer_election_type:
leader_reputation:
proposer_and_voter_v2:
active_weight: 1000
inactive_weight: 10
failed_weight: 1
failure_threshold_percent: 10
proposer_window_num_validators_multiplier: 10
voter_window_num_validators_multiplier: 1
weight_by_voting_power: true
use_history_from_previous_epoch_max_count: 5
max_failed_authors_to_store: 10
- name: enable_charge_invariant_violation
- name: step_3_enable_charge_invariant_violation
metadata:
title: "Enable charge_invariant_violation"
description: "AIP-20: Support of generic cryptography algebra operations in Aptos standard library."
source_code_url: "https://github.com/aptos-labs/aptos-core/pull/8213"
discussion_url: "https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-35.md"
description: "AIP-35: Charge transactions that triggered invariant violation error instead of discarding them."
discussion_url: "https://github.com/aptos-foundation/AIPs/issues/144"
execution_mode: MultiStep
update_sequence:
- FeatureFlag:
Expand Down
Loading