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

fix: adjust evm outbound tracker reporter to avoid submitting invalid hashes #2628

Merged
merged 15 commits into from
Aug 14, 2024

Conversation

ws4charlie
Copy link
Contributor

@ws4charlie ws4charlie commented Aug 2, 2024

Description

  • move method reportToOutboundTracker from chains/evm/signer/signer.go to a new file outbound_tracker_reporter.go.
  • 1st change in reportToOutboundTracker: DON'T report outbound hash any more after 20 mins timeout.
  • 2nd change in reportToOutboundTracker: simplified implementation by create sub method IsTxConfirmed.
  • 3rd change in reportToOutboundTracker: enforce 2 block confirmation on tx receipt to prevent chain reorg (suggested by Panruo).
  • make WatchOutbound shorter by taking out inner tracker iteration loop and creating sub method ProcessOutboundTrackers.
  • Print log when zetaclient detects outbound trackers that are full of invalid hashes.
    The log print will contain pattern outbound tracker is full of invalid hashes
  • unified logger format with pre-defined field names, for instance module, method, chain, nonce, tx, cctx etc.

How Has This Been Tested?

  • Tested CCTX in localnet
  • Tested in development environment
  • Go unit tests
  • Go integration tests
  • Tested via GitHub Actions

Summary by CodeRabbit

  • New Features

    • Enhanced outbound tracking mechanism to prevent submission of invalid hashes.
    • Added new constant ZetaBlockTime to represent estimated block timing.
    • Introduced ReorgProtectBlockCount to manage blockchain reorganizations.
    • Implemented IsTxConfirmed function for verifying transaction confirmations on Ethereum-like chains.
    • New function reportToOutboundTracker for managing outbound transaction tracking.
  • Bug Fixes

    • Improved error handling in the logging functionality for outbound transactions.
  • Documentation

    • Updated changelog to reflect new features and improvements.
  • Refactor

    • Restructured outbound tracking logic into a dedicated method for better code organization.

…s; print log when outbound tracker is full of invalid hashes
@ws4charlie ws4charlie added bug Something isn't working zetaclient Issues related to ZetaClient mainnet labels Aug 2, 2024
Copy link
Contributor

coderabbitai bot commented Aug 2, 2024

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Walkthrough

This series of changes across the Zeta Chain codebase introduces enhancements to transaction tracking, logging, and constant management. Key additions include a new validation feature for outbound hash submissions, modifications to block timing constants, and improved logging practices. The restructuring of outbound tracking logic enhances maintainability and clarity. Overall, these updates aim to bolster the robustness and reliability of the Zeta Chain system while streamlining code organization and error handling.

Changes

File Path Change Summary
changelog.md Added entry noting the prevention of invalid hashes in the outbound tracker for improved system reliability.
pkg/constant/constant.go Introduced ZetaBlockTime constant representing block time (6000 ms) to enhance timing calculations.
zetaclient/chains/evm/constant.go Removed ZetaBlockTime (6500 ms) and added ReorgProtectBlockCount constant set to 2 for reorganization protection.
zetaclient/chains/base/observer.go Enhanced logging by replacing string literals with constants from the logs package, improving maintainability.
zetaclient/chains/evm/observer/outbound.go Refactored outbound tracking logic into ProcessOutboundTrackers method for better code organization.
zetaclient/chains/evm/rpc/rpc.go Added IsTxConfirmed function to verify transaction confirmation status, enhancing confirmation checks.
zetaclient/chains/evm/rpc/rpc_live_test.go Introduced live test for IsTxConfirmed to validate transaction confirmation functionality.
zetaclient/chains/evm/signer/outbound_tracker_reporter.go Implemented reportToOutboundTracker function for managing outbound transaction tracking with confirmation checks.
zetaclient/chains/evm/signer/signer.go Removed reportToOutboundTracker function, altering outbound transaction tracking logic.
zetaclient/chains/solana/signer/outbound_tracker_reporter.go Enhanced logging in reportToOutboundTracker for better traceability of transaction statuses.
zetaclient/logs/fields.go Introduced constants for standardizing logging field keys and module names to improve log clarity.
zetaclient/orchestrator/orchestrator.go Replaced evm.ZetaBlockTime with constant.ZetaBlockTime for consistent block time reference across modules.

