Commit 13729a0f authored by Niklas Adolfsson's avatar Niklas Adolfsson Committed by Andronik Ordian

[builtin]: support `multiple prices and activations` in chain spec (#11039)

* [builtin]: impl new builtin type

Have an enum to deserialize either a builtin of a single price or several prices

* [builtin]: style cleanup

* [builtin]: fix tests

* [builtin]: replace boxing with wrapper enum

* cleanup

* fix: make it backward compatible with old builtin

* fix: update chain specs

* fix: revert use of `type alias` on enum

The CI doesn't use the latest rust.

This commit reverts that change

* fix: builtin tests

* fix: revert use of `type alias` on enum

* [basic-authority]: update test-chainspec

* fix failing tests

* [builtin]: multi-prices add `info field`

It might be hard to read chain specs with several activations points.
This commit introduces a `info` field which may be used to write some
information about the current activation such as:

`Istanbul hardfork EIP-1108` or something similar.

* fix: bad rebase
Co-Authored-By: David's avatarDavid <dvdplm@gmail.com>

* fix(grumbles): make it backward compatible

* grumbles: resolve `NOTE`

* revert chain specs changes

* rename test
Co-Authored-By: David's avatarDavid <dvdplm@gmail.com>

* [builtin docs]: price -> Fixed price
Co-Authored-By: Andronik Ordian's avatarAndronik Ordian <write@reusable.software>

* [json]: address naming grumbles

InnerPricing -> PricingInner
PriceWithActivationAt -> PricingAt

* docs: revert changes for `AltBn128ConstOperations`

* [json]: usize -> u64

Use explicit types to cope with platform dependent issues for `usize`

* grumble: simplify `spec_backward_compability.json`

* docs: add issue link to `TODO`

* [builtin]: replace `match` with `map`

* [builtin]: add deprecation message `eip1108` params

* nits

* [json spec tests]: fix json indentation

* [json docs]: fix typos

* [json]: `compability layer` + deser to BTreeMap

Previously we had to match `Pricing::Single` and `PricingMulti` which this fixes.
It does by introducing a compability layer and into() implemenentation.

In addition, I switched the deserialization to `BTreeMap` instead of `Vec`.
That changes the format of the chain spec again

* [json]: rename `BuiltinCombat` -> `BuiltinCompat`

* Update ethcore/builtin/src/lib.rs
Co-Authored-By: David's avatarDavid <dvdplm@gmail.com>

* [json builtin]: improve docs
Co-Authored-By: David's avatarDavid <dvdplm@gmail.com>

* [json builtin]: improve docs
Co-Authored-By: David's avatarDavid <dvdplm@gmail.com>

* chore(builtin): sort dependencies

* [json builtin]: deprecate `eip1108` params

* [machine]: add bench for calling builtin contract

* [machine]: reduce calls to `Builtin::is_active`

* [builtin]: fix nits

* [json]: revert breakage of chain specs

* [json builtin]: remove `eip1108` params

* [chain specs]: update to new format

* [machine]: revert changes

* [devp2p]: revert change

* [builtin]: doc nits
parent 80754c34
Pipeline #55719 passed with stages
in 64 minutes and 32 seconds
......@@ -1179,6 +1179,7 @@ dependencies = [
"hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"keccak-hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"macros 0.1.0",
"num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-crypto 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -2565,6 +2566,7 @@ dependencies = [
"account-state 0.1.0",
"client-traits 0.1.0",
"common-types 0.1.0",
"criterion 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"ethabi 9.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ethabi-contract 9.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
......
......@@ -7,16 +7,17 @@ edition = "2018"
[dependencies]
bn = { git = "https://github.com/paritytech/bn", default-features = false }
byteorder = "1.3.2"
common-types = { path = "../types" }
eip-152 = { path = "../../util/EIP-152" }
ethereum-types = "0.8.0"
ethjson = { path = "../../json" }
keccak-hash = "0.4.0"
log = "0.4"
macros = { path = "../../util/macros" }
num = { version = "0.1", default-features = false, features = ["bigint"] }
parity-bytes = "0.1"
eip-152 = { path = "../../util/EIP-152" }
parity-crypto = { version = "0.4.2", features = ["publickey"] }
byteorder = "1.3.2"
[dev-dependencies]
hex-literal = "0.2.1"
This diff is collapsed.
......@@ -42,12 +42,12 @@
"balance": "1",
"builtin": {
"name": "alt_bn128_add",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
"0x0": {
"price": { "linear": { "base": 500, "word": 0 }}
},
"0x7fffffffffffff": {
"price": { "linear": { "base": 150, "word": 0 }}
}
}
}
......@@ -56,12 +56,12 @@
"balance": "1",
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
"0x0": {
"price": { "linear": { "base": 40000, "word": 0 }}
},
"0x7fffffffffffff": {
"price": { "linear": { "base": 6000, "word": 0 }}
}
}
}
......@@ -70,14 +70,12 @@
"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
"0x0": {
"price": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 }}
},
"0x7fffffffffffff": {
"price": { "alt_bn128_pairing": { "base": 45000, "pair": 34000 }}
}
}
}
......
......@@ -35,7 +35,6 @@ use ethereum_types::{H256, H520};
use parking_lot::RwLock;
use engine::{Engine, ConstructedVerifier, signer::EngineSigner};
use parity_crypto::publickey::Signature;
use ethjson;
use log::trace;
use machine::{Machine, executed_block::ExecutedBlock};
use rlp::Rlp;
......
......@@ -6,6 +6,11 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
license = "GPL-3.0"
[[bench]]
name = "builtin_contract"
harness = false
required-features = ["test-helpers"]
[dependencies]
account-state = { path = "../account-state" }
client-traits = { path = "../client-traits" }
......@@ -34,6 +39,7 @@ vm = { path = "../vm" }
[dev-dependencies]
common-types = { path = "../types", features = ["test-helpers"] }
criterion = "0.3"
ethcore = { path = "../", features = ["test-helpers"] }
ethcore-io = { path = "../../util/io" }
ethjson = { path = "../../json" }
......
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
//! Benchmarking of calling builtin contract
use std::str::FromStr;
use account_state::State;
use parity_bytes::Bytes;
use ethcore::test_helpers::get_temp_state_db;
use ethereum_types::{H160, U256};
use criterion::{black_box, criterion_main, criterion_group, Criterion};
use machine::{test_helpers, Machine};
use machine::executive::CallCreateExecutive;
use machine::substate::Substate;
use trace::{NoopTracer, NoopVMTracer};
use trie_vm_factories::VmFactory;
use vm::{ActionParams, EnvInfo, Schedule};
const ECRECOVER: &str = "0000000000000000000000000000000000000001";
const SHA256: &str = "0000000000000000000000000000000000000002";
const SIGNED_DATA: &str = "hash000000000001v000000000000002r000000000000003s000000000000004";
fn single_builtin_pricing() -> Machine {
test_helpers::load_machine(include_bytes!("../../res/ethereum/builtin_one_activation_bench.json"))
}
fn multiple_builtin_pricing() -> Machine {
test_helpers::load_machine(include_bytes!("../../res/ethereum/builtin_multi_bench.json"))
}
fn builtin_params(address: H160, execute: bool) -> ActionParams {
let mut params = ActionParams::default();
params.code_address = address;
params.gas = u64::max_value().into();
if execute {
params.data = Some(SIGNED_DATA.bytes().collect::<Bytes>());
}
params
}
fn single_activation(c: &mut Criterion) {
let contract = H160::from_str(ECRECOVER).unwrap();
let params = builtin_params(contract, false);
let env_info = EnvInfo::default();
let machine = single_builtin_pricing();
let schedule = Schedule::default();
let factory = VmFactory::default();
let depth = 0;
let stack_depth = 0;
let parent_static_flag = false;
let db = get_temp_state_db();
let mut state = State::new(db, U256::from(0), Default::default());
let mut substate = Substate::new();
c.bench_function("single activation", move |b| {
b.iter(|| black_box(CallCreateExecutive::new_call_raw(
params.clone(),
&env_info,
&machine,
&schedule,
&factory,
depth,
stack_depth,
parent_static_flag,
).exec(&mut state, &mut substate, &mut NoopTracer, &mut NoopVMTracer))
)
});
}
fn ten_multiple_activations(c: &mut Criterion) {
let contract = H160::from_str(ECRECOVER).unwrap();
let params = builtin_params(contract, false);
let env_info = EnvInfo::default();
let machine = multiple_builtin_pricing();
let schedule = Schedule::default();
let factory = VmFactory::default();
let depth = 0;
let stack_depth = 0;
let parent_static_flag = false;
let db = get_temp_state_db();
let mut state = State::new(db, U256::from(0), Default::default());
let mut substate = Substate::new();
c.bench_function("ten activations", move |b| {
b.iter(|| black_box(CallCreateExecutive::new_call_raw(
params.clone(),
&env_info,
&machine,
&schedule,
&factory,
depth,
stack_depth,
parent_static_flag,
).exec(&mut state, &mut substate, &mut NoopTracer, &mut NoopVMTracer))
)
});
}
fn fourty_multiple_activations(c: &mut Criterion) {
let contract = H160::from_str(SHA256).unwrap();
let params = builtin_params(contract, false);
let env_info = EnvInfo::default();
let machine = multiple_builtin_pricing();
let schedule = Schedule::default();
let factory = VmFactory::default();
let depth = 0;
let stack_depth = 0;
let parent_static_flag = false;
let db = get_temp_state_db();
let mut state = State::new(db, U256::from(0), Default::default());
let mut substate = Substate::new();
c.bench_function("fourty activations", move |b| {
b.iter(|| black_box(CallCreateExecutive::new_call_raw(
params.clone(),
&env_info,
&machine,
&schedule,
&factory,
depth,
stack_depth,
parent_static_flag,
).exec(&mut state, &mut substate, &mut NoopTracer, &mut NoopVMTracer))
)
});
}
criterion_group!(benches, single_activation, ten_multiple_activations, fourty_multiple_activations);
criterion_main!(benches);
......@@ -19,7 +19,6 @@
use std::convert::TryFrom;
use common_types::engines::params::CommonParams;
use ethcore_builtin::Builtin;
use ethjson;
use crate::Machine;
pub fn load_machine(reader: &[u8]) -> Machine {
......@@ -35,7 +34,6 @@ pub fn load_machine(reader: &[u8]) -> Machine {
}
}
/// Create a new Foundation Frontier-era chain spec as though it never changes to Homestead.
pub fn new_frontier_test_machine() -> Machine { load_machine(include_bytes!("../../res/ethereum/frontier_test.json")) }
......
......@@ -50,12 +50,13 @@
"balance": "1",
"builtin": {
"name": "alt_bn128_add",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
"0": {
"price": { "alt_bn128_const_operations": { "price": 500 }}
},
"0x7fffffffffffff": {
"info": "EIP 1108 transition",
"price": { "alt_bn128_const_operations": { "price": 150 }}
}
}
}
......@@ -64,12 +65,13 @@
"balance": "1",
"builtin": {
"name": "alt_bn128_mul",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
"0": {
"price": { "alt_bn128_const_operations": { "price": 40000 }}
},
"0x7fffffffffffff": {
"info": "EIP 1108 transition",
"price": { "alt_bn128_const_operations": { "price": 6000 }}
}
}
}
......@@ -78,14 +80,13 @@
"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
"0": {
"price": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 }}
},
"0x7fffffffffffff": {
"info": "EIP 1108 transition",
"price": { "alt_bn128_pairing": { "base": 45000, "pair": 34000 }}
}
}
}
......
......@@ -53,12 +53,13 @@
"balance": "1",
"builtin": {
"name": "alt_bn128_add",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
"0": {
"price": { "alt_bn128_const_operations": { "price": 500 }}
},
"0x7fffffffffffff": {
"info": "EIP 1108 transition",
"price": { "alt_bn128_const_operations": { "price": 150 }}
}
}
}
......@@ -67,12 +68,13 @@
"balance": "1",
"builtin": {
"name": "alt_bn128_mul",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
"0": {
"price": { "alt_bn128_const_operations": { "price": 40000 }}
},
"0x7fffffffffffff": {
"info": "EIP 1108 transition",
"price": { "alt_bn128_const_operations": { "price": 6000 }}
}
}
}
......@@ -81,14 +83,13 @@
"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
"0": {
"price": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 }}
},
"0x7fffffffffffff": {
"info": "EIP 1108 transition",
"price": { "alt_bn128_pairing": { "base": 45000, "pair": 34000 }}
}
}
}
......
......@@ -38,12 +38,13 @@
"balance": "1",
"builtin": {
"name": "alt_bn128_add",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
"0": {
"price": { "linear": { "base": 500, "word": 0 }}
},
"0x7fffffffffffff": {
"info": "EIP1108 transition",
"price": { "linear": { "base": 150, "word": 0 }}
}
}
}
......@@ -52,12 +53,13 @@
"balance": "1",
"builtin": {
"name": "alt_bn128_mul",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
"0": {
"price": { "linear": {"base": 40000, "word": 0 }}
},
"0x7fffffffffffff": {
"info": "EIP1108 transition",
"price": { "linear": { "base": 6000, "word": 0 }}
}
}
}
......@@ -66,14 +68,13 @@
"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
"0": {
"price": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 }}
},
"0x7fffffffffffff": {
"info": "EIP1108 transition",
"price": { "alt_bn128_pairing": { "base": 45000, "pair": 34000 }}
}
}
}
......
{
"name": "ecrecover legacy",
"engine": {
"Ethash": {
"params": {
"minimumDifficulty": "0x020000",
"difficultyBoundDivisor": "0x0800",
"durationLimit": "0x0d",
"blockReward": "0x4563918244F40000",
"homesteadTransition": "0x0"
}
}
},
"params": {
"gasLimitBoundDivisor": "0x0400",
"registrar" : "0xc6d9d2cd449a754c494264e1809c50e34d64562b",
"accountStartNonce": "0x00",
"maximumExtraDataSize": "0x20",
"minGasLimit": "0x1388",
"networkID" : "0x1",
"eip150Transition": "0x0",
"eip160Transition": "0x7fffffffffffffff",
"eip161abcTransition": "0x7fffffffffffffff",
"eip161dTransition": "0x7fffffffffffffff",
"eip155Transition": "0x7fffffffffffffff",
"maxCodeSize": 24576,
"maxCodeSizeTransition": "0x7fffffffffffffff"
},
"genesis": {
"seal": {
"ethereum": {
"nonce": "0x0000000000000042",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
},
"difficulty": "0x400000000",
"author": "0x0000000000000000000000000000000000000000",
"timestamp": "0x00",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa",
"gasLimit": "0x1388"
},
"accounts": {
"0000000000000000000000000000000000000001": {
"balance": "1",
"builtin": {
"name": "ecrecover",
"pricing": {
"0": {"price": {"linear": { "base": 1, "word": 0 }}},
"1": {"price": {"linear": { "base": 2, "word": 0 }}},
"2": {"price": {"linear": { "base": 3, "word": 0 }}},
"3": {"price": {"linear": { "base": 4, "word": 0 }}},
"4": {"price": {"linear": { "base": 5, "word": 0 }}},
"5": {"price": {"linear": { "base": 6, "word": 0 }}},
"6": {"price": {"linear": { "base": 7, "word": 0 }}},
"7": {"price": {"linear": { "base": 8, "word": 0 }}},
"8": {"price": {"linear": { "base": 9, "word": 0 }}},
"9": {"price": {"linear": { "base": 1, "word": 0 }}},
"10": {"price": {"linear": { "base": 2, "word": 0 }}}
}
}
},
"0000000000000000000000000000000000000002": {
"balance": "1",
"builtin": {
"name": "sha256",
"pricing": {
"0": {"price": {"linear": { "base": 1, "word": 0 }}},
"1": {"price": {"linear": { "base": 2, "word": 0 }}},
"2": {"price": {"linear": { "base": 3, "word": 0 }}},
"3": {"price": {"linear": { "base": 4, "word": 0 }}},
"4": {"price": {"linear": { "base": 5, "word": 0 }}},
"5": {"price": {"linear": { "base": 6, "word": 0 }}},
"6": {"price": {"linear": { "base": 7, "word": 0 }}},
"7": {"price": {"linear": { "base": 8, "word": 0 }}},
"8": {"price": {"linear": { "base": 9, "word": 0 }}},
"9": {"price": {"linear": { "base": 1, "word": 0 }}},
"10": {"price": {"linear": { "base": 2, "word": 0 }}},
"11": {"price": {"linear": { "base": 3, "word": 0 }}},
"12": {"price": {"linear": { "base": 4, "word": 0 }}},
"13": {"price": {"linear": { "base": 5, "word": 0 }}},
"14": {"price": {"linear": { "base": 6, "word": 0 }}},
"15": {"price": {"linear": { "base": 7, "word": 0 }}},
"16": {"price": {"linear": { "base": 8, "word": 0 }}},
"17": {"price": {"linear": { "base": 9, "word": 0 }}},
"18": {"price": {"linear": { "base": 1, "word": 0 }}},
"19": {"price": {"linear": { "base": 2, "word": 0 }}},
"20": {"price": {"linear": { "base": 3, "word": 0 }}},
"21": {"price": {"linear": { "base": 4, "word": 0 }}},
"22": {"price": {"linear": { "base": 5, "word": 0 }}},
"23": {"price": {"linear": { "base": 6, "word": 0 }}},
"24": {"price": {"linear": { "base": 7, "word": 0 }}},
"25": {"price": {"linear": { "base": 8, "word": 0 }}},
"26": {"price": {"linear": { "base": 9, "word": 0 }}},
"27": {"price": {"linear": { "base": 1, "word": 0 }}},
"28": {"price": {"linear": { "base": 2, "word": 0 }}},
"29": {"price": {"linear": { "base": 3, "word": 0 }}},
"30": {"price": {"linear": { "base": 4, "word": 0 }}},
"31": {"price": {"linear": { "base": 5, "word": 0 }}},
"32": {"price": {"linear": { "base": 6, "word": 0 }}},
"33": {"price": {"linear": { "base": 7, "word": 0 }}},
"34": {"price": {"linear": { "base": 8, "word": 0 }}},
"35": {"price": {"linear": { "base": 9, "word": 0 }}},
"36": {"price": {"linear": { "base": 10, "word": 0 }}},
"37": {"price": {"linear": { "base": 10, "word": 0 }}},
"38": {"price": {"linear": { "base": 10, "word": 0 }}},
"39": {"price": {"linear": { "base": 10, "word": 0 }}}
}
}
}
}
}
{
"name": "ecrecover legacy chain spec for benchmarking",
"engine": {
"Ethash": {
"params": {
"minimumDifficulty": "0x020000",
"difficultyBoundDivisor": "0x0800",
"durationLimit": "0x0d",
"blockReward": "0x4563918244F40000",
"homesteadTransition": "0x0"
}
}
},
"params": {
"gasLimitBoundDivisor": "0x0400",
"registrar" : "0xc6d9d2cd449a754c494264e1809c50e34d64562b",
"accountStartNonce": "0x00",
"maximumExtraDataSize": "0x20",
"minGasLimit": "0x1388",
"networkID" : "0x1",
"eip150Transition": "0x0",
"eip160Transition": "0x7fffffffffffffff",
"eip161abcTransition": "0x7fffffffffffffff",
"eip161dTransition": "0x7fffffffffffffff",
"eip155Transition": "0x7fffffffffffffff",
"maxCodeSize": 24576,
"maxCodeSizeTransition": "0x7fffffffffffffff"
},
"genesis": {
"seal": {
"ethereum": {
"nonce": "0x0000000000000042",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
},
"difficulty": "0x400000000",
"author": "0x0000000000000000000000000000000000000000",
"timestamp": "0x00",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa",
"gasLimit": "0x1388"
},
"accounts": {
"0000000000000000000000000000000000000001": {
"balance": "1",
"builtin": {
"name": "ecrecover",
"pricing": {
"linear": { "base": 3000, "word": 0 }
}
}
}
}
}
......@@ -57,12 +57,13 @@
"0000000000000000000000000000000000000006": {
"builtin": {
"name": "alt_bn128_add",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
"0": {
"price": { "alt_bn128_const_operations": { "price": 500 }}
},
"0x7fffffffffffff": {
"info": "EIP 1108 transition",
"price": { "alt_bn128_const_operations": { "price": 150 }}
}
}
}
......@@ -70,12 +71,13 @@
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
"0": {
"price": { "alt_bn128_const_operations": { "price": 40000 }}