Skip to content

Conversation

@ejMina226
Copy link
Collaborator

@ejMina226 ejMina226 commented Feb 14, 2025

Instead of storing the STs and STBatches as json in a table, which makes them hard to query, we now create separate tables to store the information. This also requires changes to the mappers.

@ejMina226 ejMina226 self-assigned this Feb 14, 2025
@ejMina226 ejMina226 requested review from maht0rz and rpanic and removed request for rpanic February 26, 2025 15:27
@ejMina226 ejMina226 linked an issue Feb 28, 2025 that may be closed by this pull request
@rpanic
Copy link
Member

rpanic commented Feb 28, 2025

Another very important thing: We need to add the new tables to the PrismaDatabase's .pruneDatabase() tables @ejMina226

DBStateTransitionBatch,
"txExecutionResultId" | "id" | "blockId" | "blockResultId"
>;
export type STBatchArrayMapOut2 = Omit<DBStateTransition, "batchId" | "id">[];
Copy link
Member

Choose a reason for hiding this comment

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

Generally, I like this pattern of re-defining the types that are derived from the Prisma types. I see that there are a lot of (by now too complicated) types that do this, can we extract them into those reusable defintions where it makes sense? Might make stuff more readable, especially at places where we stich them together

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.

Properly model StateTransition and -Batches in peristence

3 participants