-
Notifications
You must be signed in to change notification settings - Fork 0
Cosmos » NEAR #20
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?
Cosmos » NEAR #20
Conversation
Resolved merge conflicts by keeping NEAR Protocol implementation for all conflicted files. The near branch contains complete migration from Cosmos to NEAR with updated RPC layer, data models, and UI components. Added from main: - GitHub Actions workflows (claude.yml, claude-code-review.yml) - ESLint configuration - Contract state viewing components (for future NEAR contract support) - Focus/Config/DebugLog service refactors Removed: - package-lock.json (using yarn.lock instead) All core functionality preserved: - NEAR RPC polling and transaction decoding - Clipboard copy with full data (no truncation) - UTC time display in status bar - Keyboard navigation and pane focus management - WebSocket broadcasting to breakout panes
Pull Request Review: Cosmos to NEAR MigrationSummaryThis is a massive migration from Cosmos/CosmWasm to NEAR Protocol (8515 additions, 15623 deletions across 32 files). The core blockchain abstraction layer has been completely rewritten and the migration appears well-executed with thoughtful architecture decisions. Strengths1. Excellent Architecture
2. Robust Error Handling
3. Configuration Management
4. Type Safety
5. Documentation
Issues and Concerns1. SECURITY - Credential Exposure Risk (HIGH PRIORITY)Location: .env.template:10 2. Missing Test Coverage (MEDIUM PRIORITY)The migration removed all tests but there's no automated test coverage for RPC connection failures circuit breaker behavior data model conversions or edge cases. Recommendation: Add unit tests for utility functions integration tests for BlockPoller and mock RPC tests. 3. Incomplete Migration (MEDIUM PRIORITY)
4. Hardcoded Constants (LOW PRIORITY)Location: src/battle-station.tsx:30 - Duplicates config logic instead of using cfg().WS_HIGH_WATER_MARK 5. Potential Memory Leak (LOW PRIORITY)Location: src/battle-station.tsx:88-89 - Debug entries accumulate in memory even when DEBUG_UI is false. 6. Error Swallowing (LOW PRIORITY)Location: src/services/near-rpc.ts:211-212 - Silent error swallowing makes debugging difficult. Performance ConsiderationsPositive: Concurrent chunk fetching with limits, adaptive catch-up prevents blocking, circuit breaker prevents wasted retries, WebSocket backpressure handling Recommendations SummaryMust Fix (before merge): Update .env.template credential placeholder ConclusionThis is high-quality work for a major protocol migration. The core architecture is solid error handling is robust and the code follows the projects pragmatic TypeScript philosophy. |
good save point