Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename variables / Falcon integration License details #8

Merged
merged 2 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ default boolean isConsensusMigration() {
*
* @return block number of falcon signature precompiled verifier
*/
OptionalLong getLacchainPostQuantumBlockNumber();
OptionalLong getFalcon512BlockNumber();

/**
* Block number to activate Magneto on Classic networks.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,8 @@ public OptionalLong getThanosBlockNumber() {
}

@Override
public OptionalLong getLacchainPostQuantumBlockNumber() {
return getOptionalLong("lacchainpqblock");
public OptionalLong getFalcon512BlockNumber() {
return getOptionalLong("falcon512block");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class StubGenesisConfigOptions implements GenesisConfigOptions, Cloneable
private OptionalLong istanbulBlockNumber = OptionalLong.empty();
private OptionalLong muirGlacierBlockNumber = OptionalLong.empty();
private OptionalLong berlinBlockNumber = OptionalLong.empty();
private final OptionalLong lacchainPostQuantumBlockNumber = OptionalLong.empty();
private final OptionalLong falcon512BlockNumber = OptionalLong.empty();
private OptionalLong londonBlockNumber = OptionalLong.empty();
private OptionalLong arrowGlacierBlockNumber = OptionalLong.empty();
private OptionalLong grayGlacierBlockNumber = OptionalLong.empty();
Expand Down Expand Up @@ -308,8 +308,8 @@ public OptionalLong getThanosBlockNumber() {
}

@Override
public OptionalLong getLacchainPostQuantumBlockNumber() {
return lacchainPostQuantumBlockNumber;
public OptionalLong getFalcon512BlockNumber() {
return falcon512BlockNumber;
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion config/src/main/resources/dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"config": {
"chainId": 1337,
"londonBlock": 0,
"lacchainpqblock": 0,
"falcon512block": 0,
"contractSizeLimit": 2147483647,
"ethash": {
"fixeddifficulty": 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class Address extends DelegatingBytes {
/** The constant BLS12_MAP_FP2_TO_G2. */
public static final Address BLS12_MAP_FP2_TO_G2 = Address.precompiled(0x13);
/** Constant for Precompiled Falcon verification signature. */
public static final Address LACCHAIN_FALCON = Address.precompiled(0x14);
public static final Address FALCON512 = Address.precompiled(0x65);
/** The constant ZERO. */
public static final Address ZERO = Address.fromHexString("0x0");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright IADB.
* Copyright contributors to Hyperledger Besu
*
* 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
Expand All @@ -23,7 +23,7 @@
import java.util.Optional;
import java.util.OptionalInt;

public class LacchainProtocolSpecs {
public class Falcon512ProtocolSpecs {
public static ProtocolSpecBuilder postQuantumDefinition(
final Optional<BigInteger> chainId,
final OptionalInt contractSizeLimit,
Expand All @@ -37,13 +37,13 @@ public static ProtocolSpecBuilder postQuantumDefinition(
EvmConfiguration.DEFAULT)
.precompileContractRegistryBuilder(
precompiledContractConfiguration -> {
PrecompileContractRegistry lacchainContractsRegistry =
PrecompileContractRegistry falcon512ContractsRegistry =
MainnetPrecompiledContractRegistries.istanbul(precompiledContractConfiguration);
lacchainContractsRegistry.put(
Address.LACCHAIN_FALCON,
falcon512ContractsRegistry.put(
Address.FALCON512,
new FalconPrecompiledContract(
precompiledContractConfiguration.getGasCalculator()));
return lacchainContractsRegistry;
return falcon512ContractsRegistry;
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ public ProtocolSpecBuilder experimentalEipsDefinition(
evmConfiguration);
}

public ProtocolSpecBuilder lacchainDefinition() {
return LacchainProtocolSpecs.postQuantumDefinition(
public ProtocolSpecBuilder falcon512Definition() {
return Falcon512ProtocolSpecs.postQuantumDefinition(
chainId, contractSizeLimit, evmStackSize, isRevertReasonEnabled);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,7 @@ private Stream<Optional<BuilderMapEntry>> createMilestones(
config.getGrayGlacierBlockNumber(), specFactory.grayGlacierDefinition(config)),
blockNumberMilestone(
config.getMergeNetSplitBlockNumber(), specFactory.parisDefinition(config)),
blockNumberMilestone(
config.getLacchainPostQuantumBlockNumber(), specFactory.lacchainDefinition()),
blockNumberMilestone(config.getFalcon512BlockNumber(), specFactory.falcon512Definition()),
// Timestamp Forks
timestampMilestone(config.getShanghaiTime(), specFactory.shanghaiDefinition(config)),
timestampMilestone(config.getCancunTime(), specFactory.cancunDefinition(config)),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright IADB.
* Copyright contributors to Hyperledger Besu
*
* 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ConsenSys AG.
* Copyright contributors to Hyperledger Besu
*
* 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
Expand Down
Loading