File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,24 @@ package blobpool
26
26
// allowed in the current protocol, having an empty shelf is not a relevant use
27
27
// of resources, but it makes stress testing with junk transactions simpler.
28
28
func newSlotter (maxBlobsPerTransaction int ) func () (uint32 , bool ) {
29
+ slotsize := uint32 (txAvgSize )
30
+ slotsize -= uint32 (blobSize ) // underflows, it's ok, will overflow back in the first return
31
+
32
+ return func () (size uint32 , done bool ) {
33
+ slotsize += blobSize
34
+ finished := slotsize > uint32 (maxBlobsPerTransaction )* blobSize + txMaxSize
35
+
36
+ return slotsize , finished
37
+ }
38
+ }
39
+
40
+ // newSlotterEIP7594 creates a different slotter for EIP-7594 transactions.
41
+ // EIP-7594 (PeerDAS) changes the median transaction size which means the current
42
+ // static 4KB average size is not enough anymore.
43
+ // This slotter adds a dynamic overhead component to the slotter, which also
44
+ // captures the notion that blob transactions with more blobs are also more likely to
45
+ // to have more calldata.
46
+ func newSlotterEIP7594 (maxBlobsPerTransaction int ) func () (uint32 , bool ) {
29
47
slotsize := uint32 (txAvgSize )
30
48
slotsize -= uint32 (blobSize ) + txBlobOverhead // underflows, it's ok, will overflow back in the first return
31
49
You can’t perform that action at this time.
0 commit comments