Skip to content

Commit

Permalink
Do not persist StateComputeResult
Browse files Browse the repository at this point in the history
  • Loading branch information
msmouse committed Oct 11, 2024
1 parent 813e7d0 commit 09929a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 1 addition & 5 deletions consensus/consensus-types/src/pipelined_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,12 @@ impl Serialize for PipelinedBlock {
struct SerializedBlock<'a> {
block: &'a Block,
input_transactions: &'a Vec<SignedTransaction>,
state_compute_result: &'a StateComputeResult,
randomness: Option<&'a Randomness>,
}

let serialized = SerializedBlock {
block: &self.block,
input_transactions: &self.input_transactions,
state_compute_result: &self.state_compute_result,
randomness: self.randomness.get(),
};
serialized.serialize(serializer)
Expand All @@ -86,21 +84,19 @@ impl<'de> Deserialize<'de> for PipelinedBlock {
struct SerializedBlock {
block: Block,
input_transactions: Vec<SignedTransaction>,
state_compute_result: StateComputeResult,
randomness: Option<Randomness>,
}

let SerializedBlock {
block,
input_transactions,
state_compute_result,
randomness,
} = SerializedBlock::deserialize(deserializer)?;

let block = PipelinedBlock {
block,
input_transactions,
state_compute_result,
state_compute_result: StateComputeResult::new_dummy(),
randomness: OnceCell::new(),
pipeline_insertion_time: OnceCell::new(),
execution_summary: Arc::new(OnceCell::new()),
Expand Down
3 changes: 1 addition & 2 deletions execution/executor-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ use aptos_types::{
pub use error::{ExecutorError, ExecutorResult};
pub use ledger_update_output::LedgerUpdateOutput;
pub use parsed_transaction_output::ParsedTransactionOutput;
use serde::{Deserialize, Serialize};
use std::{
cmp::max,
collections::{BTreeSet, HashMap},
Expand Down Expand Up @@ -287,7 +286,7 @@ pub struct ChunkCommitNotification {
/// of success / failure of the transactions.
/// Note that the specific details of compute_status are opaque to StateMachineReplication,
/// which is going to simply pass the results between StateComputer and PayloadClient.
#[derive(Debug, Default, PartialEq, Eq, Clone, Serialize, Deserialize)]
#[derive(Debug, Default, PartialEq, Eq, Clone)]
pub struct StateComputeResult {
/// transaction accumulator root hash is identified as `state_id` in Consensus.
root_hash: HashValue,
Expand Down

0 comments on commit 09929a1

Please sign in to comment.