EIP 1108: Reduce alt_bn128 precompile gas costs (#11008)

* feat: implement eip1108

* doc nit: price per point pair

Co-Authored-By: David <dvdplm@gmail.com>

* fix: test-build

* fix: update chain specs

* fix: basic_authority.json chain spec

* fix: change `eip_transition == 0x7fffffffffffff`

* add issue link to `TODO`
This commit is contained in:
Niklas Adolfsson 2019-09-02 11:38:27 +02:00 committed by Wei Tang
parent 05f9606bf2
commit a9cb572238
38 changed files with 1107 additions and 224 deletions

View File

@ -18,4 +18,3 @@ parity-crypto = "0.4.0"
[dev-dependencies] [dev-dependencies]
rustc-hex = "1.0" rustc-hex = "1.0"

View File

@ -38,9 +38,10 @@ trait Implementation: Send + Sync {
} }
/// A gas pricing scheme for built-in contracts. /// A gas pricing scheme for built-in contracts.
// TODO: refactor this trait, see https://github.com/paritytech/parity-ethereum/issues/11014
trait Pricer: Send + Sync { trait Pricer: Send + Sync {
/// The gas cost of running this built-in for the given input data. /// The gas cost of running this built-in for the given input data at block number `at`
fn cost(&self, input: &[u8]) -> U256; fn cost(&self, input: &[u8], at: u64) -> U256;
} }
/// A linear pricing model. This computes a price using a base cost and a cost per-word. /// A linear pricing model. This computes a price using a base cost and a cost per-word.
@ -55,26 +56,56 @@ struct ModexpPricer {
} }
impl Pricer for Linear { impl Pricer for Linear {
fn cost(&self, input: &[u8]) -> U256 { fn cost(&self, input: &[u8], _at: u64) -> U256 {
U256::from(self.base) + U256::from(self.word) * U256::from((input.len() + 31) / 32) U256::from(self.base) + U256::from(self.word) * U256::from((input.len() + 31) / 32)
} }
} }
/// A alt_bn128_parinig pricing model. This computes a price using a base cost and a cost per pair. /// alt_bn128 constant operations (add and mul) pricing model.
struct AltBn128PairingPricer { struct AltBn128ConstOperations {
price: usize,
eip1108_transition_at: u64,
eip1108_transition_price: usize,
}
impl Pricer for AltBn128ConstOperations {
fn cost(&self, _input: &[u8], at: u64) -> U256 {
if at >= self.eip1108_transition_at {
self.eip1108_transition_price.into()
} else {
self.price.into()
}
}
}
/// alt_bn128 pairing price
#[derive(Debug, Copy, Clone)]
struct AltBn128PairingPrice {
base: usize, base: usize,
pair: usize, pair: usize,
} }
/// alt_bn128_pairing pricing model. This computes a price using a base cost and a cost per pair.
struct AltBn128PairingPricer {
price: AltBn128PairingPrice,
eip1108_transition_at: u64,
eip1108_transition_price: AltBn128PairingPrice,
}
impl Pricer for AltBn128PairingPricer { impl Pricer for AltBn128PairingPricer {
fn cost(&self, input: &[u8]) -> U256 { fn cost(&self, input: &[u8], at: u64) -> U256 {
let cost = U256::from(self.base) + U256::from(self.pair) * U256::from(input.len() / 192); let price = if at >= self.eip1108_transition_at {
cost self.eip1108_transition_price
} else {
self.price
};
U256::from(price.base) + U256::from(price.pair) * U256::from(input.len() / 192)
} }
} }
impl Pricer for ModexpPricer { impl Pricer for ModexpPricer {
fn cost(&self, input: &[u8]) -> U256 { fn cost(&self, input: &[u8], _at: u64) -> U256 {
let mut reader = input.chain(io::repeat(0)); let mut reader = input.chain(io::repeat(0));
let mut buf = [0; 32]; let mut buf = [0; 32];
@ -150,8 +181,8 @@ pub struct Builtin {
impl Builtin { impl Builtin {
/// Simple forwarder for cost. /// Simple forwarder for cost.
pub fn cost(&self, input: &[u8]) -> U256 { pub fn cost(&self, input: &[u8], at: u64) -> U256 {
self.pricer.cost(input) self.pricer.cost(input, at)
} }
/// Simple forwarder for execute. /// Simple forwarder for execute.
@ -186,16 +217,30 @@ impl From<ethjson::spec::Builtin> for Builtin {
} }
ethjson::spec::Pricing::AltBn128Pairing(pricer) => { ethjson::spec::Pricing::AltBn128Pairing(pricer) => {
Box::new(AltBn128PairingPricer { Box::new(AltBn128PairingPricer {
base: pricer.base, price: AltBn128PairingPrice {
pair: pricer.pair, base: pricer.base,
pair: pricer.pair,
},
eip1108_transition_at: b.eip1108_transition.map_or(u64::max_value(), Into::into),
eip1108_transition_price: AltBn128PairingPrice {
base: pricer.eip1108_transition_base,
pair: pricer.eip1108_transition_pair,
},
})
}
ethjson::spec::Pricing::AltBn128ConstOperations(pricer) => {
Box::new(AltBn128ConstOperations {
price: pricer.price,
eip1108_transition_price: pricer.eip1108_transition_price,
eip1108_transition_at: b.eip1108_transition.map_or(u64::max_value(), Into::into)
}) })
} }
}; };
Builtin { Builtin {
pricer: pricer, pricer,
native: ethereum_builtin(&b.name), native: ethereum_builtin(&b.name),
activate_at: b.activate_at.map(Into::into).unwrap_or(0), activate_at: b.activate_at.map_or(0, Into::into),
} }
} }
} }
@ -477,7 +522,7 @@ impl Implementation for Bn128Pairing {
/// - any of even points does not belong to the twisted bn128 curve over the field F_p^2 = F_p[i] / (i^2 + 1) /// - any of even points does not belong to the twisted bn128 curve over the field F_p^2 = F_p[i] / (i^2 + 1)
fn execute(&self, input: &[u8], output: &mut BytesRef) -> Result<(), &'static str> { fn execute(&self, input: &[u8], output: &mut BytesRef) -> Result<(), &'static str> {
if input.len() % 192 != 0 { if input.len() % 192 != 0 {
return Err("Invalid input length, must be multiple of 192 (3 * (32*2))".into()) return Err("Invalid input length, must be multiple of 192 (3 * (32*2))")
} }
if let Err(err) = self.execute_with_error(input, output) { if let Err(err) = self.execute_with_error(input, output) {
@ -551,7 +596,7 @@ impl Bn128Pairing {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use ethereum_types::U256; use ethereum_types::U256;
use ethjson; use ethjson::uint::Uint;
use num::{BigUint, Zero, One}; use num::{BigUint, Zero, One};
use parity_bytes::BytesRef; use parity_bytes::BytesRef;
use rustc_hex::FromHex; use rustc_hex::FromHex;
@ -715,7 +760,7 @@ mod tests {
{ {
let input = FromHex::from_hex("0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000003b27bafd00000000000000000000000000000000000000000000000000000000503c8ac3").unwrap(); let input = FromHex::from_hex("0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000003b27bafd00000000000000000000000000000000000000000000000000000000503c8ac3").unwrap();
let expected_cost = U256::max_value(); let expected_cost = U256::max_value();
assert_eq!(f.cost(&input[..]), expected_cost.into()); assert_eq!(f.cost(&input[..], 0), expected_cost.into());
} }
// test for potential exp len overflow // test for potential exp len overflow
@ -732,7 +777,7 @@ mod tests {
f.execute(&input[..], &mut BytesRef::Fixed(&mut output[..])).expect("Builtin should fail"); f.execute(&input[..], &mut BytesRef::Fixed(&mut output[..])).expect("Builtin should fail");
assert_eq!(output, expected); assert_eq!(output, expected);
assert_eq!(f.cost(&input[..]), expected_cost.into()); assert_eq!(f.cost(&input[..], 0), expected_cost.into());
} }
// fermat's little theorem example. // fermat's little theorem example.
@ -752,7 +797,7 @@ mod tests {
f.execute(&input[..], &mut BytesRef::Fixed(&mut output[..])).expect("Builtin should not fail"); f.execute(&input[..], &mut BytesRef::Fixed(&mut output[..])).expect("Builtin should not fail");
assert_eq!(output, expected); assert_eq!(output, expected);
assert_eq!(f.cost(&input[..]), expected_cost.into()); assert_eq!(f.cost(&input[..], 0), expected_cost.into());
} }
// second example from EIP: zero base. // second example from EIP: zero base.
@ -771,7 +816,7 @@ mod tests {
f.execute(&input[..], &mut BytesRef::Fixed(&mut output[..])).expect("Builtin should not fail"); f.execute(&input[..], &mut BytesRef::Fixed(&mut output[..])).expect("Builtin should not fail");
assert_eq!(output, expected); assert_eq!(output, expected);
assert_eq!(f.cost(&input[..]), expected_cost.into()); assert_eq!(f.cost(&input[..], 0), expected_cost.into());
} }
// another example from EIP: zero-padding // another example from EIP: zero-padding
@ -791,7 +836,7 @@ mod tests {
f.execute(&input[..], &mut BytesRef::Fixed(&mut output[..])).expect("Builtin should not fail"); f.execute(&input[..], &mut BytesRef::Fixed(&mut output[..])).expect("Builtin should not fail");
assert_eq!(output, expected); assert_eq!(output, expected);
assert_eq!(f.cost(&input[..]), expected_cost.into()); assert_eq!(f.cost(&input[..], 0), expected_cost.into());
} }
// zero-length modulus. // zero-length modulus.
@ -809,7 +854,7 @@ mod tests {
f.execute(&input[..], &mut BytesRef::Flexible(&mut output)).expect("Builtin should not fail"); f.execute(&input[..], &mut BytesRef::Flexible(&mut output)).expect("Builtin should not fail");
assert_eq!(output.len(), 0); // shouldn't have written any output. assert_eq!(output.len(), 0); // shouldn't have written any output.
assert_eq!(f.cost(&input[..]), expected_cost.into()); assert_eq!(f.cost(&input[..], 0), expected_cost.into());
} }
} }
@ -1019,10 +1064,10 @@ mod tests {
activate_at: 1, activate_at: 1,
}; };
assert_eq!(b.cost(&[0; 0]), U256::from(10)); assert_eq!(b.cost(&[0; 0], 0), U256::from(10));
assert_eq!(b.cost(&[0; 1]), U256::from(30)); assert_eq!(b.cost(&[0; 1], 0), U256::from(30));
assert_eq!(b.cost(&[0; 32]), U256::from(30)); assert_eq!(b.cost(&[0; 32], 0), U256::from(30));
assert_eq!(b.cost(&[0; 33]), U256::from(50)); assert_eq!(b.cost(&[0; 33], 0), U256::from(50));
let i = [0u8, 1, 2, 3]; let i = [0u8, 1, 2, 3];
let mut o = [255u8; 4]; let mut o = [255u8; 4];
@ -1039,16 +1084,67 @@ mod tests {
word: 20, word: 20,
}), }),
activate_at: None, activate_at: None,
eip1108_transition: None,
}); });
assert_eq!(b.cost(&[0; 0]), U256::from(10)); assert_eq!(b.cost(&[0; 0], 0), U256::from(10));
assert_eq!(b.cost(&[0; 1]), U256::from(30)); assert_eq!(b.cost(&[0; 1], 0), U256::from(30));
assert_eq!(b.cost(&[0; 32]), U256::from(30)); assert_eq!(b.cost(&[0; 32], 0), U256::from(30));
assert_eq!(b.cost(&[0; 33]), U256::from(50)); assert_eq!(b.cost(&[0; 33], 0), U256::from(50));
let i = [0u8, 1, 2, 3]; let i = [0u8, 1, 2, 3];
let mut o = [255u8; 4]; let mut o = [255u8; 4];
b.execute(&i[..], &mut BytesRef::Fixed(&mut o[..])).expect("Builtin should not fail"); b.execute(&i[..], &mut BytesRef::Fixed(&mut o[..])).expect("Builtin should not fail");
assert_eq!(i, o); assert_eq!(i, o);
} }
#[test]
fn bn128_pairing_eip1108_transition() {
let b = Builtin::from(ethjson::spec::Builtin {
name: "alt_bn128_pairing".to_owned(),
pricing: ethjson::spec::Pricing::AltBn128Pairing(ethjson::spec::builtin::AltBn128Pairing {
base: 100_000,
pair: 80_000,
eip1108_transition_base: 45_000,
eip1108_transition_pair: 34_000,
}),
activate_at: Some(Uint(U256::from(10))),
eip1108_transition: Some(Uint(U256::from(20))),
});
assert_eq!(b.cost(&[0; 192 * 3], 10), U256::from(340_000), "80 000 * 3 + 100 000 == 340 000");
assert_eq!(b.cost(&[0; 192 * 7], 20), U256::from(283_000), "34 000 * 7 + 45 000 == 283 000");
}
#[test]
fn bn128_add_eip1108_transition() {
let b = Builtin::from(ethjson::spec::Builtin {
name: "alt_bn128_add".to_owned(),
pricing: ethjson::spec::Pricing::AltBn128ConstOperations(ethjson::spec::builtin::AltBn128ConstOperations {
price: 500,
eip1108_transition_price: 150,
}),
activate_at: Some(Uint(U256::from(10))),
eip1108_transition: Some(Uint(U256::from(20))),
});
assert_eq!(b.cost(&[0; 192], 10), U256::from(500));
assert_eq!(b.cost(&[0; 10], 20), U256::from(150), "after istanbul hardfork gas cost for add should be 150");
}
#[test]
fn bn128_mul_eip1108_transition() {
let b = Builtin::from(ethjson::spec::Builtin {
name: "alt_bn128_mul".to_owned(),
pricing: ethjson::spec::Pricing::AltBn128ConstOperations(ethjson::spec::builtin::AltBn128ConstOperations {
price: 40_000,
eip1108_transition_price: 6000,
}),
activate_at: Some(Uint(U256::from(10))),
eip1108_transition: Some(Uint(U256::from(20))),
});
assert_eq!(b.cost(&[0; 192], 10), U256::from(40_000));
assert_eq!(b.cost(&[0; 10], 20), U256::from(6_000), "after istanbul hardfork gas cost for mul should be 6 000");
}
} }

