Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add error log to txstatus #3788

Merged
merged 5 commits into from
Aug 19, 2024
Merged

feat: add error log to txstatus #3788

merged 5 commits into from
Aug 19, 2024

Conversation

ninabarbakadze
Copy link
Member

@ninabarbakadze ninabarbakadze commented Aug 18, 2024

Overview

  • Bump celestia-core verison including refactored TxStatus work
  • Extend the rpc response to return the error log
  • Update TxClient with extended TxStatus struct

@ninabarbakadze ninabarbakadze added the backport:v2.x PR will be backported automatically to the v2.x branch upon merging label Aug 18, 2024
Copy link
Member Author

@ninabarbakadze ninabarbakadze left a comment

Choose a reason for hiding this comment

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

I think breaking proto should not be a problem here

@ninabarbakadze ninabarbakadze marked this pull request as ready for review August 19, 2024 09:35
Copy link
Contributor

coderabbitai bot commented Aug 19, 2024

Walkthrough

Walkthrough

The recent changes improve error handling and clarity across transaction processing components. Key updates include the addition of an Error field in transaction-related responses, enhancing feedback for failures. Test assertions have been made more informative for better diagnostics, and unnecessary comments were removed to streamline the code. Dependency upgrades ensure the application utilizes the latest features and fixes from external libraries, enhancing overall stability.

Changes

Files Change Summary
app/grpc/tx/server.go Modified TxStatus function to include an Error field in the response for improved transaction status feedback.
app/test/big_blob_test.go Enhanced error handling assertions in TestErrBlobsTooLarge for clearer test failures.
app/test/prepare_proposal_context_test.go, app/test/square_size_test.go, app/test/std_sdk_test.go, x/blobstream/integration_test.go Removed commented-out lines related to temporary log querying workarounds to improve code clarity.
go.mod Updated Tendermint dependency version from v1.39.0-tm-v0.34.29 to v1.40.0-tm-v0.34.29, reflecting an upgrade.
pkg/user/tx_client.go Added Error field to TxResponse struct and refactored submission methods to utilize a new helper function for better error handling.
pkg/user/tx_client_test.go Introduced a new test case for error logging during transaction execution failures and added necessary imports.
proto/celestia/core/v1/tx/tx.proto Added error field to TxStatusResponse message for capturing error logs, renumbering existing fields accordingly.
test/interchain/go.mod Updated versions for dependencies github.com/celestiaorg/nmt and github.com/tendermint/tendermint to newer releases.
x/signal/legacy_test.go Removed serviceClient field from LegacyUpgradeTestSuite, simplifying transaction query handling and enhancing clarity in tests.

Sequence Diagram(s)

sequenceDiagram
    participant C as Client
    participant S as txServer
    participant T as Transaction Service

    C->>S: Request TxStatus
    S->>T: Query Transaction Status
    T-->>S: Return Transaction Status (with Error if any)
    S-->>C: Respond with TxStatus (including Error field)
Loading

Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between e2d0a1d and 15a973d.

Files selected for processing (1)
  • pkg/user/tx_client.go (6 hunks)
Files skipped from review as they are similar to previous changes (1)
  • pkg/user/tx_client.go

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

cmwaters
cmwaters previously approved these changes Aug 19, 2024
pkg/user/tx_client.go Outdated Show resolved Hide resolved
pkg/user/tx_client_test.go Show resolved Hide resolved
Co-authored-by: Callum Waters <[email protected]>
@@ -46,6 +47,7 @@ type TxResponse struct {
Height int64
TxHash string
Code uint32
Error string
Copy link
Contributor

Choose a reason for hiding this comment

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

I would advocate for removing error here because it should be returned in the error type

Copy link
Member Author

Choose a reason for hiding this comment

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

done!

@celestia-bot celestia-bot requested a review from a team August 19, 2024 10:17
@ninabarbakadze ninabarbakadze self-assigned this Aug 19, 2024
pkg/user/tx_client.go Outdated Show resolved Hide resolved
proto/celestia/core/v1/tx/tx.proto Show resolved Hide resolved
Co-authored-by: Callum Waters <[email protected]>
@celestia-bot celestia-bot requested a review from a team August 19, 2024 10:52
@ninabarbakadze ninabarbakadze merged commit 02b604d into main Aug 19, 2024
30 of 32 checks passed
@ninabarbakadze ninabarbakadze deleted the nina/extend-txstatus branch August 19, 2024 11:57
mergify bot pushed a commit that referenced this pull request Aug 19, 2024
## Overview

- [x] Bump celestia-core verison including refactored TxStatus work
- [x] Extend the rpc response to return the error log
- [x] Update TxClient with extended TxStatus struct

---------

Co-authored-by: Callum Waters <[email protected]>
(cherry picked from commit 02b604d)

# Conflicts:
#	app/test/big_blob_test.go
#	app/test/prepare_proposal_context_test.go
#	app/test/square_size_test.go
#	app/test/std_sdk_test.go
#	pkg/user/tx_client.go
#	pkg/user/tx_client_test.go
#	x/blobstream/integration_test.go
#	x/signal/legacy_test.go
ninabarbakadze added a commit that referenced this pull request Aug 20, 2024
## Overview

Ended up cherry picking
#3790 to make it easier
for the reviewer

---------

Co-authored-by: nina / ნინა <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:v2.x PR will be backported automatically to the v2.x branch upon merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants