-
Notifications
You must be signed in to change notification settings - Fork 10
feat(db): historical block re-execution #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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 📊
|
Summary
Test plan
Closes #139
🤖 Generated with Claude Code