Skip to content

Feat/asset issuer normalization qa#926

Closed
Chrisbankz0 wants to merge 4 commits into
Pulsefy:mainfrom
Chrisbankz0:feat/asset-issuer-normalization-qa
Closed

Feat/asset issuer normalization qa#926
Chrisbankz0 wants to merge 4 commits into
Pulsefy:mainfrom
Chrisbankz0:feat/asset-issuer-normalization-qa

Conversation

@Chrisbankz0

Copy link
Copy Markdown

#closes
#875

Summary

This Pull Request implements two major features for the LumenPulse data-processing service:

  1. Asset Issuer Normalization Utility: canonically parses, cleans, and normalizes Stellar blockchain asset inputs (native and issued assets in various formats: string, dict, tuple) with a dataset-driven regression test suite.
  2. Crowdfund Vault Event KPI Computation: computes protocol-level KPIs (TVL and cumulative volume) from Crowdfund events, persists them to a JSONL file, and exposes them via a new HTTP API endpoint GET /crowdfund/metrics.

1. Asset Issuer Normalization

  • Core Logic: Implemented in asset_normalizer.py. Supports native asset aliases (xlm, native, etc.) and issued assets (alphanum4/alphanum12) with G-address validation.
  • Type Signatures: Adjusted to support Optional types for runtime None parameter handling, and resolved static type checking errors with appropriate type-ignore annotations.
  • Regression Dataset: Created a comprehensive suite of 40 parameterized success/failure cases in asset_issuer_normalization_qa.json.
  • Unit/Regression Tests: Fully covered in test_asset_normalizer.py.
  • Documentation: Detailed in ASSET_NORMALIZATION_QA.md.

2. Crowdfund Vault Event KPI Computation

  • KPI processor: Implemented in crowdfund_metrics.py. Computes cumulative deposit volume and TVL (with floor-at-zero safeguards and out-of-order idempotency/event correction handling).
  • Persistence & API: Stored locally in JSONL format, exposed at GET /crowdfund/metrics in server.py.
  • Unit Tests: Implemented in test_crowdfund_metrics.py.

Linked Issue

Closes #734


Type of Change

  • feat
  • fix
  • docs
  • refactor
  • test
  • chore

Validation

  • Lint passed for affected area(s)
  • Tests passed for affected area(s)
  • Manual verification completed (if applicable)

Test Results

Run pytest specifically for the newly introduced tests:

  • pytest tests/test_asset_normalizer.py -v (83 tests passed)
  • pytest tests/unit/test_crowdfund_metrics.py -v (all tests passed)

Documentation

  • Documentation updated (or N/A with explanation)
  • Screenshots/videos attached for UI changes

Checklist

  • Branch name uses feat/, fix/, or docs/ (Current branch: feat/asset-issuer-normalization-qa)
  • Commit messages follow Conventional Commits
  • PR scope matches linked issue acceptance criteria

christopher added 2 commits May 26, 2026 22:04
…n regression tests and add crowdfund KPI computation logic with API support.
@Cedarich

Copy link
Copy Markdown
Contributor

@Chrisbankz0 fix conflicts

@drips-wave

drips-wave Bot commented Jun 26, 2026

Copy link
Copy Markdown

@Chrisbankz0 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Cedarich

Copy link
Copy Markdown
Contributor

@Chrisbankz0 fix workflow

@Cedarich Cedarich closed this Jun 29, 2026
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.

Data-processing: Compute Protocol KPIs (TVL, Volume) from Crowdfund Vault Events

2 participants