mirror of
https://github.com/vacp2p/linea-besu.git
synced 2026-01-09 21:17:54 -05:00
feat: Add network option for LUKSO Mainnet (#7223)
* Add option for LUKSO network Signed-off-by: Wolmin <lamonos123@gmail.com> * Add tests for LUKSO Signed-off-by: Wolmin <lamonos123@gmail.com> * Apply spotless Signed-off-by: Wolmin <lamonos123@gmail.com> * Add changelog entry Signed-off-by: Wolmin <lamonos123@gmail.com> * Fix duplicate func Signed-off-by: Wolmin <lamonos123@gmail.com> * Fix changelog Signed-off-by: Wolmin <lamonos123@gmail.com> * Add bootnodes to genesis Signed-off-by: Wolmin <lamonos123@gmail.com> --------- Signed-off-by: Wolmin <lamonos123@gmail.com> Signed-off-by: Wolmin <44748271+Wolmin@users.noreply.github.com>
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
- A full and up to date implementation of EOF for Prague [#7169](https://github.com/hyperledger/besu/pull/7169)
|
||||
- Add Subnet-Based Peer Permissions. [#7168](https://github.com/hyperledger/besu/pull/7168)
|
||||
- Reduce lock contention on transaction pool when building a block [#7180](https://github.com/hyperledger/besu/pull/7180)
|
||||
- Add LUKSO as predefined network name [#7223](https://github.com/hyperledger/besu/pull/7223)
|
||||
|
||||
### Bug fixes
|
||||
- Validation errors ignored in accounts-allowlist and empty list [#7138](https://github.com/hyperledger/besu/issues/7138)
|
||||
|
||||
@@ -28,6 +28,8 @@ public enum NetworkName {
|
||||
SEPOLIA("/sepolia.json", BigInteger.valueOf(11155111)),
|
||||
/** Holešky network name. */
|
||||
HOLESKY("/holesky.json", BigInteger.valueOf(17000)),
|
||||
/** LUKSO mainnet network name. */
|
||||
LUKSO("/lukso.json", BigInteger.valueOf(42)),
|
||||
|
||||
/** Dev network name. */
|
||||
DEV("/dev.json", BigInteger.valueOf(2018), false),
|
||||
|
||||
@@ -22,6 +22,7 @@ import static org.hyperledger.besu.cli.config.NetworkName.DEV;
|
||||
import static org.hyperledger.besu.cli.config.NetworkName.EXPERIMENTAL_EIPS;
|
||||
import static org.hyperledger.besu.cli.config.NetworkName.FUTURE_EIPS;
|
||||
import static org.hyperledger.besu.cli.config.NetworkName.HOLESKY;
|
||||
import static org.hyperledger.besu.cli.config.NetworkName.LUKSO;
|
||||
import static org.hyperledger.besu.cli.config.NetworkName.MAINNET;
|
||||
import static org.hyperledger.besu.cli.config.NetworkName.MORDOR;
|
||||
import static org.hyperledger.besu.cli.config.NetworkName.SEPOLIA;
|
||||
@@ -1747,6 +1748,22 @@ public class BesuCommandTest extends CommandTestAbstract {
|
||||
verify(mockLogger, never()).warn(contains("Holesky is deprecated and will be shutdown"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void luksoValuesAreUsed() {
|
||||
parseCommand("--network", "lukso");
|
||||
|
||||
final ArgumentCaptor<EthNetworkConfig> networkArg =
|
||||
ArgumentCaptor.forClass(EthNetworkConfig.class);
|
||||
|
||||
verify(mockControllerBuilderFactory).fromEthNetworkConfig(networkArg.capture(), any());
|
||||
verify(mockControllerBuilder).build();
|
||||
|
||||
assertThat(networkArg.getValue()).isEqualTo(EthNetworkConfig.getNetworkConfig(LUKSO));
|
||||
|
||||
assertThat(commandOutput.toString(UTF_8)).isEmpty();
|
||||
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void classicValuesAreUsed() {
|
||||
parseCommand("--network", "classic");
|
||||
|
||||
@@ -39,7 +39,7 @@ class NetworkDeprecationMessageTest {
|
||||
@EnumSource(
|
||||
value = NetworkName.class,
|
||||
names = {
|
||||
"MAINNET", "SEPOLIA", "DEV", "CLASSIC", "MORDOR", "HOLESKY",
|
||||
"MAINNET", "SEPOLIA", "DEV", "CLASSIC", "MORDOR", "HOLESKY", "LUKSO",
|
||||
})
|
||||
void shouldThrowErrorForNonDeprecatedNetworks(final NetworkName network) {
|
||||
assertThatThrownBy(() -> NetworkDeprecationMessage.generate(network))
|
||||
|
||||
852
config/src/main/resources/lukso.json
Normal file
852
config/src/main/resources/lukso.json
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user