mirror of
https://github.com/vacp2p/linea-besu.git
synced 2026-01-09 21:17:54 -05:00
build: Add default constructor and javadoc (#7062)
* javadoc - Adding default constructor and javadoc for :config * javadoc - Adding default constructor and javadoc for :consensus:clique * javadoc - Adding default constructor and javadoc for :consensus:common --------- Signed-off-by: Usman Saleem <usman@usmans.info> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
This commit is contained in:
@@ -34,6 +34,8 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
|
||||
/** The Json util class. */
|
||||
public class JsonUtil {
|
||||
/** Default constructor. */
|
||||
private JsonUtil() {}
|
||||
|
||||
/**
|
||||
* Converts all the object keys (but none of the string values) to lowercase for easier lookup.
|
||||
|
||||
@@ -20,6 +20,9 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
public class MergeConfigOptions {
|
||||
private static final AtomicBoolean mergeEnabled = new AtomicBoolean(false);
|
||||
|
||||
/** Default constructor. */
|
||||
private MergeConfigOptions() {}
|
||||
|
||||
/**
|
||||
* Enables merge.
|
||||
*
|
||||
|
||||
@@ -80,6 +80,9 @@ public class StubGenesisConfigOptions implements GenesisConfigOptions, Cloneable
|
||||
private boolean zeroBaseFee = false;
|
||||
private boolean fixedBaseFee = false;
|
||||
|
||||
/** Default constructor. */
|
||||
public StubGenesisConfigOptions() {}
|
||||
|
||||
@Override
|
||||
public StubGenesisConfigOptions clone() {
|
||||
try {
|
||||
|
||||
@@ -44,6 +44,8 @@ import com.google.common.annotations.VisibleForTesting;
|
||||
|
||||
/** The Block header validation ruleset factory. */
|
||||
public class BlockHeaderValidationRulesetFactory {
|
||||
/** Default constructor. */
|
||||
private BlockHeaderValidationRulesetFactory() {}
|
||||
|
||||
/**
|
||||
* Creates a set of rules which when executed will determine if a given block header is valid with
|
||||
|
||||
@@ -27,6 +27,9 @@ import org.apache.tuweni.bytes.Bytes;
|
||||
|
||||
/** The Clique block hashing. */
|
||||
public class CliqueBlockHashing {
|
||||
/** Default constructor. */
|
||||
private CliqueBlockHashing() {}
|
||||
|
||||
/**
|
||||
* Constructs a hash of the block header, suitable for use when creating the proposer seal. The
|
||||
* extra data is modified to have a null proposer seal and empty list of committed seals.
|
||||
|
||||
@@ -21,6 +21,8 @@ import org.hyperledger.besu.ethereum.mainnet.MainnetBlockHeaderFunctions;
|
||||
|
||||
/** The Clique block header functions. */
|
||||
public class CliqueBlockHeaderFunctions implements BlockHeaderFunctions {
|
||||
/** Default constructor. */
|
||||
public CliqueBlockHeaderFunctions() {}
|
||||
|
||||
@Override
|
||||
public Hash hash(final BlockHeader header) {
|
||||
|
||||
@@ -44,6 +44,9 @@ public class CliqueBlockInterface implements BlockInterface {
|
||||
VoteType.ADD, ADD_NONCE,
|
||||
VoteType.DROP, DROP_NONCE);
|
||||
|
||||
/** Default constructor. */
|
||||
public CliqueBlockInterface() {}
|
||||
|
||||
@Override
|
||||
public Address getProposerOfBlock(final BlockHeader header) {
|
||||
return CliqueHelpers.getProposerOfBlock(header);
|
||||
|
||||
@@ -24,6 +24,8 @@ import org.hyperledger.besu.consensus.common.ForksScheduleFactory;
|
||||
|
||||
/** The Clique forks schedules factory. */
|
||||
public class CliqueForksSchedulesFactory {
|
||||
/** Default constructor. */
|
||||
CliqueForksSchedulesFactory() {}
|
||||
|
||||
/**
|
||||
* Create forks schedule.
|
||||
|
||||
@@ -27,6 +27,8 @@ import java.util.Comparator;
|
||||
|
||||
/** The Clique helpers. */
|
||||
public class CliqueHelpers {
|
||||
/** Default constructor. */
|
||||
CliqueHelpers() {}
|
||||
|
||||
/**
|
||||
* Gets proposer of block.
|
||||
|
||||
@@ -50,6 +50,9 @@ public class CliqueProtocolSchedule {
|
||||
|
||||
private static final BigInteger DEFAULT_CHAIN_ID = BigInteger.valueOf(4);
|
||||
|
||||
/** Default constructor. */
|
||||
CliqueProtocolSchedule() {}
|
||||
|
||||
/**
|
||||
* Create protocol schedule.
|
||||
*
|
||||
|
||||
@@ -31,6 +31,9 @@ public class CliqueDifficultyValidationRule implements AttachedBlockHeaderValida
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(CliqueDifficultyValidationRule.class);
|
||||
|
||||
/** Default constructor. */
|
||||
public CliqueDifficultyValidationRule() {}
|
||||
|
||||
@Override
|
||||
public boolean validate(
|
||||
final BlockHeader header, final BlockHeader parent, final ProtocolContext protocolContext) {
|
||||
|
||||
@@ -26,6 +26,9 @@ public class CliqueNoEmptyBlockValidationRule implements DetachedBlockHeaderVali
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(CliqueNoEmptyBlockValidationRule.class);
|
||||
|
||||
/** Default constructor. */
|
||||
public CliqueNoEmptyBlockValidationRule() {}
|
||||
|
||||
/**
|
||||
* Responsible for ensuring there are no empty transactions. This is used when createEmptyBlocks
|
||||
* is false, to ensure that no empty blocks are created.
|
||||
|
||||
@@ -28,6 +28,9 @@ public class SignerRateLimitValidationRule implements AttachedBlockHeaderValidat
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SignerRateLimitValidationRule.class);
|
||||
|
||||
/** Default constructor. */
|
||||
public SignerRateLimitValidationRule() {}
|
||||
|
||||
@Override
|
||||
public boolean validate(
|
||||
final BlockHeader header, final BlockHeader parent, final ProtocolContext protocolContext) {
|
||||
|
||||
@@ -26,6 +26,9 @@ public class VoteValidationRule implements DetachedBlockHeaderValidationRule {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(VoteValidationRule.class);
|
||||
|
||||
/** Default constructor. */
|
||||
public VoteValidationRule() {}
|
||||
|
||||
/**
|
||||
* Responsible for ensuring the nonce is either auth or drop.
|
||||
*
|
||||
|
||||
@@ -28,6 +28,8 @@ import java.util.function.Predicate;
|
||||
|
||||
/** The Combined protocol schedule factory. */
|
||||
public class CombinedProtocolScheduleFactory {
|
||||
/** Default constructor. */
|
||||
public CombinedProtocolScheduleFactory() {}
|
||||
|
||||
/**
|
||||
* Create protocol schedule.
|
||||
|
||||
@@ -18,6 +18,8 @@ import org.apache.tuweni.bytes.Bytes;
|
||||
|
||||
/** The Consensus helpers. */
|
||||
public class ConsensusHelpers {
|
||||
/** Default constructor. */
|
||||
private ConsensusHelpers() {}
|
||||
|
||||
/**
|
||||
* Zero left pad bytes.
|
||||
|
||||
@@ -43,6 +43,9 @@ public class ForksScheduleFactory {
|
||||
T create(ForkSpec<T> lastSpec, U fork);
|
||||
}
|
||||
|
||||
/** Default constructor. */
|
||||
private ForksScheduleFactory() {}
|
||||
|
||||
/**
|
||||
* Create forks schedule.
|
||||
*
|
||||
|
||||
@@ -43,6 +43,9 @@ public abstract class BaseBftProtocolScheduleBuilder {
|
||||
|
||||
private static final BigInteger DEFAULT_CHAIN_ID = BigInteger.ONE;
|
||||
|
||||
/** Default constructor. */
|
||||
protected BaseBftProtocolScheduleBuilder() {}
|
||||
|
||||
/**
|
||||
* Create protocol schedule.
|
||||
*
|
||||
|
||||
@@ -38,6 +38,9 @@ public abstract class BftExtraDataCodec {
|
||||
/** The constant EXTRA_VANITY_LENGTH. */
|
||||
public static int EXTRA_VANITY_LENGTH = 32;
|
||||
|
||||
/** Default constructor. */
|
||||
public BftExtraDataCodec() {}
|
||||
|
||||
/**
|
||||
* Encode.
|
||||
*
|
||||
|
||||
@@ -30,6 +30,9 @@ public class BftHelpers {
|
||||
public static final Hash EXPECTED_MIX_HASH =
|
||||
Hash.fromHexString("0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365");
|
||||
|
||||
/** Default constructor. */
|
||||
private BftHelpers() {}
|
||||
|
||||
/**
|
||||
* Calculate required validator quorum int.
|
||||
*
|
||||
|
||||
@@ -18,6 +18,9 @@ import org.hyperledger.besu.ethereum.p2p.rlpx.wire.Message;
|
||||
|
||||
/** Static helper functions for producing and working with BftEvent objects */
|
||||
public class BftEvents {
|
||||
/** Default constructor. */
|
||||
private BftEvents() {}
|
||||
|
||||
/**
|
||||
* Instantiate BftEvent From message.
|
||||
*
|
||||
|
||||
@@ -33,6 +33,9 @@ public class BftCoinbaseValidationRule implements AttachedBlockHeaderValidationR
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(BftCoinbaseValidationRule.class);
|
||||
|
||||
/** Default constructor. */
|
||||
public BftCoinbaseValidationRule() {}
|
||||
|
||||
@Override
|
||||
public boolean validate(
|
||||
final BlockHeader header, final BlockHeader parent, final ProtocolContext context) {
|
||||
|
||||
@@ -40,6 +40,9 @@ public class BftCommitSealsValidationRule implements AttachedBlockHeaderValidati
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(BftCommitSealsValidationRule.class);
|
||||
|
||||
/** Default constructor. */
|
||||
public BftCommitSealsValidationRule() {}
|
||||
|
||||
@Override
|
||||
public boolean validate(
|
||||
final BlockHeader header, final BlockHeader parent, final ProtocolContext protocolContext) {
|
||||
|
||||
@@ -38,6 +38,9 @@ public class BftValidatorsValidationRule implements AttachedBlockHeaderValidatio
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(BftValidatorsValidationRule.class);
|
||||
|
||||
/** Default constructor. */
|
||||
public BftValidatorsValidationRule() {}
|
||||
|
||||
@Override
|
||||
public boolean validate(
|
||||
final BlockHeader header, final BlockHeader parent, final ProtocolContext context) {
|
||||
|
||||
@@ -29,6 +29,9 @@ public class BftVanityDataValidationRule implements AttachedBlockHeaderValidatio
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(BftVanityDataValidationRule.class);
|
||||
|
||||
/** Default constructor. */
|
||||
public BftVanityDataValidationRule() {}
|
||||
|
||||
@Override
|
||||
public boolean validate(
|
||||
final BlockHeader header, final BlockHeader parent, final ProtocolContext protocolContext) {
|
||||
|
||||
@@ -22,6 +22,8 @@ import java.util.Collection;
|
||||
|
||||
/** The type Validation helpers. */
|
||||
public class ValidationHelpers {
|
||||
/** Default constructor. */
|
||||
private ValidationHelpers() {}
|
||||
|
||||
/**
|
||||
* Has duplicate authors.
|
||||
|
||||
Reference in New Issue
Block a user