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

[experiment-only] comparison testing #15317

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

rahxephon89
Copy link
Contributor

Description

How Has This Been Tested?

Key Areas to Review

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Performance improvement
  • Refactoring
  • Dependency update
  • Documentation update
  • Tests

Which Components or Systems Does This Change Impact?

  • Validator Node
  • Full Node (API, Indexer, etc.)
  • Move/Aptos Virtual Machine
  • Aptos Framework
  • Aptos CLI/SDK
  • Developer Infrastructure
  • Move Compiler
  • Other (specify)

Checklist

  • I have read and followed the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I identified and added all stakeholders and component owners affected by this change as reviewers
  • I tested both happy and unhappy path of the functionality
  • I have made corresponding changes to the documentation

Copy link

trunk-io bot commented Nov 19, 2024

⏱️ 23m total CI duration on this PR
Job Cumulative Duration Recent Runs
rust-move-tests 13m 🟩
rust-targeted-unit-tests 7m 🟥
rust-cargo-deny 2m 🟩
check-dynamic-deps 38s 🟩
semgrep/ci 26s 🟩
general-lints 25s 🟩
file_change_determinator 10s 🟩
permission-check 5s 🟩🟩
permission-check 3s 🟩

settingsfeedbackdocs ⋅ learn more about trunk.io

// });

for (v, txn_index, state) in data_state_c.iter() {
let res = Self::execute_one_txn_with_result_alternative(*v, state, txn_index, &cache_copy_v1);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

txn is executed here.

if v2_flag {
features.enable(FeatureFlag::VM_BINARY_FORMAT_V7);
features.enable(FeatureFlag::VM_BINARY_FORMAT_V7);
// features.enable(FeatureFlag::ENABLE_LOADER_V2);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

new loader is enabled here

// }
if let Some(debugger) = debugger_opt {
let data_view = DataStateView::new(debugger, version, state);
block_executor.execute_block(&DefaultTxnProvider::new(verified_txns), &data_view, onchain_config, transaction_slice_metadata)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

block executor is called.

let txns = vec![txn.clone()];
let verified_txns = into_signature_verified_block(txns);
let onchain_config: BlockExecutorConfigFromOnchain = BlockExecutorConfigFromOnchain::on_but_large_for_test();
let transaction_slice_metadata = TransactionSliceMetadata::Chunk { begin: version, end: version };
Copy link
Contributor

Choose a reason for hiding this comment

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

You need end to be version + 1? Sorry if it's not clear from the type, I have a PR out which adds more documentation and assert for that

// the initializations, but ignore its internal state, i.e., FakeDataStore.
let executor = FakeExecutor::no_genesis();
let block_executor = AptosVMBlockExecutor::new();
let txns = vec![txn.clone()];
Copy link
Contributor

Choose a reason for hiding this comment

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

Why 1 txn? Can we compare-test a chunk, and if it fails (most likely not?) we can decide what to do? For example, re-execute from failed version plus one, or one by one? Like replay verify does

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently the data state we store is for each txn because they are not consecutive and the write set is not applied after each execution.

@rahxephon89 rahxephon89 force-pushed the teng/fix-gas-rebase-loader branch 3 times, most recently from 5d875b5 to 408fb29 Compare December 4, 2024 19:11
Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@rahxephon89 rahxephon89 force-pushed the teng/fix-gas-rebase-loader branch from 408fb29 to 67f6be6 Compare December 6, 2024 03:50
@rahxephon89 rahxephon89 force-pushed the teng/fix-gas-rebase-loader branch from 40d1cd9 to b5e7b38 Compare December 6, 2024 18:15
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