or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
References
Notes on Blob Gas Pricing & Capacity
As of now, 1 Byte of Blob Storage can cost at minimum 1 Gwei, and each Blob can contain up to 4096 fields of 32 Bytes each, giving a total of 128kB per Blob. The limit on throughput derives from the maximum blob gas that can be spent per block, which is equivalent to 6 blobs on unit price, or 768kB for a 1 Gwei price.
In practice, using all possible blob capacity is only feasible if the blob gas price is at its minimum, as block usage above (or below) the target (which is set to 3 blobs per block, or 384kB) will change the price according to:
\[ \begin{align} \Delta b_{t} &= b_t - \hat{b} \\ \Sigma_{\Delta b_t} &= \max(\Sigma_{\Delta b_{t-1}} + \Delta b_{t}, 0) \\ p_{t+1} &= p_{b}^- e^{\frac{\Sigma_{\Delta b_t}}{\alpha}}\\ \end{align} \]
Where \(\hat b=393216\) (or 384kB) is the Target Blob Gas per Block, \(\Delta b\) is the Immediate Excess Blob Gas, \(\Sigma_{\Delta b_t}\) is the Excess Blob Gas, \(\alpha=3338477\) is the Blob Gas Price Updation Fraction and \(p_{b}^-=1\) is the Minimum Blob Gas Price.
In terms of dynamics, some insights can be gained through simulations. Some figures have been generated below and there's a simulation here.
Considering that the average L1 block time is 12s, this mechanism creates a cap on the sustained network-wide blob-gas usage throughput that is equal to the target blob-gas divided by the block time, which is approximately
32.0 kB/s
, or1.9 MB/min
, or112.5 MB/h
, or2.6 GB/day
. Higher throughputs can only be achieved temporarily and will require intervals with lower throughputs afterwards in order to off-set it. "Resetting" the price and therefore the throughput can require several blocks (eg. 10 blocks, or ~2min), although this is unbounded and could potentially be an attack vector through forced congestion.It is uncertain how much blob storage other applications will want to use.
The figures below demonstrates the Blob Gas Pricing behaviour under different relative usage scenarios, all of whom which starts with an Blob Gas Price of 1. The blue line indicates the maximum blob storage per block as based on the blob gas price, and the red line indicates the price itself.
The upper-left figure is what happens when 100% of the maximum blob storage is used since the beginning until the blob storage usage goes to 0% on
block_time=75
. Note that the recovery requires about ~50 blocks to happen. The lower-left figure is what happens when 60% of the maximum blob storage is used and then being interrupted atblock_time=75
. This time the recovery is faster: around ~20 blocks.The right figures is when the usage is an random value between 100% and 0% of the maximum. The upper-right is an standard uniform distribution (eg. the average relative usage is 50%, or the target usage). There's an trend on it to increase and long intervals without recovery, which is partially generated by the impossibility of having negative excess bytes. Lastly the lower-right is an uniformed squared distribution (eg. the average relative usage is 25%, half the target usage) and it is sucessful in making the maximum available storage close to the theoretical maximum most of the time.
It is uncertain what the actual blob storage distribution is going to be, but given the initially relatively low prices and the fact that most users are expected to be constant throughput, it is not hard to imagine that congestions could become an common issue initially, especially considering the reinforcing feedback loop of more usage leading to more price which leads to less available storage and therefore more usage because of delays.
Highlights & Notes from the References
return GAS_PER_BLOB * len(tx.blob_versioned_hashes)
GAS_PER_BLOB = 2**17
, or 131,072 Gas per Blob. Assuming that an blob uses the full space, then this implies 1 Gas per Byte of Blob.