Skip to content

Conversation

@drahnr
Copy link
Contributor

@drahnr drahnr commented Dec 29, 2025

Preparation / carve out from #1394 since the feedback caused additional linecount - no some minor functional changes were made!

A large chunk of the linecount are testcases

Core changes

  • schema.rs - move storage map into separate table, avoid storing full serialized account to accounts table, move vault data to separate table (breaking)
  • models/conv.rs - StorageSlotType - change DB representation (breaking)
  • queries/at_block.rs - add new *_at_block queries
  • adds a few helper functions such as fn validate_block_exists

@drahnr drahnr marked this pull request as ready for review December 29, 2025 23:52
@drahnr drahnr changed the title [0/3] feat: change accounts db schema [1/4] feat: change accounts db schema Dec 29, 2025
@drahnr drahnr changed the title [1/4] feat: change accounts db schema refactor [1/4]: change accounts db schema Jan 6, 2026
Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you! I reviewed most non-test code and left some small comments inline.

Overall, I think this structure works for now, but we'll probably need to re-think this shortly after the refactoring is merged as in many places the interactions with the database are likely to be prohibitively expensive.

Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you! I reviewed all non-test code and left one comment for the future inline.

Copy link
Contributor

Choose a reason for hiding this comment

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

Not for this PR: this file is pretty large and difficult to navigate. I think we should break it up into a few smaller files which contain logically grouped functionality.

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