Skip to content

Commit

Permalink
Merge branch 'main' into releaseOnMultiTagged
Browse files Browse the repository at this point in the history
  • Loading branch information
jflo authored Apr 2, 2024
2 parents fcb24ea + 8ed9c74 commit c2841d9
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 141 deletions.
58 changes: 0 additions & 58 deletions .github/workflows/develop.yml

This file was deleted.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ def calculateVersion() {
} else {
// If no version is supplied or it doesn't match the semantic versioning, calculate from git
println("Generating project version as supplied is version not semver: ${project.version}")
def gitDetails = getGitCommitDetails(10) // Adjust length as needed
def gitDetails = getGitCommitDetails(7) // Adjust length as needed
return "${gitDetails.date}-develop-${gitDetails.hash}"
}
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@
*/
package org.hyperledger.besu.ethereum.core.feemarket;

import org.hyperledger.besu.datatypes.BlobGas;
import org.hyperledger.besu.datatypes.Wei;
import org.hyperledger.besu.ethereum.core.Transaction;

import java.math.BigInteger;
import java.util.Optional;

@FunctionalInterface
Expand All @@ -44,36 +42,4 @@ static TransactionPriceCalculator eip1559() {
return price;
};
}

// curiously named as in the spec
// https://eips.ethereum.org/EIPS/eip-4844#cryptographic-helpers
private static BigInteger fakeExponential(
final BigInteger factor, final BigInteger numerator, final BigInteger denominator) {
int i = 1;
BigInteger output = BigInteger.ZERO;
BigInteger numeratorAccumulator = factor.multiply(denominator);
while (numeratorAccumulator.signum() > 0) {
output = output.add(numeratorAccumulator);
numeratorAccumulator =
(numeratorAccumulator.multiply(numerator))
.divide(denominator.multiply(BigInteger.valueOf(i)));
++i;
}
return output.divide(denominator);
}

static TransactionPriceCalculator blobGas(
final int minBlobGasPrice,
final int blobGasPriceUpdateFraction,
final BlobGas excessBlobGas) {
return ((transaction, baseFee) -> {
final var blobGasPrice =
Wei.of(
fakeExponential(
BigInteger.valueOf(minBlobGasPrice),
excessBlobGas.toBigInteger(),
BigInteger.valueOf(blobGasPriceUpdateFraction)));
return blobGasPrice;
});
}
}

0 comments on commit c2841d9

Please sign in to comment.