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

Use only one metadata table #2611

Open
wants to merge 1 commit into
base: 2552-feature-flag-for-global-state-roots-+-first-onchain-table-implementation
Choose a base branch
from

Conversation

acerone85
Copy link
Contributor

@acerone85 acerone85 commented Jan 21, 2025

Linked Issues/PRs

Each KeyConverter maps a key from table with column id n into a 4-byte representation of n, hence the ranges of the key-converter functions are disjoint and we could use only one Metadata table.

If accepted, this PR also corrects two bugs that affected the storage implementation:

  1. The number of total columns is not correct.
  2. The Blueprint for MerkleMetadata writes to the MerkleData column.

Description

Checklist

  • Breaking changes are clearly marked as such in the PR description and changelog
  • New behavior is reflected in tests
  • The specification matches the implemented behavior (link update PR if changes are needed)

Before requesting review

  • I have reviewed the code myself
  • I have created follow-up issues caused by this PR and linked them here

After merging, notify other teams

[Add or remove entries as needed]


/// The start of the merkle metadata columns.
pub const MERKLE_METADATA_COLUMNS_START: u32 = u16::MAX as u32;
pub const COUNT: usize = TableColumn::COUNT + TableColumn::COUNT + 1;
Copy link
Member

Choose a reason for hiding this comment

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

a comment about why the count has been incremented here would be nice :)

@rymnc rymnc added the no changelog Skip the CI check of the changelog modification label Jan 22, 2025
@rymnc
Copy link
Member

rymnc commented Jan 22, 2025

(added the no changelog label because this is not going into master)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Skip the CI check of the changelog modification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants