Skip to content

Commit

Permalink
javadoc comments required for publish tasks (hyperledger#10)
Browse files Browse the repository at this point in the history
Signed-off-by: garyschulte <[email protected]>
  • Loading branch information
garyschulte authored May 10, 2023
1 parent fcc9cca commit 3730f29
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public enum NetworkName {
KOTTI("/kotti.json", BigInteger.valueOf(6)),
/** Mordor network name. */
MORDOR("/mordor.json", BigInteger.valueOf(7)),

/** Linea l2 network name */
LINEA("/linea.json", BigInteger.valueOf(59140), false);

private final String genesisFile;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@

import picocli.CommandLine;

/**
* Linea CLI options.
*/
public class LineaOptions implements CLIOptions<LineaParameters> {
private static final String TRANSACTION_MAX_CALLDATA_SIZE = "--Xtransaction-max-calldata-size";
private static final String BLOCK_MAX_CALLDATA_SIZE = "--Xblock-max-calldata-size";
;

/**
* Create linea options.
*
* @return the linea options
*/
public static LineaOptions create() {
return new LineaOptions();
}
Expand All @@ -34,10 +41,20 @@ public static LineaOptions create() {
"If specified, overrides the max size in bytes of the sum of all transaction calldata fields contained in a block, specified by the current hard fork")
private Integer blockMaxCalldataSize;

/**
* Linea max transaction calldata size.
*
* @return optional max transaction calldata size.
*/
public Optional<Integer> getTransactionMaxCalldataSize() {
return Optional.ofNullable(transactionMaxCalldataSize);
}

/**
* Linea max block calldata size.
*
* @return optional max block calldata size.
*/
public Optional<Integer> getBlockMaxCalldataSize() {
return Optional.ofNullable(blockMaxCalldataSize);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,11 @@ public PluginServiceFactory getAdditionalPluginServices() {
return additionalPluginServices;
}

/**
* Gets linea-specific parameters
*
* @return configured LineaParameters
*/
public LineaParameters getLineaParameters() {
return lineaParameters;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public abstract class BesuControllerBuilder implements MiningParameterOverrides
protected ObservableMetricsSystem metricsSystem;
/** The Privacy parameters. */
protected PrivacyParameters privacyParameters;

/** The Linea parameters. */
protected LineaParameters lineaParameters = LineaParameters.DEFAULT;
/** The Pki block creation configuration. */
protected Optional<PkiBlockCreationConfiguration> pkiBlockCreationConfiguration =
Expand Down Expand Up @@ -1106,6 +1106,11 @@ protected List<PeerValidator> createPeerValidators(final ProtocolSchedule protoc
protected abstract PluginServiceFactory createAdditionalPluginServices(
final Blockchain blockchain, final ProtocolContext protocolContext);

/**
* Setter for LineaParameters .
* @param lineaParameters linea params to add to controller builder.
* @return the controller builder.
*/
public BesuControllerBuilder lineaParameters(final LineaParameters lineaParameters) {
this.lineaParameters = lineaParameters;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ default boolean isConsensusMigration() {
*/
OptionalLong getMergeNetSplitBlockNumber();

/**
* Gets linea block number.
*
* @return the merge net split block number
*/
OptionalLong getLineaBlockNumber();
/**
* Gets shanghai time.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,12 @@ public StubGenesisConfigOptions mergeNetSplitBlock(final long blockNumber) {
return this;
}

/**
* Linea stub genesis config options.
*
* @param blockNumber the block number
* @return the stub genesis config options
*/
public StubGenesisConfigOptions lineaBlock(final long blockNumber) {
lineaBlockNumber = OptionalLong.of(blockNumber);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public static ProtocolSchedule create(
* @param config the config
* @param privacyParameters the privacy parameters
* @param isRevertReasonEnabled the is revert reason enabled
* @param lineaParameters parameters for linea
* @return the protocol schedule
*/
public static ProtocolSchedule create(
Expand Down

0 comments on commit 3730f29

Please sign in to comment.