Skip to content

[release] Pre initial release main branch#159

Merged
dev-jodee merged 34 commits intomainfrom
release/pre-release-main-branch
Aug 27, 2025
Merged

[release] Pre initial release main branch#159
dev-jodee merged 34 commits intomainfrom
release/pre-release-main-branch

Conversation

@dev-jodee
Copy link
Copy Markdown
Contributor

@dev-jodee dev-jodee commented Aug 13, 2025

📊 Test Coverage

Coverage

Coverage: 85.6%

View Detailed Coverage Report

dev-jodee and others added 2 commits August 13, 2025 11:16
#146)

* refactor: Main PR representing refactoring & code clean up & organization before release

- Introduced `FeeConfigUtil` for improved transaction fee estimation and fee payer outflow calculations.
- Reorganized the code in different folder that are linked (validators, fees, etc.)
- Cleaned up mod.rs's so they don't contain code
- Created testing utils for unit testing to reuse functions
- Reorganized unit tests to be in the same file as the code they are testing, removed external unit tests files

* refactor: reorganize signer modules and remove legacy dependencies

Privy and Turnkey as separate crates wasn't needed, we would never publish the crates themselves and they were tightly coupled with kora_lib

- Removed `kora-privy` and `kora-turnkey` crates, consolidating their functionality into the `signer` module.
- Introduced new `privy` and `turnkey` submodules within the `signer` module for better organization.
- Added utility functions for hex and byte conversions in the `signer` module.

* refactor: enhance transaction handling with utility methods

- Added trait extension to make it more organized.
- Introduced `TransactionUtil` for transaction encoding/decoding and signing operations.
- Updated transaction methods to utilize the new utility functions for better organization and readability.
- Refactored transaction fee estimation and signing processes to leverage the new utility methods.
- Improved modularity by separating versioned message and transaction functionalities into dedicated files.
- Enhanced tests to ensure correctness of new utility methods and transaction handling.

* refactor: consolidate RPC server functionality into kora-cli

- Removed the kora-rpc crate and integrated its functionality into the kora-cli crate.
- Updated CLI commands to reflect the new structure, including changes to command usage and options.
- Enhanced documentation to guide users on the new CLI commands and configuration.
- Refactored code to improve organization and maintainability, including the introduction of a dedicated RPC server module.
- Added new RPC methods and improved existing ones for better performance and usability.
- Updated tests to ensure coverage of new functionality and validate the CLI interface.

* refactor: consolidate mock RPC client functions into common test utilities

- Moved mock RPC client creation functions to a common module for reuse across tests.
- Removed redundant mock implementations from individual test modules.
- Added new mock account creation functions for SPL and Token2022 mints.
- Updated tests to utilize the new common mock functions for improved organization and maintainability.

* chore: update dependencies and improve test environment setup

- Added new dependencies: `hex`, `hmac`, `once_cell`, `reqwest`, and `sha2` to `Cargo.lock`.
- Updated configuration paths in `CLAUDE.md`, `Makefile`, and GitHub Actions to reflect new test fixture locations.
- Refactored test environment setup scripts for better organization and clarity.
- Introduced new test fixtures for authentication and kora configuration.
- Enhanced integration tests with additional RPC methods and improved error handling.

* chore: refactor token utilities

- Added Rust tests badge to README for CI visibility.
- Refactored token utility functions to improve organization and maintainability.
- Updated token interface and program implementations to utilize new utility methods.
- Enhanced transaction handling with improved token validation and processing logic.

* Fix typescript tests

* Update README.md

* Pr comments fixes

- Separate args in different structure
-Organization of signers
-Constants added

* docs(auth): Update authentication config docs for [kora.auth] section

Documentation now clarifies that authentication settings should be placed in the [kora.auth] section of kora.toml. Examples and configuration guides have been updated to reflect this, improving clarity for operators configuring authentication.

---------

Co-authored-by: amilz <85324096+amilz@users.noreply.github.com>
…ment documentation (#131)

- Added conventional commit hook to .pre-commit-config.yaml for enforcing commit message standards.
- Introduced CLAUDE.md for development workflow guidelines, including branch strategy and commit message format.
- Created DEVELOPMENT.md to outline best practices for development, including commit message conventions and pull request processes.
- Removed outdated GitHub workflows for crate publishing and replaced with a unified rust-publish.yml workflow.
- Refactored error handling in lib/src/error.rs and updated transaction fee handling in lib/src/transaction/fees.rs.
- Improved test assertions in lib/src/transaction/tests.rs for better readability.

Changes to only publish the rpc crate, as this is the main one people will be using.
@dev-jodee dev-jodee marked this pull request as draft August 13, 2025 15:57
@dev-jodee dev-jodee self-assigned this Aug 13, 2025
…at if the ATA doesn't exists, we can process with the Mint for TransferChecked (#157)

Added a new Makefile target to generate OpenAPI spec with documentation features.
Created openapi.json to define the API schema for the Kora RPC server.
Updated the update_docs function to handle OpenAPI spec generation and validation.
Enhanced token interfaces and validation logic to support new features.
Refactored token utilities to improve organization and maintainability.
Updated tests to validate new functionality and ensure correctness.
…TypeScript (#158)

- Introduced `codecov.yml` for coverage settings and CI requirements.
- Updated Rust workflow to upload coverage reports to Codecov.
- Enhanced TypeScript workflow to run tests with coverage and upload results.
- Configured Jest to collect coverage data and specify output formats.

Implemented own version of code coverage instead

ci permission fix
@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 13, 2025

📊 TypeScript Coverage Report

Coverage: 82.0%

View detailed report

Coverage artifacts have been uploaded to this workflow run.
View Artifacts

@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 13, 2025

📊 Rust Coverage Report

Coverage: 4.9%

View detailed report

Coverage artifacts have been uploaded to this workflow run.
View Artifacts

amilz and others added 11 commits August 13, 2025 09:31
* feat(sdk): add TypeDoc auto-documentation

adds clean single-file output

* docs(sdk): update allowed policies/enabled methods
- use @kora/sdk
- update kora.toml example
- update makefile
…O-61) (#161)

Introduced a new kora-metrics crate for Prometheus metrics.
Implemented HTTP metrics collection with HttpMetricsLayer and MetricsHandlerLayer.
Updated Docker and Docker Compose configurations for metrics services (Prometheus and Grafana).
Enhanced Makefile with new targets for running the monitoring stack.
Added Grafana dashboard and Prometheus configuration for Kora metrics.
Updated Cargo.toml and .env.example to include new dependencies and environment variables for metrics.
add auth testing to TS SDK, including CI
Replaces the use of 'swagger-cli validate' (deprecated) with 'npx @redocly/cli@latest lint --extends=minimal' for OpenAPI document validation in update_docs().
- fix ts test make command
- add prettier to ts sdk
- add prettier to precommit
- run prettier
…tion (#168)

* fix: Privy Signer Initialization and Fee Payer Position

  Fixes critical bug where Privy signer was not properly initialized, causing transaction signature failures.

  Root Cause

  Privy signer was created but never initialized, leaving public_key as Pubkey::default() instead of the actual wallet address.

  Changes

  Privy Signer Initialization:
  - Add async initialization call in init_privy_signer() to fetch public key from Privy API
  - Use tokio::task::block_in_place to handle async call in sync context

  Transaction Signing Fix:
  - Replace hardcoded transaction.signatures[0] with dynamic fee payer position lookup
  - Prevents signature position mismatches when fee payer is not at index 0 (this was not the issue, but seems worth keeping in since it was a potential source of error when debugging)

* async function instead of thread block

* removed comment

---------

Co-authored-by: Jo D <jo.desorm@proton.me>
* chore(metrics): update metrics configuration and Docker setup

- Added default metrics constants for endpoint, port, and scrape interval.
- Enhanced Docker Compose setup for Prometheus and Grafana with container names and volume management.
- Updated Makefile targets for running and cleaning metrics services.
- Improved configuration update logic for Prometheus and Grafana, ensuring correct URLs and paths.
- Introduced Grafana datasource configuration for Prometheus.

* chore(docs): update start command

---------

Co-authored-by: amilz <85324096+amilz@users.noreply.github.com>
#173)

* feat(cli): add initialize-atas command for payment token ATAs & custom payment address for Paymaster

- Introduced a new subcommand `initialize-atas` under the RPC command to initialize associated token accounts (ATAs) for allowed payment tokens.
- Updated CLI structure to support the new command.
- Enhanced KoraConfig to include an optional payment address.
- Implemented logic to validate and create ATAs directly from the command line.
- Added tests to verify the functionality of the new command.

Refactor/improve integration testing (#174)

* feat(config): implement global configuration management and hot-reloading

- Added `init_config` and `get_config` functions for global configuration management.
- Updated `KoraRpc` and various RPC methods to utilize the global configuration.
- Introduced `update_config` method for hot-reloading configuration in dev/test environments.
- Refactored existing methods to remove direct config dependencies, enhancing modularity.
- Added tests for new configuration functionalities.

* -Reorganized config to be a global state that is shared, instead of passing as arguments everywhere
-Broke down the Makefile into sub make files to better structure and separate
-Reorged the rust integration tests to have a better structure

* chore: update docs

Added documentation and configuration examples for specifying a custom payment address in kora.toml, allowing separation of fee payer and payment recipient. Updated guides and sample configs to clarify initialization of payment ATAs and usage of the payment_address option.

* chore: fix TS integration test

- Better ATA init function (chunks, compute)
- Validate missing ata if user is validating config with rpc
- Better decode transfer instruction
- CI on demand release


---------

Co-authored-by: amilz <85324096+amilz@users.noreply.github.com>
…ort of lookup tables and inner instructions across all of Kora (#177)

* refactor: (PRO-213) Inner instruction support + refactor to have support of lookup tables and inner instructions across all of Kroa

- Added `solana-transaction-status-client-types` dependency to `Cargo.toml` and `Cargo.lock`.
- Updated `fee.rs` to utilize `VersionedTransactionResolved` for transaction handling.
- Refactored transaction-related methods in `rpc_server` to work with the new transaction structure.
- Introduced `instruction_util.rs` for instruction parsing and utility functions.
- Removed deprecated `ix_utils.rs` as part of the cleanup.
- Adjusted tests to accommodate changes in transaction handling and ensure compatibility with new structures.
* Implemented resolve transaction for SPL transfers as well
@dev-jodee dev-jodee changed the title Release/pre release main branch [release] Pre initial release main branch Aug 19, 2025
Changed the path to the fee-payer-local.json file in the run target to reflect its new location under tests/src/common/local-keys. This ensures the correct key file is used when running the default configuration.
dev-jodee and others added 5 commits August 19, 2025 14:28
- Added `is_payment_required` method to `ValidationConfig` to determine if a payment instruction is necessary.
- Enhanced `estimate_transaction_fee` to include estimated fees for payment instructions.
- Introduced `has_payment_instruction` to check for payment instructions in transactions.
- Updated transaction signing methods to utilize the new fee estimation logic.
- Refactored instruction parsing to validate account indexes for various SPL and system instructions.
- Added tests to ensure correct fee estimation behavior with and without payment instructions.
* feat: Token 2022 Improvements

-Update Token2022 account and mint structures to use HashMap for extensions

- Replaced raw extension data Vec<u8> with HashMap<u16, ParsedExtension> in Token2022Account and Token2022Mint.
- Introduced ParsedExtension enum to encapsulate various extension types.
- Refactored methods to utilize the new extensions structure for better type safety and clarity.
- Removed deprecated methods related to raw extension data parsing.
- Updated tests to reflect changes in the extensions handling.

- Added all extensions that we want to support
- ATA creation fee now takes into accoutn spl 2022 (could be bigger account size)

Added check on payment transaction to make sure that the mint / token account doesn't have blocked extensions

* PR Comments
* feat: (PRO-162) Implement Redis caching for account data

- Added Redis-based caching functionality to improve performance for Solana RPC calls.
- Introduced CacheUtil for managing cache operations, including initialization, retrieval, and invalidation of cached account data.
- Updated Kora configuration to support cache settings, including enabling/disabling and TTL values.
- Integrated caching into various components, replacing direct RPC calls with cache lookups where applicable.
- Enhanced Docker setup to include a Redis service for local development.
- Updated tests to validate caching behavior and configuration parsing.
* feat: (PRO-162) Implement Redis caching for account data

- Added Redis-based caching functionality to improve performance for Solana RPC calls.
- Introduced CacheUtil for managing cache operations, including initialization, retrieval, and invalidation of cached account data.
- Updated Kora configuration to support cache settings, including enabling/disabling and TTL values.
- Integrated caching into various components, replacing direct RPC calls with cache lookups where applicable.
- Enhanced Docker setup to include a Redis service for local development.
- Updated tests to validate caching behavior and configuration parsing.

* docs: update config docuemntation

- add redis
- add token 2022

---------

Co-authored-by: Jo D <jo.desorm@proton.me>
* chore: fix TS CI
* chore: fix Rust CI (add ATA init step)
* chore: add CI test to Release branch pulls
dev-jodee and others added 12 commits August 20, 2025 10:25
…183)

* feat(metrics): (PRO-160) add fee payer balance tracking via metrics

- Introduced a new balance tracking feature for monitoring the fee payer's SOL balance using Prometheus metrics.
- Updated Docker configuration to include Redis URL for caching.
- Enhanced Kora configuration to support fee payer balance metrics with expiry settings.
- Refactored cache handling to integrate account caching with balance tracking.
- Added tests for balance tracking functionality and updated metrics server to handle background tasks.

* docs: monitoring docs

---------

Co-authored-by: amilz <85324096+amilz@users.noreply.github.com>
… strategies (#184)

* feat(signer): implement multi-signer support with different strategies

- Added support for multiple signers in Kora gasless relayer, allowing for load balancing and high availability.
- Introduced `signers.toml` configuration file for defining signer pool and strategies.
- Updated CLI to accept `--signers-config` for multi-signer initialization.
- Refactored signer initialization logic to accommodate both single and multi-signer modes.
- Enhanced global state management to support signer pools.
- Added new types and methods for managing signer metadata and selection strategies.
- Updated relevant tests and documentation to reflect new functionality.

* feat(signer): enhance multi-signer functionality with optional signer hints

- Introduced `get_request_signer_with_hint` to allow specifying a signer hint for consistent signer usage across RPC calls.
- Updated relevant RPC methods to utilize the new signer hint feature, ensuring the correct signer is used based on client requests.
- Enhanced metrics tracking to support multiple signers, including updates to balance tracking and Prometheus metrics.
- Refactored tests to validate multi-signer behavior and hint functionality, ensuring robust integration with existing features.
- Updated configuration to support multiple fee payers, reflecting changes in the signer pool structure.
* chore: (PRO-229) signer docs & sdk updates (#185)

* sdk: update request/response types

* docs: update signer documentation

Update ADDING_SIGNERS.md
Update QUICK_START.md
Update MONITORING.md
Update SIGNERS.md
Update README.md

---------

Co-authored-by: amilz <85324096+amilz@users.noreply.github.com>
* feat: add get_payer_signer method
* tests: rust basic integration tests
* sdk: update TS SDK
* docs: add to docs
* chore: use helper method & cleanup
* Update typescript-integration.yml

* Revert "Update typescript-integration.yml"

This reverts commit e97ebce.

* chore: test error codes

* chore: update commitment

* chore: finalize mint setup
* Update typescript-integration.yml

* Revert "Update typescript-integration.yml"

This reverts commit e97ebce.

* chore: test error codes

* chore: update commitment

* chore: finalize mint setup

* feat: add getPaymentInstruction

- adds a helper instruction to get a payment instruction based on a transaction
- adds a couple of private helper methods

* unit tests

* chore: add todo

* chore: update estimate txn fee response

add payment address to est fee response for better devex

Update rpc_integration_tests.rs

* chore: update ts tests

* chore: remove unused methods

* Apply suggestion from @ellipsis-dev[bot]

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: jo <17280917+dev-jodee@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* docs: add getPaymentInstruction to TS SDK
* docs: update CONFIGURATION.md
* update reference to payment addresses and signers
* docs: update Quick Start Guide
* docs: update MONITORING.md
* docs: update SIGNERS.md
* docs: update CLAUDE.md
* feat(tests): (PRO-163) massive rehaul of mocking for unit testing, in order to reach the coveted 80% coverage

- Added `redis-test` crate for improved testing of caching functionality.
- Refactored `CacheUtil` to enhance account caching methods, including reintroducing `get_account_from_rpc_and_cache` and adding `is_cache_enabled` method.
- Updated tests to utilize new mock structures for Redis caching, ensuring robust validation of caching behavior.
- Cleaned up unused methods and improved overall code organization in cache-related files.

* Cache tests

* Config tests

* Error tests

* Fee tests

* Balance tests

* RPC methods unit test

* Signer test (part 1)

* RPC tests

* Transaction tests

* Signers external call tests

* Tokens Tests

* Rust CI update
- add CLI documentation
- fix legacy cli commands across guides
- update Quick Start Guide & Config
- update Railway Guide & Config
…rom b64 messages (#196)

* feat/add client base64 message instruction parsing

Enhances the KoraClient's transferTransaction method to include parsed instructions from the base64-encoded transaction message in its response. Updates documentation, types, and tests to reflect this change, and introduces a utility for extracting instructions from transaction messages.

* chore: Make instructions field always present in TransferTransactionResponse

  - Changed instructions from optional (Instruction[]?) to required (Instruction[]) in the response type
  - Ensures we always set the field, even for empty/invalid messages (returns empty array)
  - Better API consistency - developers can always rely on the field being present
  - Maintains backward compatibility while providing a cleaner interface

* chore: update typedocs

* docs: remove console logs from example
* feat: Integration testing rehaul

-Refactor Makefile structure and add new build, client, coverage, documentation, metrics, and TypeScript test makefiles for improved organization and functionality.

refactor: Update error handling and enhance integration tests

- Refactor error display and debug formatting in KoraError tests for improved readability.
- Revise Makefile to streamline integration test phases and update test names for clarity.
- Introduce new integration tests for API key and HMAC authentication, ensuring robust coverage of authentication scenarios.
- Consolidate and reorganize existing tests, removing deprecated files and enhancing structure for better maintainability.

refactor: Update test structure and add lookup table functionality & payment test for v0

- Add new tests for payment address handling with legacy and V0 formats, including scenarios for valid and invalid payment addresses.
- Introduce a new module for managing lookup tables, enhancing test setup and organization.
- Update Makefile and CI workflow for improved coverage reporting and integration test execution.
- Clean up existing test utilities and remove deprecated code related to lookup tables.

feat: Enhance fee estimation and transaction signing with lookup table support

- Implement `get_estimate_fee_resolved` to handle V0 transactions with lookup tables.
- Update transaction fee validation to utilize resolved transactions.
- Refactor tests to streamline transaction signing and fee estimation for legacy and V0 formats, incorporating lookup table scenarios.
- Improve test structure for better organization and clarity in handling payment addresses and transaction types.

feat: Add V0 transaction signing and simulation tests with lookup table support

- Introduce new tests for signing and simulating V0 transactions, including scenarios with and without lookup tables.
- Enhance existing tests for transaction signing to cover SPL transfers and fee payment scenarios.
- Refactor test names for clarity and consistency in handling V0 transaction formats.
- Clean up unused imports and improve test structure for better organization.
@dev-jodee dev-jodee marked this pull request as ready for review August 27, 2025 19:55
@dev-jodee dev-jodee merged commit fc329e9 into main Aug 27, 2025
7 checks passed
@ellipsis-dev
Copy link
Copy Markdown
Contributor

ellipsis-dev bot commented Aug 27, 2025

⚠️ This PR is too big for Ellipsis, but support for larger PRs is coming soon. If you want us to prioritize this feature, let us know at help@ellipsis.dev


Generated with ❤️ by ellipsis.dev

@dev-jodee dev-jodee deleted the release/pre-release-main-branch branch January 6, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants