-
Notifications
You must be signed in to change notification settings - Fork 108
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
fix: adjust evm outbound tracker reporter to avoid submitting invalid hashes #2628
Conversation
…s; print log when outbound tracker is full of invalid hashes
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughWalkthroughThis 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
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
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
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ 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
|
There was a problem hiding this 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
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 testszetaclient/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 testszetaclient/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 testszetaclient/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() + 1Likely 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 testszetaclient/chains/evm/constant.go (1)
9-11
: LGTM! The changes to constants are approved.The addition of
ReorgProtectBlockCount
and the removal ofZetaBlockTime
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 testszetaclient/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
toconstant.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 toevm.ZetaBlockTime
in the codebase.
constant.ZetaBlockTime
is used inzetaclient/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 ofreportToOutboundTracker
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.
…d configure Datadog to show the fields
…porter will no longer report pending hash
…id-submitting-invalid-tracker-hash-evm
… 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
… 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
… 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: 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>
Description
reportToOutboundTracker
fromchains/evm/signer/signer.go
to a new fileoutbound_tracker_reporter.go
.reportToOutboundTracker
: DON'T report outbound hash any more after 20 mins timeout.reportToOutboundTracker
: simplified implementation by create sub methodIsTxConfirmed
.reportToOutboundTracker
: enforce2 block
confirmation on tx receipt to prevent chain reorg (suggested by Panruo).WatchOutbound
shorter by taking out inner tracker iteration loop and creating sub methodProcessOutboundTrackers
.The log print will contain pattern
outbound tracker is full of invalid hashes
module, method, chain, nonce, tx, cctx
etc.How Has This Been Tested?
Summary by CodeRabbit
New Features
ZetaBlockTime
to represent estimated block timing.ReorgProtectBlockCount
to manage blockchain reorganizations.IsTxConfirmed
function for verifying transaction confirmations on Ethereum-like chains.reportToOutboundTracker
for managing outbound transaction tracking.Bug Fixes
Documentation
Refactor