openethereum/ethcore/res/null.json
Niklas Adolfsson 13729a0f7f [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

87 lines
2.8 KiB
JSON

{
"name": "Null",
"engine": {
"null": {
"params": {}
}
},
"params": {
"gasLimitBoundDivisor": "0x0400",
"accountStartNonce": "0x0",
"maximumExtraDataSize": "0x20",
"minGasLimit": "0x1388",
"networkID" : "0x2",
"eip140Transition": "0x0",
"eip211Transition": "0x0",
"eip214Transition": "0x0",
"eip658Transition": "0x0"
},
"genesis": {
"seal": {
"ethereum": {
"nonce": "0x00006d6f7264656e",
"mixHash": "0x00000000000000000000000000000000000000647572616c65787365646c6578"
}
},
"difficulty": "0x20000",
"author": "0x0000000000000000000000000000000000000000",
"timestamp": "0x00",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x",
"gasLimit": "0x2fefd8"
},
"accounts": {
"0000000000000000000000000000000000000001": { "balance": "1", "nonce": "0", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
"0000000000000000000000000000000000000002": { "balance": "1", "nonce": "0", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
"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 } } } },
"0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": {
"balance": "1",
"builtin": {
"name": "alt_bn128_add",
"pricing": {
"0": {
"price": { "alt_bn128_const_operations": { "price": 500 }}
},
"0x7fffffffffffff": {
"info": "EIP 1108 transition",
"price": { "alt_bn128_const_operations": { "price": 150 }}
}
}
}
},
"0000000000000000000000000000000000000007": {
"balance": "1",
"builtin": {
"name": "alt_bn128_mul",
"pricing": {
"0": {
"price": { "alt_bn128_const_operations": { "price": 40000 }}
},
"0x7fffffffffffff": {
"info": "EIP 1108 transition",
"price": { "alt_bn128_const_operations": { "price": 6000 }}
}
}
}
},
"0000000000000000000000000000000000000008": {
"balance": "1",
"builtin": {
"name": "alt_bn128_pairing",
"pricing": {
"0": {
"price": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 }}
},
"0x7fffffffffffff": {
"info": "EIP 1108 transition",
"price": { "alt_bn128_pairing": { "base": 45000, "pair": 34000 }}
}
}
}
},
"9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "0" }
}
}