Skip to content

feat: add tx-log middleware#635

Merged
kien6034 merged 19 commits intoclassic-terra:mainfrom
orbitorg:hoa/add-tx-logs
Jan 15, 2026
Merged

feat: add tx-log middleware#635
kien6034 merged 19 commits intoclassic-terra:mainfrom
orbitorg:hoa/add-tx-logs

Conversation

@hoank101
Copy link
Copy Markdown
Collaborator

Summary of changes

Report of required housekeeping

  • Github issue OR spec proposal link
  • Wrote tests
  • Updated API documentation (client/lcd/swagger-ui/swagger.yaml)
  • Added a relevant changelog entry: clog add [section] [stanza] [message]

(FOR ADMIN) Before merging

  • Added appropriate labels to PR
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)
  • Confirm added tests are consistent with the intended behavior of changes
  • Ensure all tests pass

@TropicalDog17 TropicalDog17 force-pushed the hoa/add-tx-logs branch 2 times, most recently from ab2384d to 95a5d55 Compare January 13, 2026 18:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a middleware to reconstruct the deprecated logs field in transaction query responses for backwards compatibility with Cosmos SDK 0.50+, along with CI/CD optimizations and test improvements.

Changes:

  • Added TxLogsMiddleware to reconstruct the deprecated logs field from events in transaction query responses for backwards compatibility
  • Optimized E2E CI workflow with Docker layer caching and parallel test execution
  • Fixed test timing issues by querying balances immediately before transactions to minimize interference from staking rewards

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
server/tx_logs_middleware.go New middleware implementation that intercepts tx query responses and reconstructs logs field from events
server/tx_logs_middleware_test.go Comprehensive unit tests for the middleware including multiple test scenarios
app/app.go Integration of TxLogsMiddleware into the API server router
tests/e2e/api_regression_test.go New E2E test validating the logs reconstruction functionality
tests/e2e/e2e_test.go Timing fixes to query balances closer to transactions to reduce test flakiness
tests/e2e/e2e.Dockerfile Docker build optimization with pre-cached Go modules from host
.github/workflows/e2e.yml Complete workflow refactor with build/test separation, parallel execution, and caching
.gitignore Added .cache/ directory for CI-populated Go module cache

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Collaborator

@StrathCole StrathCole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just want to clarify that one question.

@kien6034 kien6034 merged commit 14f4ded into classic-terra:main Jan 15, 2026
29 checks passed
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.

5 participants