Conversation
…aw for consistency
…est for untracked errors
…resholdForClassicOperation
…nit test for untracked errors
…in string helper functions
…uthEntry functions for SorobanAuthorizationEntry handling
- Add `parseScVal` function to convert XDR ScVal to TypeScript-friendly values. - Introduce utility functions: `getScValTypeName`, `isScValRecord`, `isScValMap`, and `asUnion` for type checking and parsing. - Implement `parseScVals` for batch parsing of ScVal arrays. - Create `softTryToXDR` utility to safely convert values to XDR format. - Add comprehensive unit tests for ScVal parsing and utility functions. - Remove redundant ScVal types from `core/common/scval/types.ts` and consolidate in `core/common/helpers/xdr/types.ts`.
- Added Transaction class to handle transaction metadata and operations parsing. - Implemented factory methods for creating Transaction instances from metadata. - Introduced memoization for performance optimization on frequently accessed properties. - Added comprehensive unit tests for Transaction class covering various scenarios and envelope types. - Created types for Ledger, Transaction, and Operation for better type safety and clarity. - Updated module exports to include new ledger-parser functionalities.
- Implemented LedgerStreamer class to support live and historical ingestion of Stellar ledgers. - Added methods for starting live, archive, and automatic streaming modes. - Introduced configuration options for batch size, wait intervals, and error handling. - Created type definitions for handlers and options related to ledger streaming.
…RLs and add health check for MainNet PRO
feat: add Event Streamer variant with type definitions - Introduced `EventStreamerOptions` and `EventStreamerConfig` interfaces for event streaming configuration. - Created a new file `types.ts` under `rpc-streamer/src/variants/event/`. feat: implement Ledger Streamer variant with integration and unit tests - Added `createLedgerStreamer` function to handle live and archive ingestion of ledgers. - Implemented integration tests for the Ledger Streamer in `index.integration.test.ts`. - Created unit tests for the Ledger Streamer ingestors in `index.unit.test.ts`. - Defined `LedgerStreamerOptions` and `LedgerStreamerConfig` interfaces for ledger streaming configuration. - Added necessary mock helpers and test cases to ensure proper functionality and error handling.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR releases version 0.16.0 of @colibri/core and introduces version 0.1.0 of @colibri/rpc-streamer (previously @colibri/event-streamer). The changes include:
Changes:
- Renamed and refactored
event-streamerpackage torpc-streamerwith a generic streaming architecture - Added new
ledger-parsermodule to core for lazy XDR parsing of ledgers, transactions, and operations - Refactored XDR helper functions from a monolithic file into modular, well-typed components with proper error handling
Reviewed changes
Copilot reviewed 100 out of 105 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| rpc-streamer/* | New generic RPC streaming framework with ledger and event variants |
| core/ledger-parser/* | New lazy XDR parser for ledgers, transactions, and operations |
| core/common/helpers/xdr/* | Refactored XDR helpers into separate files with typed errors |
| core/common/decorators/memoize/* | New memoize decorator for caching getter/method results |
| core/network/providers/* | Updated network providers with archive RPC support |
| deno.json | Updated workspace to reference rpc-streamer instead of event-streamer |
| .github/workflows/* | Updated CI/CD to use new package names and API keys |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #56 +/- ##
==========================================
+ Coverage 99.42% 99.51% +0.09%
==========================================
Files 162 174 +12
Lines 9350 10580 +1230
Branches 1028 1239 +211
==========================================
+ Hits 9296 10529 +1233
+ Misses 54 51 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
This pull request introduces a new, feature-rich
@memoizedecorator for caching getter and method results in the codebase, along with its supporting types. It also makes several improvements to environment variable handling, test fixtures, and minor workflow corrections. The most significant changes are grouped below.New Memoization Decorator:
@memoizedecorator incore/common/decorators/memoize/index.tsthat supports per-instance caching for getters and methods, optional TTL (time-to-live), active eviction, custom key functions, and can be disabled for testing or debugging.core/common/decorators/memoize/types.ts, enforcing correct option usage and improving type safety.core/common/decorators/index.ts.Environment Variable Handling:
QUASAR_API_KEYsupport for enhanced test rate limits, including documentation in.env.example, loading logic in_internal/env/loadEnv.ts, and export in_internal/env/index.ts. [1] [2] [3]QUASAR_API_KEYfrom GitHub secrets.Test and Utility Improvements:
// deno-coverage-ignore-fileto various internal test and utility files to exclude them from coverage reports, reducing noise and improving coverage accuracy. [1] [2] [3] [4] [5] [6]_internal/tests/fixtures/rpc/get_ledgers/index.ts, supporting differentLedgerCloseMetaversions and providing grouped fixture loading helpers.Minor Corrections:
event-streamertorpc-streamerfor accuracy.core/common/helpers/calculate-contract-id.tsto use the localStrKeyimplementation instead of the one fromstellar-sdk.