Sequence Diagram(s)

sequenceDiagram
    participant Observer
    participant OutboundTracker
    participant Logger
    participant VerificationService
    
    Observer->>OutboundTracker: WatchOutbound()
    OutboundTracker->>OutboundTracker: ProcessOutboundTrackers()
    OutboundTracker->>VerificationService: Check Transaction Status
    VerificationService-->>OutboundTracker: Confirmed/Not Confirmed
    OutboundTracker->>Logger: Log Transaction Outcome
Loading
sequenceDiagram
    participant Signer
    participant Tracker
    participant Logger
    
    Signer->>Tracker: Report Outbound Transaction
    Tracker->>Tracker: Monitor Confirmation Status
    alt Confirmed
        Tracker->>Logger: Log Confirmation
    else Not Confirmed
        Tracker->>Logger: Log Pending Status
    end
Loading

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:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • 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.

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

Attention: Patch coverage is 22.75449% with 129 lines in your changes missing coverage. Please review.

Project coverage is 70.60%. Comparing base (de6ed7b) to head (8a834d4).
Report is 1 commits behind head on develop.

Files Patch % Lines
zetaclient/chains/evm/observer/outbound.go 0.00% 65 Missing ⚠️
...ent/chains/evm/signer/outbound_tracker_reporter.go 34.28% 20 Missing and 3 partials ⚠️
zetaclient/chains/evm/rpc/rpc.go 0.00% 18 Missing ⚠️
.../chains/solana/signer/outbound_tracker_reporter.go 0.00% 16 Missing ⚠️
zetaclient/chains/evm/signer/signer.go 70.00% 2 Missing and 1 partial ⚠️
zetaclient/orchestrator/orchestrator.go 0.00% 3 Missing ⚠️
zetaclient/chains/solana/observer/outbound.go 90.90% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2628      +/-   ##
===========================================
+ Coverage    70.35%   70.60%   +0.25%     
===========================================
  Files          338      340       +2     
  Lines        18599    18533      -66     
===========================================
+ Hits         13085    13086       +1     
+ Misses        4922     4857      -65     
+ Partials       592      590       -2     
Files Coverage Δ
zetaclient/chains/base/observer.go 86.09% <100.00%> (ø)
zetaclient/chains/base/signer.go 95.74% <100.00%> (+0.29%) ⬆️
zetaclient/chains/evm/observer/observer.go 60.34% <ø> (+2.19%) ⬆️
zetaclient/chains/evm/signer/outbound_data.go 82.19% <ø> (+10.42%) ⬆️
zetaclient/chains/solana/observer/outbound.go 27.74% <90.90%> (ø)
zetaclient/chains/evm/signer/signer.go 58.60% <70.00%> (+5.67%) ⬆️
zetaclient/orchestrator/orchestrator.go 22.34% <0.00%> (-0.12%) ⬇️
.../chains/solana/signer/outbound_tracker_reporter.go 0.00% <0.00%> (ø)
zetaclient/chains/evm/rpc/rpc.go 0.00% <0.00%> (ø)
...ent/chains/evm/signer/outbound_tracker_reporter.go 34.28% <34.28%> (ø)
... and 1 more

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 26

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between b4251e1 and 26f56dc.

Files selected for processing (12)
  • changelog.md (1 hunks)
  • pkg/constant/constant.go (1 hunks)
  • zetaclient/chains/base/observer.go (2 hunks)
  • zetaclient/chains/evm/constant.go (1 hunks)
  • zetaclient/chains/evm/observer/outbound.go (5 hunks)
  • zetaclient/chains/evm/rpc/rpc.go (1 hunks)
  • zetaclient/chains/evm/rpc/rpc_live_test.go (1 hunks)
  • zetaclient/chains/evm/signer/outbound_tracker_reporter.go (1 hunks)
  • zetaclient/chains/evm/signer/signer.go (2 hunks)
  • zetaclient/chains/solana/signer/outbound_tracker_reporter.go (4 hunks)
  • zetaclient/logs/fields.go (1 hunks)
  • zetaclient/orchestrator/orchestrator.go (2 hunks)
Additional context used
Path-based instructions (11)
zetaclient/logs/fields.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

zetaclient/chains/evm/rpc/rpc_live_test.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

pkg/constant/constant.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

zetaclient/chains/evm/rpc/rpc.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

zetaclient/chains/evm/constant.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

zetaclient/chains/evm/signer/outbound_tracker_reporter.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

zetaclient/chains/solana/signer/outbound_tracker_reporter.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

zetaclient/chains/base/observer.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

zetaclient/chains/evm/observer/outbound.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

zetaclient/orchestrator/orchestrator.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

zetaclient/chains/evm/signer/signer.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

GitHub Check: codecov/patch
zetaclient/chains/evm/rpc/rpc.go

[warning] 18-18: zetaclient/chains/evm/rpc/rpc.go#L18
Added line #L18 was not covered by tests


[warning] 20-22: zetaclient/chains/evm/rpc/rpc.go#L20-L22
Added lines #L20 - L22 were not covered by tests


[warning] 24-25: zetaclient/chains/evm/rpc/rpc.go#L24-L25
Added lines #L24 - L25 were not covered by tests


[warning] 29-31: zetaclient/chains/evm/rpc/rpc.go#L29-L31
Added lines #L29 - L31 were not covered by tests


[warning] 35-36: zetaclient/chains/evm/rpc/rpc.go#L35-L36
Added lines #L35 - L36 were not covered by tests


[warning] 40-42: zetaclient/chains/evm/rpc/rpc.go#L40-L42
Added lines #L40 - L42 were not covered by tests


[warning] 46-47: zetaclient/chains/evm/rpc/rpc.go#L46-L47
Added lines #L46 - L47 were not covered by tests


[warning] 49-49: zetaclient/chains/evm/rpc/rpc.go#L49
Added line #L49 was not covered by tests


[warning] 51-51: zetaclient/chains/evm/rpc/rpc.go#L51
Added line #L51 was not covered by tests

zetaclient/chains/evm/signer/outbound_tracker_reporter.go

[warning] 36-38: zetaclient/chains/evm/signer/outbound_tracker_reporter.go#L36-L38
Added lines #L36 - L38 were not covered by tests


[warning] 44-45: zetaclient/chains/evm/signer/outbound_tracker_reporter.go#L44-L45
Added lines #L44 - L45 were not covered by tests


[warning] 57-59: zetaclient/chains/evm/signer/outbound_tracker_reporter.go#L57-L59
Added lines #L57 - L59 were not covered by tests


[warning] 63-66: zetaclient/chains/evm/signer/outbound_tracker_reporter.go#L63-L66
Added lines #L63 - L66 were not covered by tests


[warning] 68-69: zetaclient/chains/evm/signer/outbound_tracker_reporter.go#L68-L69
Added lines #L68 - L69 were not covered by tests


[warning] 73-79: zetaclient/chains/evm/signer/outbound_tracker_reporter.go#L73-L79
Added lines #L73 - L79 were not covered by tests


[warning] 81-82: zetaclient/chains/evm/signer/outbound_tracker_reporter.go#L81-L82
Added lines #L81 - L82 were not covered by tests

zetaclient/chains/solana/signer/outbound_tracker_reporter.go

[warning] 32-37: zetaclient/chains/solana/signer/outbound_tracker_reporter.go#L32-L37
Added lines #L32 - L37 were not covered by tests


[warning] 43-43: zetaclient/chains/solana/signer/outbound_tracker_reporter.go#L43
Added line #L43 was not covered by tests

zetaclient/chains/evm/observer/outbound.go

[warning] 36-38: zetaclient/chains/evm/observer/outbound.go#L36-L38
Added lines #L36 - L38 were not covered by tests


[warning] 42-42: zetaclient/chains/evm/observer/outbound.go#L42
Added line #L42 was not covered by tests


[warning] 65-65: zetaclient/chains/evm/observer/outbound.go#L65
Added line #L65 was not covered by tests


[warning] 67-70: zetaclient/chains/evm/observer/outbound.go#L67-L70
Added lines #L67 - L70 were not covered by tests


[warning] 82-86: zetaclient/chains/evm/observer/outbound.go#L82-L86
Added lines #L82 - L86 were not covered by tests


[warning] 90-93: zetaclient/chains/evm/observer/outbound.go#L90-L93
Added lines #L90 - L93 were not covered by tests


[warning] 96-96: zetaclient/chains/evm/observer/outbound.go#L96
Added line #L96 was not covered by tests


[warning] 98-100: zetaclient/chains/evm/observer/outbound.go#L98-L100
Added lines #L98 - L100 were not covered by tests


[warning] 104-115: zetaclient/chains/evm/observer/outbound.go#L104-L115
Added lines #L104 - L115 were not covered by tests


[warning] 121-123: zetaclient/chains/evm/observer/outbound.go#L121-L123
Added lines #L121 - L123 were not covered by tests


[warning] 125-128: zetaclient/chains/evm/observer/outbound.go#L125-L128
Added lines #L125 - L128 were not covered by tests


[warning] 133-133: zetaclient/chains/evm/observer/outbound.go#L133
Added line #L133 was not covered by tests

Additional comments not posted (12)
zetaclient/logs/fields.go (1)

1-33: LGTM!

The constants for log field keys and module names are well-organized and self-explanatory. The comments provide clear context.

zetaclient/chains/evm/rpc/rpc_live_test.go (1)

1-45: LGTM!

The test suite for the EVM RPC client is well-structured and the tests are clearly defined. The use of require for assertions is appropriate.

pkg/constant/constant.go (1)

3-8: LGTM!

The new constant ZetaBlockTime is well-documented and provides a useful estimate for block timing.

zetaclient/chains/evm/rpc/rpc.go (2)

49-51: Improve readability of block confirmation check.

The calculation of blocks can be simplified to improve readability.

-  blocks := lastHeight - receipt.BlockNumber.Uint64() + 1
+  blocks := lastHeight - receipt.BlockNumber.Uint64() + 1

Likely invalid or redundant comment.

Tools
GitHub Check: codecov/patch

[warning] 49-49: zetaclient/chains/evm/rpc/rpc.go#L49
Added line #L49 was not covered by tests


[warning] 51-51: zetaclient/chains/evm/rpc/rpc.go#L51
Added line #L51 was not covered by tests


46-47: Avoid redundant checks for block height.

The check for lastHeight < receipt.BlockNumber.Uint64() can be simplified to improve readability.

-  if lastHeight < receipt.BlockNumber.Uint64() {
-    return false, nil
-  }
+  if lastHeight < receipt.BlockNumber.Uint64() {
+    return false, nil
+  }

Likely invalid or redundant comment.

Tools
GitHub Check: codecov/patch

[warning] 46-47: zetaclient/chains/evm/rpc/rpc.go#L46-L47
Added lines #L46 - L47 were not covered by tests

zetaclient/chains/evm/constant.go (1)

9-11: LGTM! The changes to constants are approved.

The addition of ReorgProtectBlockCount and the removal of ZetaBlockTime are appropriate and improve the resilience of the system against reorgs.

zetaclient/chains/evm/signer/outbound_tracker_reporter.go (1)

57-59: Ensure proper logging for timeout events.

The log message should include more context for better debugging.

