Skip to content

Commit

Permalink
chore(sequencing): remove ProposalChunk
Browse files Browse the repository at this point in the history
  • Loading branch information
guy-starkware committed Dec 8, 2024
1 parent a40d336 commit bb57c46
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 7 deletions.
2 changes: 0 additions & 2 deletions crates/sequencing/papyrus_consensus/src/manager_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ use papyrus_protobuf::consensus::{
};
use papyrus_test_utils::{get_rng, GetTestInstance};
use starknet_api::block::{BlockHash, BlockNumber};
use starknet_api::transaction::Transaction;
use starknet_types_core::felt::Felt;

use super::{run_consensus, MultiHeightManager};
Expand All @@ -45,7 +44,6 @@ mock! {

#[async_trait]
impl ConsensusContext for TestContext {
type ProposalChunk = Transaction;
type ProposalPart = ProposalPart;

async fn build_proposal(
Expand Down
1 change: 0 additions & 1 deletion crates/sequencing/papyrus_consensus/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ mock! {

#[async_trait]
impl ConsensusContext for TestContext {
type ProposalChunk = u32;
type ProposalPart = MockProposalPart;

async fn build_proposal(
Expand Down
1 change: 0 additions & 1 deletion crates/sequencing/papyrus_consensus/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ pub trait ConsensusContext {
/// The chunks of content returned when iterating the proposal.
// In practice I expect this to match the type sent to the network
// (papyrus_protobuf::ConsensusMessage), and not to be specific to just the block's content.
type ProposalChunk; // TODO(guyn): deprecate this (and replace by ProposalPart)
type ProposalPart: TryFrom<Vec<u8>, Error = ProtobufConversionError>
+ Into<Vec<u8>>
+ TryInto<ProposalInit, Error = ProtobufConversionError>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ impl PapyrusConsensusContext {

#[async_trait]
impl ConsensusContext for PapyrusConsensusContext {
type ProposalChunk = Transaction;
type ProposalPart = ProposalPart;

async fn build_proposal(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ use starknet_api::block::{
NonzeroGasPrice,
};
use starknet_api::executable_transaction::Transaction as ExecutableTransaction;
use starknet_api::transaction::Transaction;
use starknet_batcher_types::batcher_types::{
DecisionReachedInput,
GetProposalContent,
Expand Down Expand Up @@ -132,7 +131,6 @@ impl SequencerConsensusContext {
#[async_trait]
impl ConsensusContext for SequencerConsensusContext {
// TODO(guyn): Switch to ProposalPart when done with the streaming integration.
type ProposalChunk = Vec<Transaction>;
type ProposalPart = ProposalPart;

async fn build_proposal(
Expand Down

0 comments on commit bb57c46

Please sign in to comment.