-
Notifications
You must be signed in to change notification settings - Fork 851
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Address code review comments, create a dev network for ecip1049, prep…
…are for keccak hasher Signed-off-by: Antoine Toulme <[email protected]>
- Loading branch information
Showing
32 changed files
with
375 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,5 +23,6 @@ public enum NetworkName { | |
CLASSIC, | ||
KOTTI, | ||
MORDOR, | ||
YOLO_V2 | ||
YOLO_V2, | ||
ECIP1049_DEV | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
config/src/main/java/org/hyperledger/besu/config/Keccak256ConfigOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright ConsenSys AG. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
package org.hyperledger.besu.config; | ||
|
||
import java.util.Map; | ||
import java.util.OptionalLong; | ||
|
||
import com.fasterxml.jackson.databind.node.ObjectNode; | ||
import com.google.common.collect.ImmutableMap; | ||
|
||
public class Keccak256ConfigOptions { | ||
|
||
public static final Keccak256ConfigOptions DEFAULT = | ||
new Keccak256ConfigOptions(JsonUtil.createEmptyObjectNode()); | ||
|
||
private final ObjectNode keccak256ConfigRoot; | ||
|
||
Keccak256ConfigOptions(final ObjectNode keccak256ConfigRoot) { | ||
this.keccak256ConfigRoot = keccak256ConfigRoot; | ||
} | ||
|
||
public OptionalLong getFixedDifficulty() { | ||
return JsonUtil.getLong(keccak256ConfigRoot, "fixeddifficulty"); | ||
} | ||
|
||
Map<String, Object> asMap() { | ||
final ImmutableMap.Builder<String, Object> builder = ImmutableMap.builder(); | ||
getFixedDifficulty().ifPresent(l -> builder.put("fixeddifficulty", l)); | ||
return builder.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"config": { | ||
"chainId": 2021, | ||
"homesteadBlock": 0, | ||
"classicForkBlock": 0, | ||
"ecip1015Block": 0, | ||
"diehardBlock": 0, | ||
"gothamBlock": 0, | ||
"ecip1041Block": 0, | ||
"atlantisBlock": 0, | ||
"aghartaBlock": 0, | ||
"phoenixBlock": 0, | ||
"thanosBlock": 0, | ||
"ecip1049Block": 0, | ||
"keccak256": { | ||
"fixeddifficulty": 100 | ||
} | ||
}, | ||
"nonce": "0x42", | ||
"timestamp": "0x0", | ||
"extraData": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa", | ||
"gasLimit": "0x1fffffffffffff", | ||
"difficulty": "0x10000", | ||
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"coinbase": "0x0000000000000000000000000000000000000000", | ||
"alloc": { | ||
"fe3b557e8fb62b89f4916b721be55ceb828dbd73": { | ||
"privateKey": "8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63", | ||
"comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored", | ||
"balance": "0xad78ebc5ac6200000" | ||
}, | ||
"627306090abaB3A6e1400e9345bC60c78a8BEf57": { | ||
"privateKey": "c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3", | ||
"comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored", | ||
"balance": "90000000000000000000000" | ||
}, | ||
"f17f52151EbEF6C7334FAD080c5704D77216b732": { | ||
"privateKey": "ae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f", | ||
"comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored", | ||
"balance": "90000000000000000000000" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.