-  logger.Info().Msgf("timeout waiting outbound %s inclusion for chain %d nonce %d", outboundHash, chainID, nonce)
+  logger.Info().Msgf("timeout waiting for outbound %s inclusion for chain %d nonce %d", outboundHash, chainID, nonce)

Likely invalid or redundant comment.

Tools
GitHub Check: codecov/patch

[warning] 57-59: zetaclient/chains/evm/signer/outbound_tracker_reporter.go#L57-L59
Added lines #L57 - L59 were not covered by tests

zetaclient/chains/base/observer.go (1)

299-305: Good use of constants for logging fields.

Replacing hardcoded string literals with constants improves maintainability and reduces the risk of typos. This change enhances the consistency of logging across the application.

zetaclient/orchestrator/orchestrator.go (1)

18-18: Refactor: Centralize constant reference.

The change from evm.ZetaBlockTime to constant.ZetaBlockTime improves maintainability by centralizing the reference to the block time constant.

However, ensure that the new constant is used consistently throughout the codebase.

Verification successful

Verification Successful: Consistent Usage of constant.ZetaBlockTime

The reference to the block time constant has been successfully centralized to constant.ZetaBlockTime, and there are no remaining references to evm.ZetaBlockTime in the codebase.

  • constant.ZetaBlockTime is used in zetaclient/orchestrator/orchestrator.go.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of the new constant `constant.ZetaBlockTime` in the codebase.

# Test: Search for the usage of the new constant. Expect: Consistent usage of `constant.ZetaBlockTime`.
rg --type go 'constant.ZetaBlockTime'

Length of output: 121


Script:

#!/bin/bash
# Description: Verify if there are any remaining references to the old constant `evm.ZetaBlockTime` in the codebase.

# Test: Search for the usage of the old constant. Expect: No occurrences of `evm.ZetaBlockTime`.
rg --type go 'evm.ZetaBlockTime'

Length of output: 32

zetaclient/chains/evm/signer/signer.go (2)

Line range hint 1-1:
Update Import Statements: Remove unused imports.

The import statement for crosschainkeeper has been removed, suggesting a refactoring or change in dependencies. Ensure that all unused imports are removed to maintain clean code.


Line range hint 1-1:
Major Change: Removal of reportToOutboundTracker function.

The removal of the reportToOutboundTracker function indicates a significant shift in how outbound transactions are managed. Ensure that the new approach effectively handles the reporting of outbound transaction hashes to maintain system reliability.

changelog.md (1)

123-123: Changelog Update: New feature entry.

The new entry in the changelog clearly notes the addition of a feature that prevents the submission of invalid hashes to the outbound tracker. This enhances the robustness of the outbound tracking mechanism.

