fix(applying): add missing Conway pparams variant (#507)
This commit is contained in:
parent
95510c253c
commit
7b5a25a8f6
2 changed files with 44 additions and 0 deletions
|
|
@ -54,5 +54,8 @@ pub fn validate(metx: &MultiEraTx, utxos: &UTxOs, env: &Environment) -> Validati
|
||||||
),
|
),
|
||||||
_ => Err(TxAndProtParamsDiffer),
|
_ => Err(TxAndProtParamsDiffer),
|
||||||
},
|
},
|
||||||
|
MultiEraProtocolParameters::Conway(_) => {
|
||||||
|
todo!("conway phase-1 validation not yet implemented");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ use pallas_primitives::{
|
||||||
babbage::CostMdls as BabbageCostMdls,
|
babbage::CostMdls as BabbageCostMdls,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[allow(clippy::large_enum_variant)]
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
pub enum MultiEraProtocolParameters {
|
pub enum MultiEraProtocolParameters {
|
||||||
|
|
@ -14,6 +15,7 @@ pub enum MultiEraProtocolParameters {
|
||||||
Shelley(ShelleyProtParams),
|
Shelley(ShelleyProtParams),
|
||||||
Alonzo(AlonzoProtParams),
|
Alonzo(AlonzoProtParams),
|
||||||
Babbage(BabbageProtParams),
|
Babbage(BabbageProtParams),
|
||||||
|
Conway(ConwayProtParams),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl MultiEraProtocolParameters {
|
impl MultiEraProtocolParameters {
|
||||||
|
|
@ -35,6 +37,10 @@ impl MultiEraProtocolParameters {
|
||||||
protocol_version: (x, ..),
|
protocol_version: (x, ..),
|
||||||
..
|
..
|
||||||
}) => *x as usize,
|
}) => *x as usize,
|
||||||
|
MultiEraProtocolParameters::Conway(ConwayProtParams {
|
||||||
|
protocol_version: (x, ..),
|
||||||
|
..
|
||||||
|
}) => *x as usize,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -136,6 +142,41 @@ pub struct BabbageProtParams {
|
||||||
pub extra_entropy: Nonce,
|
pub extra_entropy: Nonce,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone)]
|
||||||
|
pub struct ConwayProtParams {
|
||||||
|
pub minfee_a: u32,
|
||||||
|
pub minfee_b: u32,
|
||||||
|
pub max_block_body_size: u32,
|
||||||
|
pub max_transaction_size: u32,
|
||||||
|
pub max_block_header_size: u32,
|
||||||
|
pub key_deposit: Coin,
|
||||||
|
pub pool_deposit: Coin,
|
||||||
|
pub desired_number_of_stake_pools: u32,
|
||||||
|
pub protocol_version: ProtocolVersion,
|
||||||
|
pub min_pool_cost: Coin,
|
||||||
|
pub ada_per_utxo_byte: Coin,
|
||||||
|
pub cost_models_for_script_languages: BabbageCostMdls,
|
||||||
|
pub execution_costs: ExUnitPrices,
|
||||||
|
pub max_tx_ex_units: ExUnits,
|
||||||
|
pub max_block_ex_units: ExUnits,
|
||||||
|
pub max_value_size: u32,
|
||||||
|
pub collateral_percentage: u32,
|
||||||
|
pub max_collateral_inputs: u32,
|
||||||
|
pub expansion_rate: UnitInterval,
|
||||||
|
pub treasury_growth_rate: UnitInterval,
|
||||||
|
pub maximum_epoch: u32,
|
||||||
|
pub pool_pledge_influence: RationalNumber,
|
||||||
|
pub pool_voting_thresholds: pallas_primitives::conway::PoolVotingThresholds,
|
||||||
|
pub drep_voting_thresholds: pallas_primitives::conway::DRepVotingThresholds,
|
||||||
|
pub min_committee_size: u64,
|
||||||
|
pub committee_term_limit: u32,
|
||||||
|
pub governance_action_validity_period: u32,
|
||||||
|
pub governance_action_deposit: Coin,
|
||||||
|
pub drep_deposit: Coin,
|
||||||
|
pub drep_inactivity_period: u32,
|
||||||
|
pub minfee_refscript_cost_per_byte: UnitInterval,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Environment {
|
pub struct Environment {
|
||||||
pub prot_params: MultiEraProtocolParameters,
|
pub prot_params: MultiEraProtocolParameters,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue