feat(grpc): add integration tests for Starknet gRPC APIs#413
Open
feat(grpc): add integration tests for Starknet gRPC APIs#413
Conversation
1ca3d93 to
d353a40
Compare
Add comprehensive integration tests for the gRPC server that verify all read APIs work correctly. Tests spin up a TestNode and use the gRPC client to fetch and verify data. Changes: - Add 19 integration tests covering chain_id, block queries, class lookups, storage reads, nonce, transactions, receipts, and events - Fix port 0 binding in GrpcServer to return actual bound address - Add grpc feature flag to katana-utils for TestNode gRPC support - Cache dojo repository builds to speed up migration tests - Use file-based locking to prevent concurrent clone/build operations Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
6ffdd50 to
4c4f653
Compare
…form corruption The MDBX lock file contains platform-specific data (pthread mutexes, process IDs) that causes MDBX_CORRUPTED errors when a fixture generated on one platform is opened on another (e.g., macOS -> Linux CI). MDBX creates a fresh lock file automatically when the database is opened. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The database fixtures are generated on macOS (Apple Silicon, 16KB pages) but CI runs on Linux (x86_64, 4KB pages). DbEnvBuilder was always forcing the OS default page size via set_geometry, causing MDBX to report MDBX_CORRUPTED when the forced page size didn't match the existing database's page size. Add `existing_page_size()` to DbEnvBuilder that sets page_size to None, letting MDBX read the page size from the existing data file. Use it in Db::open_no_sync which is specifically for opening pre-built snapshots. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GrpcServerto return actual bound address instead of the requested addressgrpcfeature flag tokatana-utilsfor TestNode gRPC support/tmp/katana-test-dojoto speed up migration testsfs2) to prevent concurrent clone/build operations across parallel test processesTest plan
cargo nextest run -p katana-grpc --features grpc🤖 Generated with Claude Code