Skip to content

Commit

Permalink
7732: Remove datagas related stuff in favour of blobgas (hyperledger#…
Browse files Browse the repository at this point in the history
…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>
Signed-off-by: gconnect <agatevureglory@gmail.com>
  • Loading branch information
Matilda-Clerke authored and gconnect committed Aug 26, 2024
1 parent 5cdc82c commit 64e18a7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/**
* 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,6 @@ public ReferenceTestBlockHeader(
@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,
Expand All @@ -195,12 +191,8 @@ public ReferenceTestBlockHeader(
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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ public 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();
Expand All @@ -123,9 +122,7 @@ public 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;
}

Expand Down

0 comments on commit 64e18a7

Please sign in to comment.