Conversation
|
Let's implement the tests using a database fixture at <tests/fixtures/db/v1_2_2>. only the compressed file is tracked but we can directly refer the path to it as For the test, we can use the |
|
Let's refactor the way we fetch data from the database, instead of using the database abstraction api, let's use the provider traits to both read/write to the database. For inserting the execution output, we can use for now let's forget about committing the state tries. |
|
Claude finished @kariy's task —— View job Refactoring Migration Crate to Use Provider Traits ✅ I have successfully refactored the migration crate to use provider traits instead of direct database API calls, implementing the Todo List:
What was refactored:1. Database Access Pattern (
|
f80f26c to
ce81aa0
Compare
- Add new katana-migration crate in crates/storage/migration - Implement MigrationManager for re-executing historical blocks - Support versioned type conversion (V6→V7 blocks/transactions) - Handle ExecutableTx conversion with contract class fetching - Update derived data (receipts, traces) in database - Use database abstraction traits for flexibility - Add comprehensive documentation and examples - Include error handling for edge cases Co-authored-by: Ammar Arif <kariy@users.noreply.github.com>
- Add tests using database fixture at tests/fixtures/db/v1_2_2 - Test MigrationManager instantiation with real database - Validate database operations and fixture access - Include placeholder tests for full migration workflow - Test error handling for invalid database paths - Use correct relative path calculation from migration crate Co-authored-by: Ammar Arif <kariy@users.noreply.github.com>
- Replace direct database API calls with provider trait methods - Use BlockProvider, TransactionProvider, and HeaderProvider for reading data - Implement BlockWriter::insert_block_with_states_and_receipts for storing execution output - Follow production flow pattern from do_mine_block implementation - Update MigrationManager to use DbProvider instead of raw database - Refactor load_executable_block to use provider traits - Implement store_block_execution_output using BlockWriter pattern - Fix integration tests to use provider field instead of database field Co-authored-by: Ammar Arif <kariy@users.noreply.github.com>
ce81aa0 to
ac8c9f0
Compare
Binary size report 📊
|
e3bd68b to
e897bbb
Compare
Summary
Test plan
Closes #139
🤖 Generated with Claude Code