View File

@ -38,9 +38,50 @@
"0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "balance": "1", "builtin": { "name": "alt_bn128_add", "activate_at": 0, "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "balance": "1", "builtin": { "name": "alt_bn128_mul", "activate_at": 0, "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "balance": "1",
"0000000000000000000000000000000000000008": { "balance": "1", "builtin": { "name": "alt_bn128_pairing", "activate_at": 0, "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "builtin": {
"name": "alt_bn128_add",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"balance": "1",
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"balance": "1",
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "1048576" } "9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "1048576" }
} }
} }

View File

@ -33,6 +33,7 @@ trie-vm-factories = { path = "../trie-vm-factories" }
vm = { path = "../vm" } vm = { path = "../vm" }
[dev-dependencies] [dev-dependencies]
common-types = { path = "../types", features = ["test-helpers"] }
ethcore = { path = "../", features = ["test-helpers"] } ethcore = { path = "../", features = ["test-helpers"] }
ethcore-io = { path = "../../util/io" } ethcore-io = { path = "../../util/io" }
ethjson = { path = "../../json" } ethjson = { path = "../../json" }

View File

@ -412,7 +412,8 @@ impl<'a> CallCreateExecutive<'a> {
let default = []; let default = [];
let data = if let Some(ref d) = params.data { d as &[u8] } else { &default as &[u8] }; let data = if let Some(ref d) = params.data { d as &[u8] } else { &default as &[u8] };
let cost = builtin.cost(data); // NOTE(niklasad1): block number is used by `builtin alt_bn128 ops` to enable eip1108
let cost = builtin.cost(data, self.info.number);
if cost <= params.gas { if cost <= params.gas {
let mut builtin_out_buffer = Vec::new(); let mut builtin_out_buffer = Vec::new();
let result = { let result = {

View File

@ -46,9 +46,50 @@
"0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "balance": "1", "builtin": { "name": "alt_bn128_add", "activate_at": 0, "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "balance": "1", "builtin": { "name": "alt_bn128_mul", "activate_at": 0, "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "balance": "1",
"0000000000000000000000000000000000000008": { "balance": "1", "builtin": { "name": "alt_bn128_pairing", "activate_at": 0, "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "builtin": {
"name": "alt_bn128_add",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"balance": "1",
"builtin": {
"name": "alt_bn128_mul",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"balance": "1",
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "1048576" } "9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "1048576" }
} }
} }

View File

@ -49,9 +49,50 @@
"0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "balance": "1", "builtin": { "name": "alt_bn128_add", "activate_at": 0, "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "balance": "1", "builtin": { "name": "alt_bn128_mul", "activate_at": 0, "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "balance": "1",
"0000000000000000000000000000000000000008": { "balance": "1", "builtin": { "name": "alt_bn128_pairing", "activate_at": 0, "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "builtin": {
"name": "alt_bn128_add",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"balance": "1",
"builtin": {
"name": "alt_bn128_mul",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"balance": "1",
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "1048576" }, "9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "1048576" },
"0000000000000000000000000000000000000042": { "0000000000000000000000000000000000000042": {
"balance": "1", "balance": "1",

View File

@ -34,9 +34,50 @@
"0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "balance": "1", "builtin": { "name": "alt_bn128_add", "activate_at": 0, "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "balance": "1", "builtin": { "name": "alt_bn128_mul", "activate_at": 0, "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "balance": "1",
"0000000000000000000000000000000000000008": { "balance": "1", "builtin": { "name": "alt_bn128_pairing", "activate_at": 0, "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "builtin": {
"name": "alt_bn128_add",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"balance": "1",
"builtin": {
"name": "alt_bn128_mul",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"balance": "1",
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"0000000000000000000000000000000000001337": { "balance": "1", "constructor": "60606040526000805460ff19166001179055346000575b6075806100246000396000f300606060405263ffffffff60e060020a60003504166394b91deb81146022575b6000565b34600057602c6040565b604080519115158252519081900360200190f35b60005460ff16815600a165627a7a723058207882eb60ebce23178b3fa06d4cd8e5adc17711937ccddacb18a04abca2a2c9ee0029" } "0000000000000000000000000000000000001337": { "balance": "1", "constructor": "60606040526000805460ff19166001179055346000575b6075806100246000396000f300606060405263ffffffff60e060020a60003504166394b91deb81146022575b6000565b34600057602c6040565b604080519115158252519081900360200190f35b60005460ff16815600a165627a7a723058207882eb60ebce23178b3fa06d4cd8e5adc17711937ccddacb18a04abca2a2c9ee0029" }
} }
} }

View File

@ -54,8 +54,46 @@
"0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": "0x00", "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": "0x00", "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "builtin": {
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": "0x00", "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } } "name": "alt_bn128_add",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
}
} }
} }

View File

@ -72,9 +72,50 @@
"0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 20, "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 20, "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "balance": "1", "builtin": { "name": "alt_bn128_add", "activate_at": 20, "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "balance": "1", "builtin": { "name": "alt_bn128_mul", "activate_at": 20, "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "balance": "1",
"0000000000000000000000000000000000000008": { "balance": "1", "builtin": { "name": "alt_bn128_pairing", "activate_at": 20, "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "builtin": {
"name": "alt_bn128_add",
"activate_at": 20,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"balance": "1",
"builtin": {
"name": "alt_bn128_mul",
"activate_at": 20,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"balance": "1",
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": 20,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"183394f52b2c8c034835edba3bcececa6f60b5a8": { "183394f52b2c8c034835edba3bcececa6f60b5a8": {
"balance": "100491852286952719463755404" "balance": "100491852286952719463755404"
} }

View File

@ -3917,10 +3917,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_add", "name": "alt_bn128_add",
"activate_at": "0x85d9a0", "activate_at": "0x85d9a0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 500, "price": 500,
"word": 0 "eip1108_transition_price": 150
} }
} }
} }
@ -3929,10 +3930,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at": "0x85d9a0", "activate_at": "0x85d9a0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 40000, "price": 40000,
"word": 0 "eip1108_transition_price": 6000
} }
} }
} }
@ -3941,10 +3943,13 @@
"builtin": { "builtin": {
"name": "alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at": "0x85d9a0", "activate_at": "0x85d9a0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"alt_bn128_pairing": { "alt_bn128_pairing": {
"base": 100000, "base": 100000,
"pair": 80000 "pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }

View File

@ -58,8 +58,46 @@
"0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": "0x00", "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": "0x00", "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "builtin": {
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": "0x00", "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } } "name": "alt_bn128_add",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
}
} }
} }