zetaclient/chains/evm/rpc/rpc.go Show resolved Hide resolved
zetaclient/chains/evm/rpc/rpc.go Show resolved Hide resolved
zetaclient/chains/evm/rpc/rpc.go Show resolved Hide resolved
zetaclient/chains/evm/signer/outbound_tracker_reporter.go Outdated Show resolved Hide resolved
zetaclient/chains/evm/signer/outbound_tracker_reporter.go Outdated Show resolved Hide resolved
zetaclient/chains/evm/signer/outbound_tracker_reporter.go Outdated Show resolved Hide resolved
zetaclient/chains/evm/signer/outbound_tracker_reporter.go Outdated Show resolved Hide resolved
zetaclient/chains/evm/signer/outbound_tracker_reporter.go Outdated Show resolved Hide resolved
zetaclient/logs/fields.go Show resolved Hide resolved
zetaclient/chains/evm/signer/outbound_tracker_reporter.go Outdated Show resolved Hide resolved
zetaclient/chains/evm/signer/outbound_tracker_reporter.go Outdated Show resolved Hide resolved
zetaclient/chains/evm/rpc/rpc.go Show resolved Hide resolved
zetaclient/chains/evm/observer/outbound.go Outdated Show resolved Hide resolved
@kingpinXD kingpinXD added the TSS_MIGRATION_TESTS Run TSS migration tests label Aug 14, 2024
@ws4charlie ws4charlie added this pull request to the merge queue Aug 14, 2024
Merged via the queue into develop with commit 8264fe5 Aug 14, 2024
27 of 28 checks passed
@ws4charlie ws4charlie deleted the avoid-submitting-invalid-tracker-hash-evm branch August 14, 2024 22:46
gartnera pushed a commit that referenced this pull request Aug 15, 2024
… hashes (#2628)

* refactor and fix evm outbound tracker reporter to avoid invalid hashes; print log when outbound tracker is full of invalid hashes

* add changelog entry

* used predefined log fields

* remove repeated fields information from log message; Devops team would configure Datadog to show the fields

* remove redundant fields in log message; unified logs

* remove pending transaction map from observer; the outbound tracker reporter will no longer report pending hash

* use bg.Work() to launch outbound tracker reporter goroutines

* bring the checking EnsureNoTrackers() back

* add more rationale to EVM outbound tracker submission

* sync observer and signers without wait on startup

* try fixing tss migration E2E failure by increase timeout
gartnera pushed a commit that referenced this pull request Aug 15, 2024
… hashes (#2628)

* refactor and fix evm outbound tracker reporter to avoid invalid hashes; print log when outbound tracker is full of invalid hashes

* add changelog entry

* used predefined log fields

* remove repeated fields information from log message; Devops team would configure Datadog to show the fields

* remove redundant fields in log message; unified logs

* remove pending transaction map from observer; the outbound tracker reporter will no longer report pending hash

* use bg.Work() to launch outbound tracker reporter goroutines

* bring the checking EnsureNoTrackers() back

* add more rationale to EVM outbound tracker submission

* sync observer and signers without wait on startup

* try fixing tss migration E2E failure by increase timeout
gartnera pushed a commit that referenced this pull request Aug 15, 2024
… hashes (#2628)

* refactor and fix evm outbound tracker reporter to avoid invalid hashes; print log when outbound tracker is full of invalid hashes

* add changelog entry

* used predefined log fields

* remove repeated fields information from log message; Devops team would configure Datadog to show the fields

* remove redundant fields in log message; unified logs

* remove pending transaction map from observer; the outbound tracker reporter will no longer report pending hash

* use bg.Work() to launch outbound tracker reporter goroutines

* bring the checking EnsureNoTrackers() back

* add more rationale to EVM outbound tracker submission

* sync observer and signers without wait on startup

* try fixing tss migration E2E failure by increase timeout
gartnera added a commit that referenced this pull request Aug 16, 2024
* feat: parse inscription like witness data (#2524)

* parse inscription like witness data

* more comment

* remove unused code

* Update zetaclient/chains/bitcoin/tx_script.go

Co-authored-by: Dmitry S <11892559+swift1337@users.noreply.github.com>

* Update zetaclient/chains/bitcoin/observer/inbound.go

Co-authored-by: Dmitry S <11892559+swift1337@users.noreply.github.com>

* Update zetaclient/chains/bitcoin/tx_script.go

Co-authored-by: Dmitry S <11892559+swift1337@users.noreply.github.com>

* Update zetaclient/chains/bitcoin/tx_script.go

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* pull origin

* Update zetaclient/chains/bitcoin/observer/inbound.go

Co-authored-by: Dmitry S <11892559+swift1337@users.noreply.github.com>

* review feedbacks

* update review feedbacks

* update make generate

* fix linter

* remove over flow

* Update zetaclient/chains/bitcoin/observer/inbound.go

Co-authored-by: Francisco de Borja Aranda Castillejo <me@fbac.dev>

* Update zetaclient/chains/bitcoin/tokenizer.go

Co-authored-by: Francisco de Borja Aranda Castillejo <me@fbac.dev>

* Update zetaclient/chains/bitcoin/tokenizer.go

Co-authored-by: Francisco de Borja Aranda Castillejo <me@fbac.dev>

* Update zetaclient/chains/bitcoin/tokenizer.go

Co-authored-by: Francisco de Borja Aranda Castillejo <me@fbac.dev>

* Update zetaclient/chains/bitcoin/tokenizer.go

Co-authored-by: Francisco de Borja Aranda Castillejo <me@fbac.dev>

* update review feedback

* update code commnet

* update comment

* more comments

* Update changelog.md

---------

Co-authored-by: Dmitry S <11892559+swift1337@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Francisco de Borja Aranda Castillejo <me@fbac.dev>

fix version

* feat: detect memo in btc txn from OP_RETURN and inscription (#2533)

* parse inscription like witness data

* more comment

* remove unused code

* parse inscription

* Update zetaclient/chains/bitcoin/tx_script.go

Co-authored-by: Dmitry S <11892559+swift1337@users.noreply.github.com>

* Update zetaclient/chains/bitcoin/observer/inbound.go

Co-authored-by: Dmitry S <11892559+swift1337@users.noreply.github.com>

* Update zetaclient/chains/bitcoin/tx_script.go

Co-authored-by: Dmitry S <11892559+swift1337@users.noreply.github.com>

* Update zetaclient/chains/bitcoin/tx_script.go

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* pull origin

* Update zetaclient/chains/bitcoin/observer/inbound.go

Co-authored-by: Dmitry S <11892559+swift1337@users.noreply.github.com>

* review feedbacks

* update review feedbacks

* add mainnet txn

* Update zetaclient/chains/bitcoin/tx_script.go

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* parse inscription like witness data

* more comment

* remove unused code

* Update zetaclient/chains/bitcoin/tx_script.go

Co-authored-by: Dmitry S <11892559+swift1337@users.noreply.github.com>

* Update zetaclient/chains/bitcoin/observer/inbound.go

Co-authored-by: Dmitry S <11892559+swift1337@users.noreply.github.com>

* Update zetaclient/chains/bitcoin/tx_script.go

Co-authored-by: Dmitry S <11892559+swift1337@users.noreply.github.com>

* Update zetaclient/chains/bitcoin/tx_script.go

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* pull origin

* Update zetaclient/chains/bitcoin/observer/inbound.go

Co-authored-by: Dmitry S <11892559+swift1337@users.noreply.github.com>

* review feedbacks

* update review feedbacks

* update make generate

* fix linter

* remove over flow

* Update zetaclient/chains/bitcoin/observer/inbound.go

Co-authored-by: Francisco de Borja Aranda Castillejo <me@fbac.dev>

* Update zetaclient/chains/bitcoin/tokenizer.go

Co-authored-by: Francisco de Borja Aranda Castillejo <me@fbac.dev>

* Update zetaclient/chains/bitcoin/tokenizer.go

Co-authored-by: Francisco de Borja Aranda Castillejo <me@fbac.dev>

* Update zetaclient/chains/bitcoin/tokenizer.go

Co-authored-by: Francisco de Borja Aranda Castillejo <me@fbac.dev>

* Update zetaclient/chains/bitcoin/tokenizer.go

Co-authored-by: Francisco de Borja Aranda Castillejo <me@fbac.dev>

* update review feedback

* update code commnet

* update comment

* more comments

* Update changelog.md

* Update zetaclient/chains/bitcoin/observer/inbound.go

Co-authored-by: Francisco de Borja Aranda Castillejo <me@fbac.dev>

* Update zetaclient/chains/bitcoin/observer/inbound.go

Co-authored-by: Francisco de Borja Aranda Castillejo <me@fbac.dev>

* clean up

* format code

---------

Co-authored-by: Dmitry S <11892559+swift1337@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Francisco de Borja Aranda Castillejo <me@fbac.dev>

* refactor(zetaclient)!: improve AppContext (#2568)

* Implement chain registry

* Rewrite test-cases for AppContext

* Drop `supplychecker`

* Refactor app ctx Update worker

* Refactor orchestrator

* Refactor observer&signer; DROP postBlockHeaders

* Fix test cases [1]

* Update changelog

* Allow Zeta Chain in appContext; address PR comments [1]

* Fix app context update

* Check for `chain.IsZeta()`

* Add AppContext.FilterChains

* Fix test cases [2]

* Fix test cases [3]

* Address PR comments [1]

* Address PR comments [2]

* Add tests for `slices`

* Fix e2e tests [1]

* Fix e2e tests [2]

* Resolve conflicts, converge codebase between PRs

* Add lodash; remove slices pkg

* Address PR comments

* Minor logging fix

* Address PR comments

tmp

* feat(zetaclient): add generic rpc metrics (#2597)

* feat(zetaclient): add generic rpc metrics

* feedback

* changelog

* fmt

* fix(zetaclient): use name in pending tx metric (#2642)

* feat(pkg): add `ticker` package (#2617)

* Add `pkg/ticker`

* Sample ticker usage in evm observer

* Change naming

* Address PR comments

* Address PR comments

* feat(zetaclient)!: Add support for EIP-1559 gas fees (#2634)

* Add Gas struct

* Add EIP-1559 fees

* Update changelog

* Add test cases for legacy vs dynamicFee txs

* Fix typo; Add E2E coverage

* Address PR comments

* Address PR comments

* Use gasFeeCap formula

* Revert "Use gasFeeCap formula"

This reverts commit 2260925.

* Address PR comments

* Fix e2e upgrade tests

* fix: adjust evm outbound tracker reporter to avoid submitting invalid hashes (#2628)

* refactor and fix evm outbound tracker reporter to avoid invalid hashes; print log when outbound tracker is full of invalid hashes

* add changelog entry

* used predefined log fields

* remove repeated fields information from log message; Devops team would configure Datadog to show the fields

* remove redundant fields in log message; unified logs

* remove pending transaction map from observer; the outbound tracker reporter will no longer report pending hash

* use bg.Work() to launch outbound tracker reporter goroutines

* bring the checking EnsureNoTrackers() back

* add more rationale to EVM outbound tracker submission

* sync observer and signers without wait on startup

* try fixing tss migration E2E failure by increase timeout

* feat: Solana relayer (fee payer) key importer, encryption and decryption (#2673)

* configure observer relayer key for Solana; remove hardcoded solana test key from zetaclient code

* implementation of relayer key importer, encryption and decryption

* integrate relayer key into E2E and Solana signer

* add relayer_key_balance metrics and unit tests

* use TrimSpace to trim password

* add changelog entry

* use relayer account array in E2E config; a few renaming; add private key validation when importing

* fix linter

* remove GetNetworkName method for simplification

* added PromptPassword method to prompt single password

* use network name as map index to store relayer key passwords

* moved relayer passwords to chain registry

* airdrop SOL token only if solana local node is available

---------

Co-authored-by: Lucas Bertrand <lucas.bertrand.22@gmail.com>

* ci: Set Docker Workflow to use Go 1.22 (#2722)

* Set go 1.22.2

* Set go 1.22.2

* Set go 1.22

* Set go 1.22

* Refactor contrib/rpc and contrib/docker-scripts to use snapshots API (#2724)

Co-authored-by: Julian Rubino <julian@zetachain.com>

---------

Co-authored-by: dev-bitSmiley <153714963+bitSmiley@users.noreply.github.com>
Co-authored-by: Dmitry S <11892559+swift1337@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Francisco de Borja Aranda Castillejo <me@fbac.dev>
Co-authored-by: Charlie Chen <34498985+ws4charlie@users.noreply.github.com>
Co-authored-by: Lucas Bertrand <lucas.bertrand.22@gmail.com>
Co-authored-by: Charlie <31941002+CharlieMc0@users.noreply.github.com>
Co-authored-by: Julian Rubino <julian.rubino0@gmail.com>
Co-authored-by: Julian Rubino <julian@zetachain.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mainnet TSS_MIGRATION_TESTS Run TSS migration tests zetaclient Issues related to ZetaClient
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants