Skip to content

qkc/types: support versioned cross-shard transaction lists - #47

Open
ping-ke wants to merge 1 commit into
goshard/basefrom
qkc-3-types-04-xshard-refactor
Open

qkc/types: support versioned cross-shard transaction lists#47
ping-ke wants to merge 1 commit into
goshard/basefrom
qkc-3-types-04-xshard-refactor

Conversation

@ping-ke

@ping-ke ping-ke commented Aug 4, 2026

Copy link
Copy Markdown

Problem

CrossShardTransactionList decoding was tied to a specific data structure. Adding a new version or new fields would break compatibility with older data.

Solution

This PR adds version-based serialization and decoding:

  • Serialization uses the latest structure and writes the version in the last four bytes, matching pyquarkchain.
  • Decoding reads the version first and uses the matching structure.
  • Older versions are converted to the latest CrossShardTransactionList.
  • Adding a new version only requires a new versioned structure and decoding case, without affecting older data.

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.

1 participant