View File

@ -46,8 +46,46 @@
"0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 100 } } } }, "0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 100 } } } },
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": "0x00", "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": "0x00", "pricing": { "linear": { "base": 2000, "word": 0 } } } }, "builtin": {
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": "0x00", "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } } "name": "alt_bn128_add",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
}
} }
} }

View File

@ -66,8 +66,46 @@
"0000000000000000000000000000000000000003": { "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": 2000000, "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": 2000000, "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": 2000000, "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": 2000000, "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "builtin": {
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": 2000000, "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } } "name": "alt_bn128_add",
"activate_at": 2000000,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": 2000000,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": 2000000,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
}
} }
} }

View File

@ -109,11 +109,12 @@
"builtin": { "builtin": {
"name": "alt_bn128_add", "name": "alt_bn128_add",
"activate_at": "0", "activate_at": "0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 500, "price": 500,
"word": 0 "eip1108_transition_price": 150
} }
} }
} }
}, },
@ -122,10 +123,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at": "0", "activate_at": "0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 40000, "price": 40000,
"word": 0 "eip1108_transition_price": 6000
} }
} }
} }
@ -135,12 +137,15 @@
"builtin": { "builtin": {
"name": "alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at": "0", "activate_at": "0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"alt_bn128_pairing": { "alt_bn128_pairing": {
"base": 100000, "base": 100000,
"pair": 80000 "pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }
}, },
"0x1204700000000000000000000000000000000005": { "0x1204700000000000000000000000000000000005": {

View File

@ -76,9 +76,47 @@
"0000000000000000000000000000000000000003": { "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0xC3500", "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0xC3500", "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": "0xC3500", "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": "0xC3500", "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "builtin": {
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": "0xC3500", "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "name": "alt_bn128_add",
"activate_at": "0xC3500",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0xC3500",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0xC3500",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"bb94f0ceb32257275b2a7a9c094c13e469b4563e": { "bb94f0ceb32257275b2a7a9c094c13e469b4563e": {
"balance": "10000000000000000000000000" "balance": "10000000000000000000000000"
}, },

View File

@ -3921,10 +3921,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_add", "name": "alt_bn128_add",
"activate_at": "0x42ae50", "activate_at": "0x42ae50",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 500, "price": 500,
"word": 0 "eip1108_transition_price": 150
} }
} }
} }
@ -3933,10 +3934,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at": "0x42ae50", "activate_at": "0x42ae50",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 40000, "price": 40000,
"word": 0 "eip1108_transition_price": 6000
} }
} }
} }
@ -3945,10 +3947,13 @@
"builtin": { "builtin": {
"name": "alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at": "0x42ae50", "activate_at": "0x42ae50",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"alt_bn128_pairing": { "alt_bn128_pairing": {
"base": 100000, "base": 100000,
"pair": 80000 "pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }

View File

@ -125,11 +125,12 @@
"balance": "0x1", "balance": "0x1",
"builtin": { "builtin": {
"name": "alt_bn128_add", "name": "alt_bn128_add",
"activate_at": "0x0", "activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 500, "price": 500,
"word": 0 "eip1108_transition_price": 150
} }
} }
} }
@ -138,11 +139,12 @@
"balance": "0x1", "balance": "0x1",
"builtin": { "builtin": {
"name": "alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at": "0x0", "activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 40000, "price": 40000,
"word": 0 "eip1108_transition_price": 6000
} }
} }
} }
@ -151,11 +153,14 @@
"balance": "0x1", "balance": "0x1",
"builtin": { "builtin": {
"name": "alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at": "0x0", "activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"alt_bn128_pairing": { "alt_bn128_pairing": {
"base": 100000, "base": 100000,
"pair": 80000 "pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }

View File

@ -117,10 +117,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_add", "name": "alt_bn128_add",
"activate_at": "0xaef49", "activate_at": "0xaef49",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 500, "price": 500,
"word": 0 "eip1108_transition_price": 150
} }
} }
} }
@ -130,10 +131,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at": "0xaef49", "activate_at": "0xaef49",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 40000, "price": 40000,
"word": 0 "eip1108_transition_price": 6000
} }
} }
} }
@ -143,10 +145,13 @@
"builtin": { "builtin": {
"name": "alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at": "0xaef49", "activate_at": "0xaef49",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"alt_bn128_pairing": { "alt_bn128_pairing": {
"base": 100000, "base": 100000,
"pair": 80000 "pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }

View File

@ -5344,10 +5344,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_add", "name": "alt_bn128_add",
"activate_at": "0x4d50f8", "activate_at": "0x4d50f8",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 500, "price": 500,
"word": 0 "eip1108_transition_price": 150
} }
} }
} }
@ -5356,10 +5357,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at": "0x4d50f8", "activate_at": "0x4d50f8",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 40000, "price": 40000,
"word": 0 "eip1108_transition_price": 6000
} }
} }
} }
@ -5368,10 +5370,13 @@
"builtin": { "builtin": {
"name": "alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at": "0x4d50f8", "activate_at": "0x4d50f8",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"alt_bn128_pairing": { "alt_bn128_pairing": {
"base": 100000, "base": 100000,
"pair": 80000 "pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }

View File

@ -60,9 +60,47 @@
"0x0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0x0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0x0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0x0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0x0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": 5067000, "pricing": { "modexp": { "divisor": 20 } } } }, "0x0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": 5067000, "pricing": { "modexp": { "divisor": 20 } } } },
"0x0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": 5067000, "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0x0000000000000000000000000000000000000006": {
"0x0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": 5067000, "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "builtin": {
"0x0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": 5067000, "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "name": "alt_bn128_add",
"activate_at": 5067000,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0x0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": 5067000,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0x0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": 5067000,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"0x00521965e7bd230323c423d96c657db5b79d099f": { "balance": "1606938044258990275541962092341162602522202993782792835301376" } "0x00521965e7bd230323c423d96c657db5b79d099f": { "balance": "1606938044258990275541962092341162602522202993782792835301376" }
}, },
"nodes": [ "nodes": [

View File

@ -120,38 +120,43 @@
} }
} }
}, },
"0000000000000000000000000000000000000006":{ "0000000000000000000000000000000000000006": {
"builtin":{ "builtin": {
"name":"alt_bn128_add", "name": "alt_bn128_add",
"activate_at":"0x7fffffffffffff", "activate_at":"0x7fffffffffffff",
"pricing":{ "eip1108_transition": "0x7fffffffffffff",
"linear":{ "pricing": {
"base":500, "alt_bn128_const_operations": {
"word":0 "price": 500,
"eip1108_transition_price": 150
} }
} }
} }
}, },
"0000000000000000000000000000000000000007":{ "0000000000000000000000000000000000000007": {
"builtin":{ "builtin": {
"name":"alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at":"0x7fffffffffffff", "activate_at":"0x7fffffffffffff",
"pricing":{ "eip1108_transition": "0x7fffffffffffff",
"linear":{ "pricing": {
"base":40000, "alt_bn128_const_operations": {
"word":0 "price": 40000,
"eip1108_transition_price": 6000
} }
} }
} }
}, },
"0000000000000000000000000000000000000008":{ "0000000000000000000000000000000000000008": {
"builtin":{ "builtin": {
"name":"alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at":"0x7fffffffffffff", "activate_at":"0x7fffffffffffff",
"pricing":{ "eip1108_transition": "0x7fffffffffffff",
"alt_bn128_pairing":{ "pricing": {
"base":100000, "alt_bn128_pairing": {
"pair":80000 "base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }

View File

@ -62,9 +62,47 @@
"0000000000000000000000000000000000000003": { "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": 3000000, "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": 3000000, "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": 3000000, "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": 3000000, "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "builtin": {
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": 3000000, "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "name": "alt_bn128_add",
"activate_at": 3000000,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": 3000000,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": 3000000,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"97c7f4f8f0bbf384578a9f5754ae73f37ff49ec2": { "balance": "55000000000000000000000000" } "97c7f4f8f0bbf384578a9f5754ae73f37ff49ec2": { "balance": "55000000000000000000000000" }
} }
} }

View File

@ -90,10 +90,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_add", "name": "alt_bn128_add",
"activate_at": "0x4829ba", "activate_at": "0x4829ba",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 500, "price": 500,
"word": 0 "eip1108_transition_price": 150
} }
} }
} }
@ -102,10 +103,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at": "0x4829ba", "activate_at": "0x4829ba",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 40000, "price": 40000,
"word": 0 "eip1108_transition_price": 6000
} }
} }
} }
@ -114,10 +116,13 @@
"builtin": { "builtin": {
"name": "alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at": "0x4829ba", "activate_at": "0x4829ba",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"alt_bn128_pairing": { "alt_bn128_pairing": {
"base": 100000, "base": 100000,
"pair": 80000 "pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }

View File

@ -128,38 +128,43 @@
} }
} }
}, },
"0000000000000000000000000000000000000006":{ "0000000000000000000000000000000000000006": {
"builtin":{ "builtin": {
"name":"alt_bn128_add", "name": "alt_bn128_add",
"activate_at":"0x21e88e", "activate_at":"0x21e88e",
"pricing":{ "eip1108_transition": "0x7fffffffffffff",
"linear":{ "pricing": {
"base":500, "alt_bn128_const_operations": {
"word":0 "price": 500,
"eip1108_transition_price": 150
} }
} }
} }
}, },
"0000000000000000000000000000000000000007":{ "0000000000000000000000000000000000000007": {
"builtin":{ "builtin": {
"name":"alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at":"0x21e88e", "activate_at":"0x21e88e",
"pricing":{ "eip1108_transition": "0x7fffffffffffff",
"linear":{ "pricing": {
"base":40000, "alt_bn128_const_operations": {
"word":0 "price": 40000,
"eip1108_transition_price": 6000
} }
} }
} }
}, },
"0000000000000000000000000000000000000008":{ "0000000000000000000000000000000000000008": {
"builtin":{ "builtin": {
"name":"alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at":"0x21e88e", "activate_at":"0x21e88e",
"pricing":{ "eip1108_transition": "0x7fffffffffffff",
"alt_bn128_pairing":{ "pricing": {
"base":100000, "alt_bn128_pairing": {
"pair":80000 "base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }

View File

@ -59,10 +59,47 @@
], ],
"accounts": { "accounts": {
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x0", "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x0", "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": "0x0", "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": "0x0", "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "builtin": {
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": "0x0", "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "name": "alt_bn128_add",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"0x0000000000000000000000000000000000000001": { "0x0000000000000000000000000000000000000001": {
"balance": "1", "balance": "1",
"builtin": { "builtin": {

View File

@ -65,9 +65,47 @@
], ],
"accounts": { "accounts": {
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x0", "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x0", "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": "0x0", "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": "0x0", "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "builtin": {
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": "0x0", "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "name": "alt_bn128_add",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"0x0000000000000000000000000000000000000001": { "0x0000000000000000000000000000000000000001": {
"balance": "1", "balance": "1",

View File

@ -117,40 +117,42 @@
} }
}, },
"0x0000000000000000000000000000000000000006": { "0x0000000000000000000000000000000000000006": {
"balance": "0x1",
"builtin": { "builtin": {
"name": "alt_bn128_add", "name": "alt_bn128_add",
"activate_at": "0xfcc25", "activate_at": "0xfcc25",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 500, "price": 500,
"word": 0 "eip1108_transition_price": 150
} }
} }
} }
}, },
"0x0000000000000000000000000000000000000007": { "0x0000000000000000000000000000000000000007": {
"balance": "0x1",
"builtin": { "builtin": {
"name": "alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at": "0xfcc25", "activate_at": "0xfcc25",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 40000, "price": 40000,
"word": 0 "eip1108_transition_price": 6000
} }
} }
} }
}, },
"0x0000000000000000000000000000000000000008": { "0x0000000000000000000000000000000000000008": {
"balance": "0x1",
"builtin": { "builtin": {
"name": "alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at": "0xfcc25", "activate_at": "0xfcc25",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"alt_bn128_pairing": { "alt_bn128_pairing": {
"base": 100000, "base": 100000,
"pair": 80000 "pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }

View File

@ -2735,10 +2735,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_add", "name": "alt_bn128_add",
"activate_at": "0x19f0a0", "activate_at": "0x19f0a0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 500, "price": 500,
"word": 0 "eip1108_transition_price": 150
} }
} }
} }
@ -2749,10 +2750,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at": "0x19f0a0", "activate_at": "0x19f0a0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 40000, "price": 40000,
"word": 0 "eip1108_transition_price": 6000
} }
} }
} }
@ -2763,10 +2765,13 @@
"builtin": { "builtin": {
"name": "alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at": "0x19f0a0", "activate_at": "0x19f0a0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"alt_bn128_pairing": { "alt_bn128_pairing": {
"base": 100000, "base": 100000,
"pair": 80000 "pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }

View File

@ -58,8 +58,46 @@
"0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": "0x00", "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": "0x00", "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "builtin": {
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": "0x00", "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } } "name": "alt_bn128_add",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
}
} }
} }

View File

@ -57,9 +57,46 @@
"0000000000000000000000000000000000000002": { "balance": "1", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } }, "0000000000000000000000000000000000000002": { "balance": "1", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
"0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "5", "pricing": { "modexp": { "divisor": 100 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": "5", "pricing": { "linear": { "base": 500, "word": 0 } } } }, "builtin": {
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": "5", "pricing": { "linear": { "base": 2000, "word": 0 } } } }, "name": "alt_bn128_add",
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": "5", "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } } "activate_at": "5",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "5",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "5",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
}
} }
} }

File diff suppressed because one or more lines are too long

View File

@ -65,10 +65,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_add", "name": "alt_bn128_add",
"activate_at": "0x0", "activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 500, "price": 500,
"word": 0 "eip1108_transition_price": 150
} }
} }
} }
@ -77,10 +78,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at": "0x0", "activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 40000, "price": 40000,
"word": 0 "eip1108_transition_price": 6000
} }
} }
} }
@ -89,10 +91,13 @@
"builtin": { "builtin": {
"name": "alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at": "0x0", "activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"alt_bn128_pairing": { "alt_bn128_pairing": {
"base": 100000, "base": 100000,
"pair": 80000 "pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }
@ -147,6 +152,6 @@
} }
}, },
"nodes": [ "nodes": [
"enode://66786c15390cb4fef3743571e12ec54ca343e7f119018136d68b670edd93604eedf74e5013dc5c2439f89e0e05593e29c409a97e155ea4165c6b832de131ef1e@3.214.113.185:30303" "enode://66786c15390cb4fef3743571e12ec54ca343e7f119018136d68b670edd93604eedf74e5013dc5c2439f89e0e05593e29c409a97e155ea4165c6b832de131ef1e@3.214.113.185:30303"
] ]
} }

