Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schedule Deneb on Chiado #26

Merged
merged 1 commit into from
Jan 11, 2024
Merged

Schedule Deneb on Chiado #26

merged 1 commit into from
Jan 11, 2024

Conversation

dapplion
Copy link
Member

EU friendly time after Ethereum's Goerli fork.

Slot 8265728 ts 1706724940 UTC Wed 31/01/2024, 18:15:40

Copy link
Contributor

@filoozom filoozom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The time is also right after Sepolia, as we wanted to hard fork around the middle of the 3 testnet hard forks. This way we know if anything wrong happened with Goerli and stay in schedule with Ethereum.

yperbasis added a commit to erigontech/erigon that referenced this pull request Jan 10, 2024
In PR #9184 I confused slot with epoch. Refer to
gnosischain/configs#26.
@zilm13
Copy link

zilm13 commented Jan 10, 2024

Hello, clients may need more info for implementation.

Following constants should be the part of config too, could you clarify it's the same as in gnosis (or better add to this config too):

# Deneb
# `2**7` (=128)
MAX_REQUEST_BLOCKS_DENEB: 128
# MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK
MAX_REQUEST_BLOB_SIDECARS: 768
# `2**14` (= 16384 epochs, ~15 days)
MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: 16384
# `6`
BLOB_SIDECAR_SUBNET_COUNT: 6

Also I cannot find gnosis deneb preset which should contain MAX_BLOBS_PER_BLOCK, FIELD_ELEMENTS_PER_BLOB, MAX_BLOB_COMMITMENTS_PER_BLOCK, KZG_COMMITMENT_INCLUSION_PROOF_DEPTH.

The last piece of puzzle is trusted setup, which one will be used?

Also 16384*16*6*128kb = 200Gb, where does estimate of 35Gb come from?

@filoozom
Copy link
Contributor

@zilm13 you can find the preset, and more specifically the deneb one here: https://github.com/gnosischain/specs/blob/master/consensus/preset/gnosis/deneb.yaml.

The configuration for Chiado hasn't been specified yet, but all configuration variables will be the same as for Ethereum. The full file will be made available shortly.

Regarding the size estimate, while on the CL side MAX_BLOBS_PER_BLOCK is indeed set to 6 to maintain compatibility with Ethereum, it will actually be limited to 2 on the EL. The target is also set to 1, So we end up with:

MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS * SLOTS_PER_EPOCH * TARGET_BLOBS_PER_BLOCK * BYTES_PER_FIELD_ELEMENT * FIELD_ELEMENTS_PER_BLOB = 4096 * 16 * 1 * 32 * 4096 = 8.6GB

I'm not sure where the discrepancy comes from, maybe I missed something in my formula, I'll check tomorrow. What variables do the numbers in your calculation represent?

@zilm13
Copy link

zilm13 commented Jan 10, 2024

With target 1 it could be estimated as 35G (200G/6), right.
What about trusted setup, which one should be used?

@zilm13
Copy link

zilm13 commented Jan 10, 2024

Btw documentation on https://docs.gnosischain.com/about/networks/chiado leads to https://github.com/gnosischain/configs/ where there are no presets, that's why I asked for presets

@filoozom
Copy link
Contributor

filoozom commented Jan 10, 2024

First, thank you for opening the issue on Teku's GitHub. Don't worry though, we'll open PRs on all CL clients in due time. To answer your questions:

With target 1 it could be estimated as 35G (200G/6), right.

I'm not exactly sure where the 200 GB estimation comes from, and I'm not sure if the size is dependent on the target or the maximum. Assuming the worst case and that the formula above is right, I get 4096 * 32 * 6 * 32 * 4096 = 103.07 GB for Ethereum.

For Gnosis Chain, we only have 16 slots per epoch and a target of 2, so effectively 6x less required space in the worst case, which is 17.2 GB, or double of my earlier approximation with the target rather than the maximal amount. However, the bandwidth requirements would be closer to Ethereum, as that data would be "refreshed" on a more regular basis.

@dapplion it would be nice if you could confirm those numbers.

What about trusted setup, which one should be used?

The same one as Ethereum to stay as compatible as possible.

@dapplion
Copy link
Member Author

@zilm13
Copy link

zilm13 commented Jan 11, 2024

@filoozom
mainnet has MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS 4096, while gnosis 16384. Though epochs are twice smaller (16 slots vs 32), requirement for epochs is 4x. So you need to keep 2x blobs comparing to mainnet (worst cases compared)

@filoozom
Copy link
Contributor

You're totally right, MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS is still missing from the Chiado config (which we're going to update soon), and I apparently forgot about the change, so I assumed that we were using the 4096 value from Ethereum mainnet, which we aren't.

So 4x more min epochs, 2x less slots per epoch and 3x less target / max blobs per block. So 2/3 of Ethereum, meaning 34.4 GB target and 68.7 GB max. Not sure which one actually ends up being required.

@dapplion
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants