Skip to content

Commit

Permalink
nuisance javadoc
Browse files Browse the repository at this point in the history
Signed-off-by: garyschulte <[email protected]>
  • Loading branch information
garyschulte committed Jan 23, 2025
1 parent 73b29e1 commit 5199cf6
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,27 @@ public static void setPrecompileCaching(final boolean enablePrecompileCaching) {
enableResultCaching = enablePrecompileCaching;
}

/**
* enum for precompile cache metric
*/
public enum CacheMetric {
/** a successful cache hit metric */
HIT,
/** a cache miss metric */
MISS,
/** a false positive cache hit metric */
FALSE_POSITIVE
}

/**
* record type used for cache event
* @param precompile precompile name
* @param cacheMetric cache metric type (hit, miss, false positive).
*/
public record CacheEvent(String precompile, CacheMetric cacheMetric) {}

public static Consumer<CacheEvent> cacheEventConsumer = __ -> {};

static Consumer<CacheEvent> cacheEventConsumer = __ -> {};

/**
* Set an optional cache event consumer, such as a metrics system logger.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
public class AltBN128AddPrecompiledContract extends AbstractAltBnPrecompiledContract {

private static final int PARAMETER_LENGTH = 128;
public static final String PRECOMPILE_NAME = "AltBN128Add";
private static final String PRECOMPILE_NAME = "AltBN128Add";

private final long gasCost;
private static final Cache<Integer, PrecompileInputResultTuple> bnAddCache =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
public class AltBN128MulPrecompiledContract extends AbstractAltBnPrecompiledContract {

private static final int PARAMETER_LENGTH = 96;
public static final String PRECOMPILE_NAME = "AltBN128Mul";
private static final String PRECOMPILE_NAME = "AltBN128Mul";

private static final BigInteger MAX_N =
new BigInteger(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class AltBN128PairingPrecompiledContract extends AbstractAltBnPrecompiled

private static final int FIELD_LENGTH = 32;
private static final int PARAMETER_LENGTH = 192;
public static final String PRECOMPILE_NAME = "AltBN128Pairing";
private static final String PRECOMPILE_NAME = "AltBN128Pairing";
private static final Cache<Integer, PrecompileInputResultTuple> bnPairingCache =
Caffeine.newBuilder()
.maximumWeight(16_000_000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
public class BLAKE2BFPrecompileContract extends AbstractPrecompiledContract {

private static final Logger LOG = LoggerFactory.getLogger(BLAKE2BFPrecompileContract.class);
public static final String PRECOMPILE_NAME = "BLAKE2f";
private static final String PRECOMPILE_NAME = "BLAKE2f";
private static final Cache<Integer, PrecompileInputResultTuple> blakeCache =
Caffeine.newBuilder().maximumSize(1000).build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class ECRECPrecompiledContract extends AbstractPrecompiledContract {
private static final Logger LOG = LoggerFactory.getLogger(ECRECPrecompiledContract.class);
private static final int V_BASE = 27;
final SignatureAlgorithm signatureAlgorithm;
public static final String PRECOMPILE_NAME = "ECREC";
private static final String PRECOMPILE_NAME = "ECREC";
private static final Cache<Integer, PrecompileInputResultTuple> ecrecCache =
Caffeine.newBuilder().maximumSize(1000).build();

Expand Down

0 comments on commit 5199cf6

Please sign in to comment.