File diff suppressed because one or more lines are too long

View File

@ -36,9 +36,50 @@
"0000000000000000000000000000000000000003": { "balance": "1", "nonce": "0", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "nonce": "0", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "nonce": "0", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "nonce": "0", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "balance": "1", "builtin": { "name": "alt_bn128_add", "activate_at": 0, "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "balance": "1", "builtin": { "name": "alt_bn128_mul", "activate_at": 0, "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "balance": "1",
"0000000000000000000000000000000000000008": { "balance": "1", "builtin": { "name": "alt_bn128_pairing", "activate_at": 0, "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "builtin": {
"name": "alt_bn128_add",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"balance": "1",
"builtin": {
"name": "alt_bn128_mul",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"balance": "1",
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "0" } "9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "0" }
} }
} }

View File

@ -22,4 +22,7 @@ unexpected = { path = "../../util/unexpected" }
vm = { path = "../vm"} vm = { path = "../vm"}
[dev-dependencies] [dev-dependencies]
rustc-hex= "1.0" rustc-hex = "1.0"
[features]
test-helpers = []

View File

@ -31,8 +31,8 @@ const MAX_TRANSACTION_SIZE: usize = 300 * 1024;
/// ///
/// we define a "bugfix" hard fork as any hard fork which /// we define a "bugfix" hard fork as any hard fork which
/// you would put on-by-default in a new chain. /// you would put on-by-default in a new chain.
// NOTE [dvdplm]: `Clone` is needed only for tests. #[derive(Debug, PartialEq, Default)]
#[derive(Debug, PartialEq, Default, Clone)] #[cfg_attr(any(test, feature = "test-helpers"), derive(Clone))]
pub struct CommonParams { pub struct CommonParams {
/// Account start nonce. /// Account start nonce.
pub account_start_nonce: U256, pub account_start_nonce: U256,

View File

@ -36,6 +36,16 @@ pub struct Modexp {
pub divisor: usize, pub divisor: usize,
} }
/// Pricing for constant alt_bn128 operations (ECADD and ECMUL)
#[derive(Debug, PartialEq, Deserialize, Clone)]
#[serde(deny_unknown_fields)]
pub struct AltBn128ConstOperations {
/// price
pub price: usize,
/// EIP 1108 transition price
pub eip1108_transition_price: usize,
}
/// Pricing for alt_bn128_pairing. /// Pricing for alt_bn128_pairing.
#[derive(Debug, PartialEq, Deserialize, Clone)] #[derive(Debug, PartialEq, Deserialize, Clone)]
#[serde(deny_unknown_fields)] #[serde(deny_unknown_fields)]
@ -44,6 +54,10 @@ pub struct AltBn128Pairing {
pub base: usize, pub base: usize,
/// Price per point pair. /// Price per point pair.
pub pair: usize, pub pair: usize,
/// EIP 1108 transition base price
pub eip1108_transition_base: usize,
/// EIP 1108 transition price per point pair
pub eip1108_transition_pair: usize,
} }
/// Pricing variants. /// Pricing variants.
@ -57,6 +71,8 @@ pub enum Pricing {
Modexp(Modexp), Modexp(Modexp),
/// Pricing for alt_bn128_pairing exponentiation. /// Pricing for alt_bn128_pairing exponentiation.
AltBn128Pairing(AltBn128Pairing), AltBn128Pairing(AltBn128Pairing),
/// Pricing for constant alt_bn128 operations
AltBn128ConstOperations(AltBn128ConstOperations),
} }
/// Spec builtin. /// Spec builtin.
@ -69,6 +85,8 @@ pub struct Builtin {
pub pricing: Pricing, pub pricing: Pricing,
/// Activation block. /// Activation block.
pub activate_at: Option<Uint>, pub activate_at: Option<Uint>,
/// EIP 1108
pub eip1108_transition: Option<Uint>,
} }
#[cfg(test)] #[cfg(test)]