Skip to content

Commit

Permalink
Add EIP-4844-B
Browse files Browse the repository at this point in the history
  • Loading branch information
dapplion committed Sep 10, 2024
1 parent 183f0d5 commit cee12f7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
6 changes: 4 additions & 2 deletions network-upgrades/dencun.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,20 @@ Note: The trusted setup required for [deneb's cryptography](https://github.com/e

### [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844)

Gnosis chain has slots significantly faster than Ethereum. Bigger blocks _could_ have a higher cost to the network than Ethereum so we may price blobs differently. Ethereum mainnet has chosen a target of 3 blobs from real live experiments on mainnet with big blocks. Consecuently this parameters may not be adecuate.
Gnosis chain has slots significantly faster than Ethereum. Bigger blocks have a higher cost to the network than Ethereum so we reduce the blob count per block to a safer value. price blobs differently. Ethereum mainnet has chosen a target of 3 blobs from real live experiments on mainnet with big blocks. Consecuently this parameters may not be adecuate. We ran a big blocks experiment that informed the chosen parameters. See this [research doc](../research/dencun/eip-4844.md) for details on the experiment.

Gnosis chain has significantly cheaper fees than mainnet, so blob spam is a concern. Ethereum's `MIN_BLOB_GASPRICE` makes blob space free (1e-18 USD / blob) if usage is under the target for a sustained period of time. The same concern applies to Ethereum, but consensus is that choosing a specific value that may apply to only some market conditions and not others. Given that Gnosis native token is a stable coin, this concerns are mitigated. Given usage under target for regular txs and blob data, setting min blob gas price to 1 GWei reduces the cost per byte by a factor of 16.

Note that the blob gas fee is burned as defined by [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) spec. Gnosis adaptation of EIP-1559 collects transaction base fees on a predefined address. This behaviour will apply on blob gas fees on the next fork [pectra](../pectra.md).

| Constant | Value |
| -------- | ----- |
| MIN_BLOB_GASPRICE | 1000000000 |
| TARGET_BLOB_GAS_PER_BLOCK | 131072 |
| MAX_BLOB_GAS_PER_BLOCK | 262144 |
| BLOB_GASPRICE_UPDATE_FRACTION | 1112826 |

See [rationale](../research/dencun/eip-7514.md) for chosen blob gas parameters.
See [rationale](../research/dencun/eip-4844.md) for chosen blob gas parameters.

### [EIP-7514](https://eips.ethereum.org/EIPS/eip-7514)

Expand Down
2 changes: 1 addition & 1 deletion network-upgrades/london.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Gnosis chain native token is xDAI (wrapped DAI). Each xDAI token represents a cl
| - | - |
| EIP1559_FEE_COLLECTOR | 0x6BBe78ee9e474842Dbd4AB4987b3CeFE88426A92 |

Block validity is modified by extending the reference implementation in the EIP. The burned fee is transfered to a pre-definied address as part of block processing.
Block validity is modified by extending the reference implementation in the EIP. The burned fee is transfered to the pre-definied address `EIP1559_FEE_COLLECTOR` as part of block processing.

```diff
class World(ABC):
Expand Down
11 changes: 10 additions & 1 deletion network-upgrades/pectra.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,23 @@ Table below list differences if any.
| [EIP-7002](https://eips.ethereum.org/EIPS/eip-7002): Execution layer triggerable exits | EL | Not modified, same addresses as Ethereum
| [EIP-7251](https://eips.ethereum.org/EIPS/eip-7251): Increase the MAX_EFFECTIVE_BALANCE | CL | Not modified
| [EIP-7549](https://eips.ethereum.org/EIPS/eip-7549): Move committee index outside Attestation | CL | Not modified
| [EIP-4844-B](https://eips.ethereum.org/EIPS/eip-4844): Shard Blob Transactions | CL | Modified

\* See [Differences with Ethereum mainnet](#differences-with-ethereum-mainnet)

Note: The trusted setup required for [deneb's cryptography](https://github.com/ethereum/consensus-specs/blob/dev/specs/deneb/polynomial-commitments.md#trusted-setup) is the same as defined in Ethereum's consensus spec release v1.4.0, which can be found in [consensus/preset/gnosis/trusted_setups](./consensus/preset/gnosis/trusted_setups/trusted_setup_4096.json).

## Differences with Ethereum mainnet

_TBA_
### [EIP-4844-B](https://eips.ethereum.org/EIPS/eip-4844)

Extends the modified Gnosis EIP-4844 as defined in the [dencun spec](../dencun.md) document. Starting at the fork timestamp, the blob base fee is collected instead of burned.

| Constant | Value |
| - | - |
| EIP4844_FEE_COLLECTOR | 0x6BBe78ee9e474842Dbd4AB4987b3CeFE88426A92 |

The actual `blob_fee` as calculated via `calc_blob_fee` is deducted from the sender balance before transaction execution and credited to the pre-defined address `EIP4844_FEE_COLLECTOR` as part of block processing. It is not refunded in case of transaction failure.

## Upgrade Schedule

Expand Down

0 comments on commit cee12f7

Please sign in to comment.