feat: distributed tracing, audit log partitioning, mock Horizon, fee calculator (#709 #711 #712 #720)#795
Merged
Conversation
…cal-mock-horizon-api-server, extract-congestion-fee-calculator-module - Stellar-Fluid#709: Add W3C traceparent distributed tracing in fluid-server (tracing.rs) - SpanContext with trace/span ID generation and propagation - Extract/inject helpers for HTTP headers - traceparent header on fee-bump responses - Stellar-Fluid#711: Partition AuditLog table by month in server - SQL migration (20260601000000_partition_audit_logs_by_month) - AuditLogPartitionManager service with ensurePartitions/listPartitions/pruneOldPartitions - Full unit test coverage - Stellar-Fluid#712: Extract congestion fee calculator module in fluid-server (fee_calculator.rs) - Pure calculate_fee() function decoupled from API server - FeeCalculator struct with configurable base_fee and multiplier - CongestionLevel classification (low/medium/high) - Stellar-Fluid#720: Local mock Horizon API server in fluid-server (mock_horizon.rs) - Simulates success, 429, 500, 502, 503, 504, connection reset - Horizon tx error extras (tx_bad_seq, tx_insufficient_fee, tx_failed) - Latency injection, per-path scenario overrides, request capture - fail_count auto-reset for transient failure simulation Also fix pre-existing compile errors: xdr.rs borrow, archive.rs ByteStream, memory_leak_profiling.rs import, load_testing_integration.rs String type, main.rs duplicate serde import.
|
@devJaja 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! 🚀 |
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
Closes #709
Closes #711
Closes #712
Closes #720
#709 — Distributed Tracing Integration (
fluid-server)src/tracing.rs: W3CtraceparentSpanContext (TraceId, SpanId), extract/inject helpers for HTTP boundariesfee_bumphandler extracts incoming trace context and echoestraceparenton the response#711 — Partition Audit Logs Table (
server)20260601000000_partition_audit_logs_by_month: RANGE-partitionedAuditLogwith monthly child partitions (24 months back → 3 ahead) + default partitionauditLogPartitionManager.ts:ensurePartitions,listPartitions,pruneOldPartitionsauditLogPartitionManager.test.ts#712 — Extract Congestion Fee Calculator Module (
fluid-server)src/fee_calculator.rs: purecalculate_fee()+FeeCalculatorstruct decoupled from the API serverCongestionLevelenum (Low/Medium/High), full unit tests#720 — Local Mock Horizon API Server (
fluid-server)src/mock_horizon.rs: in-process Axum server simulating HorizonPre-existing compile fixes
xdr.rsborrow checker,archive.rsByteStream,memory_leak_profiling.rsimport,load_testing_integration.rsString type,main.rsduplicate serde import