Roberto Bayardo
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit
      • Invitee
      • No invitee
    • Publish Note

      Publish Note

      Everyone on the web can find and read all notes of this public team.
      Once published, notes can be searched and viewed by anyone online.
      See published notes
      Please check the box to agree to the Community Guidelines.
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit
Invitee
No invitee
Publish Note

Publish Note

Everyone on the web can find and read all notes of this public team.
Once published, notes can be searched and viewed by anyone online.
See published notes
Please check the box to agree to the Community Guidelines.
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
Roberto Bayardo July 23, 2023 In the last 4844 client devs sync it appeared teams were implementing different strategies for managing blob transactions in the transaction pool, or had not yet implemented any specialized strategies for blob transactions. This doc outlines some of the strategies that have been proposed in an attempt to drive some consistency among client implementations. The two areas in particular where it seems we lack consensus are transaction replacement rules for blob carrying transactions, and how to handle reorgs of blocks containing blob carrying transactions. Note that there is no requirement that implementations behave identically in these functions, but some consistency should allow for more predictable behavior and hence improved user experience. # Transaction Replacement A general concern around blob carrying transactions is that they are expensive both in bandwidth to propagate and in CPU for blob validation, providing new surface areas for potential denial of service attacks. One way transaction pools mitigate DoS concerns is through transaction replacement rules. The requirement for replacing a regular Ethereum transaction is at least a 10% bump in max-fee-per-gas and max-priority-fee-per-gas. Blob transactions involve not just regular gas but also data gas. What should the replacement rule be for blob transactions? **Option 1**: Treat them the same as regular transactions: min 10% increase in max-fee-per-gas and max-priority-fee-per-gas **Option 2**: Require additionally a min 10% increase in max-fee-per-data-gas. **Option 3**: Require a dramatically higher increase in the 3 fee values than 10% (say, 100%). Option 3 perhaps best captures the fact that blob transactions are more expensive to process than regular transactions. One concern however is that due to 1559-style pricing, increases in max-fee-per-gas and max-priority-fee-per-gas don't necessarily incur more cost on the transaction submitter. Only max-prioriy-fee-per-gas is subject to "actual price" rules. Suppose someone wants to DoS a node through resubmitting a blob transaction. They could start with a priority fee of 1 wei and resubmit the transaction repeatedly, bumping fees the minimum required amount each time. At 100% minimum increase, the attacker could resubmit 33 times and pay only about 10 gwei max-priority-fee-per-gas. A 10% increase allows for ~240 resubmissions for the same cost. Under option 1, the attacker could always keep min data fee much too low to allow for block inclusion, allowing the attack to continue almost indefinitely, and potentially without ever incurring any cost should the transaction eventually just expire from the mempool. Requiring a bump in max-fee-per-data-gas seems important, but our attacker might still be able to avoid any data-gas fees at all by submitting a non-blob carrying replacement transaction just before the blob transaction might get included in a block. We might therefore impose an additional replacement criteria: **Extra requirement #1**: Do not allow a blob carrying tx to be replaced by a non-blob carrying transaction. There are more strict versions of the above extra requirement we might also consider, such as do not allow a transaction carrying N blobs to be replaced with a transaction containing less than N blobs. Taken to the extreme, we might also forbid a blob carrying transaction to be replaced by any other transaction unless it contained the exact same blob payload. This would mean the txpool wouldn't ever have to perform blob payload validation for replacement transactions, greatly reducing DoS attack surface. Another potential DoS attack might involve an attacker who repeatedly submits a blob transaction, each with low max fee and max data fee, though bumping the nonce each time. Before the transactions could be eligible for block inclusion, the attacker could then submit a replacement for the first submitted transaction that invalidates all others, incurring only the cost of the final replacement transaction. None of the above options seem to offer much protection against this kind of attack, suggesting we might implement another requirement: **Extra Requirement #2:** do not allow more than one blob-carrying transaction per account in the mempool. # Blob Transactions and Reorgs Most transaction pools will re-inject transactions that are reorganized out of earlier blocks, even though it is not mandatory that they do so. This greatly reduces the need for users to monitor and possibly resubmit transactions that have entirely adequate fee settings for inclusion. In the case of blob transactions, implementing reinjection is more complicated since the execution layer does not hold onto blobs, only the blob hashes. In order to support reinjection of blob transactions, the transaction pool would have to cache blobs of recently seen blob transactions even after they were included in a block. An open question then is the following: **Open question**: Should transaction pool implementations be expected to cache blobs for some duration of time, or some number of blocks in order to support rebroadcasting? The challenge here is this requirement again increases the DoS surface area. We expect users of blob carrying transactions to be more sophisticated than most (e.g. layer 2 batch submitters). These systems could take advantage of specialized block builders that provide appropriate guarantees, so it's unclear if reinjecting should be expected of all/most transaction pools on the network. Nevertheless it seems desirable that most transaction pools at least try to rebroadcast blob transactions on a best effort basis, for example by at least maintaining a bounded size cache of blobs from recently included blob transactions. # Client Implementations TODO: for each client, describe how each currently handles blob transactions. **geth:** Geth's logic & rationale behind it are detailed here: https://github.com/ethereum/go-ethereum/pull/26940 * 100% min increase in max-fee-per-gas, max-priority-fee-per-gas, max-fee-per-data-gas. * The minimum priority fee is 1 gwei * A replacement blob tx cannot evict already pending ones with overdrafts * Normal and blob txs are mutually exclusive (across the entire nonce range). If on type is pooled, the other is rejected until the pool empties. I.e. you cannot replace a blob tx with a non-blob one. * Included blob txs are kept in limbo until finality to support resurrecting back into the pool on reorgs **erigon:** **nethermind:** **besu:** **nimbus-el:** **eth-js:**

Import from clipboard

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template is not available.
Upgrade
All
  • All
  • Team
No template found.

Create custom template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

How to use Slide mode

API Docs

Edit in VSCode

Install browser extension

Get in Touch

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Upgrade to Prime Plan

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

No updates to save
Compare with
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

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.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Upgrade

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Upgrade

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully