Byzantium updates (#5855)
* EIP-211 updates * benchmarks * blockhash instruction gas cost updated * More benches * EIP-684 * EIP-649 * EIP-658 * Updated some tests * Modexp fixes * STATICCALL fixes * Pairing fixes * More STATICALL fixes * Use paritytech/bn * Fixed REVERTing of contract creation * Fixed more tests * Fixed more tests * Blockchain tests * Enable previously broken tests * Transition test * Updated tests * Fixed modexp reading huge numbers * Enabled max_code_size test * Review fixes * Updated pairing pricing * missing commas (style) * Update test.rs * Small improvements * eip161abc
This commit is contained in:
committed by
Gav Wood
parent
b602fb4a5e
commit
25b35ebddd
@@ -34,6 +34,15 @@ pub struct Modexp {
|
||||
pub divisor: usize,
|
||||
}
|
||||
|
||||
/// Pricing for alt_bn128_pairing.
|
||||
#[derive(Debug, PartialEq, Deserialize, Clone)]
|
||||
pub struct AltBn128Pairing {
|
||||
/// Base price.
|
||||
pub base: usize,
|
||||
/// Price per point pair.
|
||||
pub pair: usize,
|
||||
}
|
||||
|
||||
/// Pricing variants.
|
||||
#[derive(Debug, PartialEq, Deserialize, Clone)]
|
||||
pub enum Pricing {
|
||||
@@ -43,6 +52,9 @@ pub enum Pricing {
|
||||
/// Pricing for modular exponentiation.
|
||||
#[serde(rename="modexp")]
|
||||
Modexp(Modexp),
|
||||
/// Pricing for alt_bn128_pairing exponentiation.
|
||||
#[serde(rename="alt_bn128_pairing")]
|
||||
AltBn128Pairing(AltBn128Pairing),
|
||||
}
|
||||
|
||||
/// Spec builtin.
|
||||
|
||||
@@ -111,6 +111,18 @@ pub struct EthashParams {
|
||||
/// See main EthashParams docs.
|
||||
#[serde(rename="minGasPrice")]
|
||||
pub min_gas_price: Option<Uint>,
|
||||
|
||||
/// EIP-649 transition block.
|
||||
#[serde(rename="eip649Transition")]
|
||||
pub eip649_transition: Option<Uint>,
|
||||
|
||||
/// EIP-649 bomb delay.
|
||||
#[serde(rename="eip649Delay")]
|
||||
pub eip649_delay: Option<Uint>,
|
||||
|
||||
/// EIP-649 base reward.
|
||||
#[serde(rename="eip649Reward")]
|
||||
pub eip649_reward: Option<Uint>,
|
||||
}
|
||||
|
||||
/// Ethash engine deserialization.
|
||||
@@ -221,6 +233,9 @@ mod tests {
|
||||
max_gas_limit: None,
|
||||
min_gas_price_transition: None,
|
||||
min_gas_price: None,
|
||||
eip649_transition: None,
|
||||
eip649_delay: None,
|
||||
eip649_reward: None,
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -262,6 +277,9 @@ mod tests {
|
||||
max_gas_limit: None,
|
||||
min_gas_price_transition: None,
|
||||
min_gas_price: None,
|
||||
eip649_transition: None,
|
||||
eip649_delay: None,
|
||||
eip649_reward: None,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -85,6 +85,9 @@ pub struct Params {
|
||||
#[serde(rename="eip214Transition")]
|
||||
pub eip214_transition: Option<Uint>,
|
||||
/// See `CommonParams` docs.
|
||||
#[serde(rename="eip658Transition")]
|
||||
pub eip658_transition: Option<Uint>,
|
||||
/// See `CommonParams` docs.
|
||||
#[serde(rename="dustProtectionTransition")]
|
||||
pub dust_protection_transition: Option<Uint>,
|
||||
/// See `CommonParams` docs.
|
||||
|
||||
Reference in New Issue
Block a user