Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes required for EIP-7742 #574

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ralexstokes
Copy link
Member

@ralexstokes ralexstokes commented Aug 21, 2024

see motivation etc here: ethereum/consensus-specs#3800

Copy link
Contributor

@g11tech g11tech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@g11tech
Copy link
Contributor

g11tech commented Oct 19, 2024

actually i think we might need to add baseFeePerBlobGas in beacon's execution header and hence the api field, because the blob gas price can't just be now : minFee* e^(ecessBlobGasg/blobGasPriceUpdateFraction) since blobGasPriceUpdateFraction (for limiting change 1+-1.125 factor) could change block to block.

so we should return to the normal pricing mechanism like basefee, so blobBaseFee = parent.blobBaseFee * e^((blobGasUsed - targetBlobGas)/blockAdjustedTargetFraction))

where blockAdjustedTargetFraction makes sure fee doesn't "change" by 1.125 either direction and is calculated block to block.

so in EL block header, we now remove excessBlobGas and add three fields: baseFeePerBlobGas, targetBlobGas and maxBlobGas (since we don't want this to be a hardfork based setting anymore as well, and don't want to keep a static fraction between target and max for better control over the blob throughput and bandwidth params), and beacon execution header we just add baseFeePerBlobGas

if it makes sense i could update the EIP 7742 with the gas calc changes and introducing the new fields

@siladu
Copy link

siladu commented Oct 28, 2024

Updated eth Block schema as well: #601

@@ -103,6 +108,18 @@ This structure has the syntax of [`ExecutionPayloadBodyV1`](./shanghai.md#execut
- `withdrawalRequests`: `Array of WithdrawalRequestV1` - Array of withdrawal requests, each object is an `OBJECT` containing the fields of a `WithdrawalRequestV1` structure.
- `consolidationRequests`: `Array of ConsolidationRequestV1` - Array of consolidation requests, each object is an `OBJECT` containing the fields of a `ConsolidationRequestV1` structure.

### PayloadAttributesV4

This structure has the syntax of `PayloadAttributesV3` and appends the fields: `targetBlobCount`, `maximumBlobCount`.
Copy link
Member

@ppopth ppopth Oct 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This structure has the syntax of `PayloadAttributesV3` and appends the fields: `targetBlobCount`, `maximumBlobCount`.
This structure has the syntax of `PayloadAttributesV3` and appends the fields: `targetBlobsPerBlock`, `maxBlobsPerBlock`.

Comment on lines +120 to +121
- `targetBlobCount`: `QUANTITY`, 64 Bits - Average number of blobs to include per payload.
- `maximumBlobCount`: `QUANTITY`, 64 Bits - Maximum number of blobs allowed per payload.
Copy link
Member

@ppopth ppopth Oct 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `targetBlobCount`: `QUANTITY`, 64 Bits - Average number of blobs to include per payload.
- `maximumBlobCount`: `QUANTITY`, 64 Bits - Maximum number of blobs allowed per payload.
- `targetBlobsPerBlock`: `QUANTITY`, 64 Bits - Average number of blobs to include per payload.
- `maxBlobsPerBlock`: `QUANTITY`, 64 Bits - Maximum number of blobs allowed per payload.

@@ -116,6 +133,7 @@ The request of this method is updated with [`ExecutionPayloadV4`](#ExecutionPayl
1. `executionPayload`: [`ExecutionPayloadV4`](#ExecutionPayloadV4).
2. `expectedBlobVersionedHashes`: `Array of DATA`, 32 Bytes - Array of expected blob versioned hashes to validate.
3. `parentBeaconBlockRoot`: `DATA`, 32 Bytes - Root of the parent beacon block.
4. `targetBlobCount`: `QUANTITY`, 64 Bits - Average number of blobs to include per payload.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. `targetBlobCount`: `QUANTITY`, 64 Bits - Average number of blobs to include per payload.
4. `targetBlobsPerBlock`: `QUANTITY`, 64 Bits - Average number of blobs to include per payload.


#### Response

Refer to the response for [`engine_forkchoiceUpdatedV3`](./shanghai.md#engine_forkchoiceupdatedv3).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Refer to the response for [`engine_forkchoiceUpdatedV3`](./shanghai.md#engine_forkchoiceupdatedv3).
Refer to the response for [`engine_forkchoiceUpdatedV3`](./cancun.md#engine_forkchoiceupdatedv3).


#### Specification

This method follows the same specification as [`engine_forkchoiceUpdatedV3`](./shanghai.md#engine_forkchoiceupdatedv3).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This method follows the same specification as [`engine_forkchoiceUpdatedV3`](./shanghai.md#engine_forkchoiceupdatedv3).
This method follows the same specification as [`engine_forkchoiceUpdatedV3`](./cancun.md#engine_forkchoiceupdatedv3).


Refer to the response for [`engine_forkchoiceUpdatedV3`](./shanghai.md#engine_forkchoiceupdatedv3).

#### Specification
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this state that for payloadAttributes, timestamp must be within Prague hardfork?

@klkvr klkvr mentioned this pull request Oct 31, 2024
3 tasks
@ensi321
Copy link
Contributor

ensi321 commented Nov 19, 2024

Would probably want to rebase this so that targetBlobsPerBlock(targetBlobCount?) is placed after executionRequests in the param of engine_newPayloadV4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants