EIPs icon indicating copy to clipboard operation
EIPs copied to clipboard

Update EIP-4844: Fee Market Update

Open adietrichs opened this issue 2 years ago • 8 comments

Update to the EIP-4844 fee market design. List of changes:

  • [x] introduce data gas
  • [x] add max_fee_per_data_gas tx field
  • [x] change fake exponential function to taylor expansion
  • [x] add min data gasprice of 10,000 Gwei
  • [x] remove max blobs per tx restriction
  • [x] align tx field naming with EIP-1559

Potential remaining todos:

  • [ ] ~~make excess blobs calculation slot-based instead of block-based~~ will be a separate PR
  • [ ] mention option for mempool to enforce a max blobs per tx restriction
  • [ ] ~~change data gas name to something more unique (oil? mana?)~~ data gas it is
  • [x] change DATA_GAS_PER_BLOB to make it easier to add calldata pricing later
  • [ ] move data gas from static to dynamic tracking
  • [ ] update EIP structure and rationale to better explain data gas
  • [ ] specify that data gas fees are burned

adietrichs avatar Sep 22 '22 12:09 adietrichs

A critical exception has occurred: Message: pr 5707 is already merged; quitting (cc @alita-moore, @mryalamanchi)

eth-bot avatar Sep 22 '22 12:09 eth-bot

I would ideally want to add slot-based excess blob accounting to this PR, but that would mean that calc_excess_blobs would have to include some argument like slots_since_parent, which would introduce the notion of slots to the EL. Alternatively I could use time_since_parent or target_timestamp and calculate the number of slots internally, but then the EL would have to know to use fixed slot-based timestamp for those.

adietrichs avatar Sep 22 '22 13:09 adietrichs

oh, and I think "data gas" is sufficient and self explanatory as a name. Coming up with something clever will lead to endless bikeshedding

djrtwo avatar Sep 26 '22 21:09 djrtwo

FYI I'm starting to implement this to be part of our next EIP-4844 devnet, hopefully going out by end of week. I'll work around the open discussions best I can, though if some can be closed out in the short term please do so!

roberto-bayardo avatar Oct 04 '22 15:10 roberto-bayardo

@roberto-bayardo I made some more data gas related changes:

  • updated DATA_GASPRICE_UPDATE_FRACTION
  • updated DATA_GAS_PER_BLOB and MIN_DATA_GASPRICE
  • changed excess_blobs header field to excess_data_gas and adjusted update rules
  • changed TARGET_BLOBS_PER_BLOCK to TARGET_DATA_GAS_PER_BLOCK
  • changed MAX_BLOBS_PER_BLOCK to MAX_DATA_GAS_PER_BLOCK

With the exception of the header field, these should be relatively minor changes. Let me know whether you think it is realistic to include these into the next devnet release.

The only remaining planned update to this PR is optional from an implementation pov, it will move blob gas from static tracking (calculate blob gas usage before tx execution) to dynamic (track blob gas during tx execution). Those behaviors are fully equivalent for 4844 though, so any static tracking implementation should remain spec-compliant.

adietrichs avatar Oct 05 '22 21:10 adietrichs

We'll work on getting those in @adietrichs I think we can manage.

roberto-bayardo avatar Oct 05 '22 22:10 roberto-bayardo

@adietrichs don't see it in the spec, but I assume fees due to data gas are burned rather than go to validator?

roberto-bayardo avatar Oct 06 '22 21:10 roberto-bayardo

@adietrichs don't see it in the spec, but I assume fees due to data gas are burned rather than go to validator?

Ah, yes they are supposed to be burned. That's a good point though, that should of course be explicitly specified.

adietrichs avatar Oct 06 '22 21:10 adietrichs

@Pandapip1 friendly ping :-) If we could get this merged before tomorrow it would be great, as we have a 4844 implementers' call where we want to discuss the spec https://github.com/ethereum/pm/issues/647

timbeiko avatar Oct 24 '22 16:10 timbeiko

Micah's comments should be addressed.

Pandapip1 avatar Oct 25 '22 14:10 Pandapip1

Can I join with faith

Jiggnubs avatar Oct 26 '22 21:10 Jiggnubs

@Jiggnubs what do you mean by "join with faith?"

Pandapip1 avatar Oct 27 '22 12:10 Pandapip1

Set MIN_DATA_GASPRICE back to 1 as discussed on https://github.com/ethereum/pm/issues/647 (discussion about final value will be a separate PR). The PR is ready for merge from my side.

adietrichs avatar Oct 31 '22 16:10 adietrichs

I also removed most of the old mempool issues section as proposed by @Inphi and replaced it with a short updated version.

adietrichs avatar Oct 31 '22 16:10 adietrichs

Amazing work @adietrichs - thank you!

jessepollak avatar Oct 31 '22 22:10 jessepollak