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

Investigate the Size of genesis/raw/top/0x3a636f6465 in the Chain Spec #7033

Open
2 tasks done
Kofituo opened this issue Jan 3, 2025 · 1 comment · May be fixed by #7037
Open
2 tasks done

Investigate the Size of genesis/raw/top/0x3a636f6465 in the Chain Spec #7033

Kofituo opened this issue Jan 3, 2025 · 1 comment · May be fixed by #7037
Labels
I2-bug The node fails to follow expected behavior. I10-unconfirmed Issue might be valid, but it's not yet known.

Comments

@Kofituo
Copy link

Kofituo commented Jan 3, 2025

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Description of bug

Description:

When analyzing the local chain specification file, it is observed that the entry genesis/raw/top/0x3a636f6465 takes up a significant portion of the file. This raises a few questions:

  1. Purpose of the Entry:
    What specific role does the genesis/raw/top/0x3a636f6465 entry serve within the genesis configuration?

  2. Size Discrepancy:
    Why is the size of this entry disproportionately large compared to the rest of the genesis configuration?

  3. Genesis Block Scope:
    Shouldn't the genesis entry represent the entire genesis block, rather than focusing on just genesis/raw/top/0x3a636f6465?

A priori, there seems to be no clear justification for why this entry alone is so large in comparison to the rest of the file.

Steps to reproduce

  1. Generate a local chain spec.
  2. Open the JSON file and examine the genesis/raw/top section.
  3. Compare the size of the 0x3a636f6465 entry to the rest of the genesis block.

Expected Behavior:

The size of genesis/raw/top/0x3a636f6465 should have a clear and well-documented explanation. If the size is unnecessarily large, optimizations should be considered.


Additional Context:

This issue was raised during an internal review of the local chain spec file for a custom Substrate-based blockchain. Further investigation is required to determine whether this is expected behavior or an anomaly.

@Kofituo Kofituo added I10-unconfirmed Issue might be valid, but it's not yet known. I2-bug The node fails to follow expected behavior. labels Jan 3, 2025
@Kofituo Kofituo changed the title Investigate the Size of genesis/raw/top/0x3a636f6465 in the Local Chain Spec Investigate the Size of genesis/raw/top/0x3a636f6465 in the Chain Spec Jan 3, 2025
@bkchr
Copy link
Member

bkchr commented Jan 3, 2025

0x3a636f6465 corresponds to :code aka the runtime wasm. Substrate is build around the runtime wasm being part of the state to be able to upgrade it easily. There is no real optimization required for this one value, not sure why you think this. The value will also be later changed when you upgrade the runtime.

@bkchr bkchr linked a pull request Jan 3, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I2-bug The node fails to follow expected behavior. I10-unconfirmed Issue might be valid, but it's not yet known.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants