diff --git a/besu/src/main/java/org/hyperledger/besu/cli/config/EthNetworkConfig.java b/besu/src/main/java/org/hyperledger/besu/cli/config/EthNetworkConfig.java index b103f7fcbd7..f790551ca4a 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/config/EthNetworkConfig.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/config/EthNetworkConfig.java @@ -15,6 +15,7 @@ package org.hyperledger.besu.cli.config; import static java.nio.charset.StandardCharsets.UTF_8; +import static org.hyperledger.besu.ethereum.p2p.config.DiscoveryConfiguration.ASTOR_BOOTSTRAP_NODES; import static org.hyperledger.besu.ethereum.p2p.config.DiscoveryConfiguration.CLASSIC_BOOTSTRAP_NODES; import static org.hyperledger.besu.ethereum.p2p.config.DiscoveryConfiguration.GOERLI_BOOTSTRAP_NODES; import static org.hyperledger.besu.ethereum.p2p.config.DiscoveryConfiguration.GOERLI_DISCOVERY_URL; @@ -52,6 +53,7 @@ public class EthNetworkConfig { public static final BigInteger KOTTI_NETWORK_ID = BigInteger.valueOf(6); public static final BigInteger MORDOR_NETWORK_ID = BigInteger.valueOf(7); private static final BigInteger YOLO_V3_NETWORK_ID = BigInteger.valueOf(34180983699157880L); + private static final BigInteger ASTOR_NETWORK_ID = BigInteger.valueOf(212); private static final String MAINNET_GENESIS = "/mainnet.json"; private static final String ROPSTEN_GENESIS = "/ropsten.json"; private static final String RINKEBY_GENESIS = "/rinkeby.json"; @@ -62,6 +64,8 @@ public class EthNetworkConfig { private static final String KOTTI_GENESIS = "/kotti.json"; private static final String MORDOR_GENESIS = "/mordor.json"; private static final String YOLO_GENESIS = "/yolo.json"; + private static final String ASTOR_GENESIS = "/astor.json"; + private final String genesisConfig; private final BigInteger networkId; private final List bootNodes; @@ -168,6 +172,9 @@ public static EthNetworkConfig getNetworkConfig(final NetworkName networkName) { case YOLO_V3: return new EthNetworkConfig( jsonConfig(YOLO_GENESIS), YOLO_V3_NETWORK_ID, YOLO_V3_BOOTSTRAP_NODES, null); + case ASTOR: + return new EthNetworkConfig( + jsonConfig(ASTOR_GENESIS), ASTOR_NETWORK_ID, ASTOR_BOOTSTRAP_NODES, null); case MAINNET: default: return new EthNetworkConfig( diff --git a/besu/src/main/java/org/hyperledger/besu/cli/config/NetworkName.java b/besu/src/main/java/org/hyperledger/besu/cli/config/NetworkName.java index ff6653a3bd1..d662eb49f27 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/config/NetworkName.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/config/NetworkName.java @@ -24,5 +24,6 @@ public enum NetworkName { KOTTI, MORDOR, YOLO_V3, - ECIP1049_DEV + ECIP1049_DEV, + ASTOR } diff --git a/config/src/main/resources/astor.json b/config/src/main/resources/astor.json new file mode 100644 index 00000000000..137dc951838 --- /dev/null +++ b/config/src/main/resources/astor.json @@ -0,0 +1,57 @@ + +{ + "config": { + "chainId": 212, + "ecip1049Block": 0, + "keccak256": { + } + }, + "nonce": "0x42", + "timestamp": "0x0", + "extraData": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa", + "gasLimit": "0x1fffffffffffff", + "difficulty": "0x10000000000", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "coinbase": "0x0000000000000000000000000000000000000000", + "alloc": { + "6e3da3dd22f043958fdb862db5876e5e52a3d7b7": { + "balance": "90000000000000000000000" + }, + "46652437dc2f978952c5f5667533874c294e4e84": { + "balance": "90000000000000000000000" + }, + "3d650ae1134709a9f2f1c7785cd99400482cdd97": { + "balance": "90000000000000000000000" + }, + "e6b2d417af0e3686982dba572fcda575a4e8f575": { + "balance": "90000000000000000000000" + }, + "d118ab56776b158c70a0d03ed5ff03392a63deaf": { + "balance": "90000000000000000000000" + }, + "2bac997f3c4a51e655d14733aa1d75817443779a": { + "balance": "90000000000000000000000" + }, + "bd74228dca706ab4ab7d8b856ec6700624420831": { + "balance": "90000000000000000000000" + }, + "33bc5fb03008d7f0001638f48bfff2d628d16882": { + "balance": "90000000000000000000000" + }, + "ef826b2e0f6bf62edfe628dbeaa1af58f40f3b06": { + "balance": "90000000000000000000000" + }, + "7defc96deecc05288ff177ca08c025ed5c139a95": { + "balance": "90000000000000000000000" + }, + "2958DB51a0b4c458d0aa183E8cFB4f2E95cf6E75": { + "balance": "90000000000000000000000" + }, + "B460ce2C10d959251792D72b7E2B3EC684F013f1": { + "balance": "90000000000000000000000" + }, + "25848A733da7c782fB963D2e562cF7246bD5b6df": { + "balance": "90000000000000000000000" + } + } +} \ No newline at end of file diff --git a/ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/config/DiscoveryConfiguration.java b/ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/config/DiscoveryConfiguration.java index 3b42ab55b1d..e0fd3801cc1 100644 --- a/ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/config/DiscoveryConfiguration.java +++ b/ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/config/DiscoveryConfiguration.java @@ -204,6 +204,13 @@ public class DiscoveryConfiguration { .map(EnodeURL::fromString) .collect(toList())); + public static final List ASTOR_BOOTSTRAP_NODES = + Collections.unmodifiableList( + Stream.of( + "enode://b638fc3dca6181ae97fac2ea0157e8330f5ac8a20c0d4c63aa6f98dcbac4e35b4e023f656757b58c1da7a7b2be9ffad9342e0f769b8cf0f5e35ff73116ff7dfd@3.16.171.213:30303") + .map(EnodeURL::fromString) + .collect(toList())); + private boolean active = true; private String bindHost = NetworkUtility.INADDR_ANY; private int bindPort = 30303;