7732: Remove datagas related stuff in favour of blobgas (#7353)

* 7732: Remove datagas related stuff in favour of blobgas

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

---------

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
pull/7374/head
Matilda-Clerke 4 months ago committed by GitHub
parent 30c96c7a1d
commit 0269d83f39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/txselection/selectors/BlobSizeTransactionSelector.java
  2. 12
      ethereum/referencetests/src/main/java/org/hyperledger/besu/ethereum/referencetests/BlockchainReferenceTestCaseSpec.java
  3. 5
      ethereum/referencetests/src/main/java/org/hyperledger/besu/ethereum/referencetests/StateTestVersionedTransaction.java

@ -26,7 +26,7 @@ import org.slf4j.LoggerFactory;
/**
* This class extends AbstractTransactionSelector and provides a specific implementation for
* evaluating transactions based on blobs size. It checks if a transaction supports blobs, and if
* so, checks that there is enough remaining data gas in the block to fit the blobs of the tx.
* so, checks that there is enough remaining blob gas in the block to fit the blobs of the tx.
*/
public class BlobSizeTransactionSelector extends AbstractTransactionSelector {
private static final Logger LOG = LoggerFactory.getLogger(BlobSizeTransactionSelector.class);

@ -165,10 +165,6 @@ public class BlockchainReferenceTestCaseSpec {
@JsonProperty("nonce") final String nonce,
@JsonProperty("withdrawalsRoot") final String withdrawalsRoot,
@JsonProperty("requestsRoot") final String requestsRoot,
@JsonProperty("dataGasUsed")
final String dataGasUsed, // TODO: remove once reference tests have been updated
@JsonProperty("excessDataGas")
final String excessDataGas, // TODO: remove once reference tests have been updated
@JsonProperty("blobGasUsed") final String blobGasUsed,
@JsonProperty("excessBlobGas") final String excessBlobGas,
@JsonProperty("parentBeaconBlockRoot") final String parentBeaconBlockRoot,
@ -195,12 +191,8 @@ public class BlockchainReferenceTestCaseSpec {
Hash.fromHexString(mixHash), // mixHash
Bytes.fromHexStringLenient(nonce).toLong(),
withdrawalsRoot != null ? Hash.fromHexString(withdrawalsRoot) : null,
dataGasUsed != null
? Long.decode(dataGasUsed)
: blobGasUsed != null ? Long.decode(blobGasUsed) : 0,
excessDataGas != null
? BlobGas.fromHexString(excessDataGas)
: excessBlobGas != null ? BlobGas.fromHexString(excessBlobGas) : null,
blobGasUsed != null ? Long.decode(blobGasUsed) : 0,
excessBlobGas != null ? BlobGas.fromHexString(excessBlobGas) : null,
parentBeaconBlockRoot != null ? Bytes32.fromHexString(parentBeaconBlockRoot) : null,
requestsRoot != null ? Hash.fromHexString(requestsRoot) : null,
new BlockHeaderFunctions() {

@ -103,7 +103,6 @@ public class StateTestVersionedTransaction {
@JsonDeserialize(using = StateTestAccessListDeserializer.class) @JsonProperty("accessLists")
final List<List<AccessListEntry>> maybeAccessLists,
@JsonProperty("maxFeePerBlobGas") final String maxFeePerBlobGas,
@JsonProperty("maxFeePerDataGas") final String maxFeePerDataGas,
@JsonProperty("blobVersionedHashes") final List<String> blobVersionedHashes) {
this.nonce = Bytes.fromHexStringLenient(nonce).toLong();
@ -123,9 +122,7 @@ public class StateTestVersionedTransaction {
this.payloads = parseArray(data, Bytes::fromHexString);
this.maybeAccessLists = Optional.ofNullable(maybeAccessLists);
this.maxFeePerBlobGas =
Optional.ofNullable(maxFeePerBlobGas == null ? maxFeePerDataGas : maxFeePerBlobGas)
.map(Wei::fromHexString)
.orElse(null);
Optional.ofNullable(maxFeePerBlobGas).map(Wei::fromHexString).orElse(null);
this.blobVersionedHashes = blobVersionedHashes;
}

Loading…
Cancel
Save