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: removed maxHeightDiff to let observer scan Bitcoin block from where it left off #2222

Merged
merged 6 commits into from
May 22, 2024

Conversation

ws4charlie
Copy link
Contributor

Description

Closes: 2086

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

@ws4charlie ws4charlie added the bug Something isn't working label May 20, 2024
Copy link

!!!WARNING!!!
nosec detected in the following files: zetaclient/chains/bitcoin/observer/observer.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 May 20, 2024
Copy link

codecov bot commented May 20, 2024

Codecov Report

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

Project coverage is 68.08%. Comparing base (9df63f8) to head (3b19912).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #2222   +/-   ##
========================================
  Coverage    68.08%   68.08%           
========================================
  Files          259      259           
  Lines        16032    16032           
========================================
  Hits         10915    10915           
  Misses        4658     4658           
  Partials       459      459           
Files Coverage Δ
zetaclient/chains/bitcoin/observer/observer.go 14.62% <0.00%> (+0.06%) ⬆️
zetaclient/chains/evm/observer/observer.go 32.04% <0.00%> (-0.18%) ⬇️

Copy link
Contributor

@skosito skosito left a comment

Choose a reason for hiding this comment

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

approved with 2 comments not related to these changes

zetaclient/chains/evm/observer/observer.go Show resolved Hide resolved
Copy link

gitguardian bot commented May 21, 2024

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
11033145 Triggered Generic High Entropy Secret 7981347 cmd/zetae2e/local/accounts.go View secret
11033146 Triggered Generic High Entropy Secret 7981347 cmd/zetae2e/local/accounts.go View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@lumtis lumtis merged commit 6fab9e2 into develop May 22, 2024
20 of 21 checks passed
@lumtis lumtis deleted the fix-remove-maxHeightDiff branch May 22, 2024 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working nosec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remove the constant maxHeightDiff and let chain client continue scan from where it left off
3 participants