Skip to content

Conversation

@kariy
Copy link
Member

@kariy kariy commented Apr 14, 2025

No description provided.

@kariy kariy merged commit 6acc6bb into main Apr 14, 2025
3 of 5 checks passed
@kariy kariy deleted the l2-gas branch April 14, 2025 21:38
@kariy kariy changed the title feat: include l2 gas in internal types feat: include L2 gas price in block header Jun 15, 2025
kariy added a commit that referenced this pull request Jun 15, 2025
There has been a mistake on the progression of the database version. For the latest stable release of Katana (v1.5.3), the database version is [6](https://github.com/dojoengine/katana/blob/8cca707d20a52b3d8d559193c77dc720ca3a4fbd/crates/storage/db/src/version.rs#L8) which hadn't changed since Katana [v1.0.10](https://github.com/dojoengine/dojo/blob/v1.0.10/crates/katana/storage/db/src/version.rs). If the rule for bumping the database version is followed correctly - bump the version if there are changes in the serialization for the database [types](https://github.com/dojoengine/katana/blob/8cca707d20a52b3d8d559193c77dc720ca3a4fbd/crates/storage/db/src/tables.rs#L191-L266) - the fact that the version remain unchanged since v1.0.10 would supposedly imply the database format remains compatible from v1.0.10 all the way to v1.5.3. Unfortunately, it is not the case for this (6) database version. 

The correct version for Katana v1.5.* should've been 7 following a change made to the `Header` struct - addition of the `l2_gas_prices` - by this [PR](#19). But I've made a mistake of forgetting to perform a version bump following the change.

So, this commit doubles as a patch (for v1.5.*) to maintain backward compatibility across all versions of Katana with database version 6, and as the first part of implementing an actual database migration tool.
kariy added a commit that referenced this pull request Jun 18, 2025
There has been a mistake on the progression of the database version. For the latest stable release of Katana (v1.5.3), the database version is [6](https://github.com/dojoengine/katana/blob/8cca707d20a52b3d8d559193c77dc720ca3a4fbd/crates/storage/db/src/version.rs#L8) which hadn't changed since Katana [v1.0.10](https://github.com/dojoengine/dojo/blob/v1.0.10/crates/katana/storage/db/src/version.rs). If the rule for bumping the database version is followed correctly - bump the version if there are changes in the serialization for the database [types](https://github.com/dojoengine/katana/blob/8cca707d20a52b3d8d559193c77dc720ca3a4fbd/crates/storage/db/src/tables.rs#L191-L266) - the fact that the version remain unchanged since v1.0.10 would supposedly imply the database format remains compatible from v1.0.10 all the way to v1.5.3. Unfortunately, it is not the case for this (6) database version.

The correct version for Katana v1.5.* should've been 7 following a change made to the `Header` struct - addition of the `l2_gas_prices` - by this [PR](#19). But I've made a mistake of forgetting to perform a version bump following the change.

So, this commit doubles as a patch (for v1.5.*) to maintain backward compatibility across all versions of Katana with database version 6, and as the first part of implementing an actual database migration tool.
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.

2 participants