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: use JSON RPC for inbound tx observation (including blob tx in Decun upgrade) #1836

Merged
merged 12 commits into from
Mar 7, 2024

Conversation

ws4charlie
Copy link
Contributor

Description

  1. Some necessary code refactor on inbound observation and inbound tracker processing.
  2. Uses JSON RPC for inbound tx observation and tracker processing.
  3. Added unit tests for above changes.

Closes: 1755

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Include instructions and any relevant details so others can reproduce.

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

Checklist:

  • I have added unit tests that prove my fix feature works

Copy link

github-actions bot commented Mar 5, 2024

!!!WARNING!!!
nosec detected in the following files: zetaclient/evm/evm_client.go, zetaclient/evm/evm_client_test.go, zetaclient/evm/inbounds.go

Be very careful about using #nosec in code. It can be a quick way to suppress security warnings and move forward with development, it should be employed with caution. Suppressing warnings with #nosec can hide potentially serious vulnerabilities. Only use #nosec when you're absolutely certain that the security issue is either a false positive or has been mitigated in another way.

Only suppress a single rule (or a specific set of rules) within a section of code, while continuing to scan for other problems. To do this, you can list the rule(s) to be suppressed within the #nosec annotation, e.g: /* #nosec G401 */ or //#nosec G201 G202 G203
Broad #nosec annotations should be avoided, as they can hide other vulnerabilities. The CI will block you from merging this PR until you remove #nosec annotations that do not target specific rules.

Pay extra attention to the way #nosec is being used in the files listed above.

@github-actions github-actions bot added the nosec label Mar 5, 2024
@ws4charlie ws4charlie changed the title feat: use JSON RPC for inbound tx (including blob tx) observation feat: use JSON RPC for inbound tx (including blob tx in Decun Upgrade) observation Mar 5, 2024
@ws4charlie ws4charlie changed the title feat: use JSON RPC for inbound tx (including blob tx in Decun Upgrade) observation feat: use JSON RPC for inbound tx (including blob tx in Decun upgrade) observation Mar 5, 2024
@ws4charlie ws4charlie changed the title feat: use JSON RPC for inbound tx (including blob tx in Decun upgrade) observation feat: use JSON RPC for inbound tx observation (including blob tx in Decun upgrade) Mar 5, 2024
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 50.23256% with 107 lines in your changes are missing coverage. Please review.

Project coverage is 44.80%. Comparing base (09f99eb) to head (01b4243).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1836      +/-   ##
===========================================
+ Coverage    42.97%   44.80%   +1.83%     
===========================================
  Files          217      218       +1     
  Lines        12792    12689     -103     
===========================================
+ Hits          5497     5685     +188     
+ Misses        6852     6553     -299     
- Partials       443      451       +8     
Files Coverage Δ
zetaclient/evm/evm_signer.go 45.84% <ø> (ø)
zetaclient/evm/validation.go 100.00% <100.00%> (ø)
zetaclient/bitcoin/bitcoin_client.go 13.28% <0.00%> (ø)
zetaclient/evm/inbounds.go 63.06% <58.97%> (+49.75%) ⬆️
zetaclient/evm/evm_client.go 12.51% <22.91%> (+5.73%) ⬆️

zetaclient/evm/evm_client.go Outdated Show resolved Hide resolved
zetaclient/evm/evm_client.go Outdated Show resolved Hide resolved
zetaclient/evm/inbounds.go Outdated Show resolved Hide resolved
common/constant.go Show resolved Hide resolved
zetaclient/evm/constant.go Show resolved Hide resolved
zetaclient/evm/evm_client.go Show resolved Hide resolved
zetaclient/evm/evm_client.go Show resolved Hide resolved
zetaclient/evm/evm_client.go Outdated Show resolved Hide resolved
zetaclient/evm/utils.go Outdated Show resolved Hide resolved
zetaclient/evm/utils.go Outdated Show resolved Hide resolved
zetaclient/evm/utils.go Outdated Show resolved Hide resolved
zetaclient/evm/utils.go Outdated Show resolved Hide resolved
zetaclient/evm/utils_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@kevinssgh kevinssgh 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

Copy link
Member

@lumtis lumtis left a comment

Choose a reason for hiding this comment

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

It looks good to me. Wondering if we could consider testing it on local E2E test before moving to production.

@ws4charlie
Copy link
Contributor Author

It looks good to me. Wondering if we could consider testing it on local E2E test before moving to production.

It's a good idea. I created a ticket for this as the 1st step: #1856

@ws4charlie ws4charlie merged commit 9aacfb7 into develop Mar 7, 2024
21 checks passed
@ws4charlie ws4charlie deleted the feat-observe-blob-transaction branch March 7, 2024 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants