openethereum/ethcore/res/ethereum/builtin_multi_bench.json

113 lines
4.5 KiB
JSON
Raw Normal View History

[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 <dvdplm@gmail.com> * fix(grumbles): make it backward compatible * grumbles: resolve `NOTE` * revert chain specs changes * rename test Co-Authored-By: David <dvdplm@gmail.com> * [builtin docs]: price -> Fixed price Co-Authored-By: Andronik 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 <dvdplm@gmail.com> * [json builtin]: improve docs Co-Authored-By: David <dvdplm@gmail.com> * [json builtin]: improve docs Co-Authored-By: David <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
2019-10-31 17:09:08 +01:00
{
"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 }}}
}
}
}
}
}