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

refactor: cctx validate outbound #2317

Merged
merged 34 commits into from
Jun 19, 2024
Merged

refactor: cctx validate outbound #2317

merged 34 commits into from
Jun 19, 2024

Conversation

skosito
Copy link
Contributor

@skosito skosito commented Jun 4, 2024

Description

Check issue and specs. Mostly moving code around and trying to move some common parts in subfunctions (marked in comments with some questions). Also modified tests accordingly.

Closes: #2278

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

codecov bot commented Jun 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.72%. Comparing base (f5a7aae) to head (3a7cf12).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2317      +/-   ##
===========================================
- Coverage    68.74%   68.72%   -0.02%     
===========================================
  Files          302      302              
  Lines        19180    19168      -12     
===========================================
- Hits         13186    13174      -12     
  Misses        5347     5347              
  Partials       647      647              
Files Coverage Δ
x/crosschain/keeper/cctx_gateway_observers.go 100.00% <ø> (ø)
x/crosschain/keeper/cctx_gateway_zevm.go 100.00% <100.00%> (ø)
...hain/keeper/cctx_orchestrator_validate_outbound.go 94.92% <100.00%> (ø)
x/crosschain/keeper/initiate_outbound.go 100.00% <100.00%> (ø)
x/crosschain/keeper/msg_server_vote_outbound_tx.go 92.78% <100.00%> (ø)

Copy link

github-actions bot commented Jun 5, 2024

!!!WARNING!!!
nosec detected in the following files: x/crosschain/keeper/cctx_orchestrator_validate_outbound.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 Jun 5, 2024
@skosito skosito changed the title Cctx validate outbound feat: cctx validate outbound Jun 5, 2024
@skosito skosito marked this pull request as ready for review June 6, 2024 18:01
@skosito skosito requested a review from lumtis June 6, 2024 18:01
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.

I think this is a good direction. I would like to explore later the possibility of consolidating more observer/evm functions

x/crosschain/keeper/cctx_gateway_zevm.go Outdated Show resolved Hide resolved
@skosito skosito requested a review from kingpinXD June 13, 2024 18:51
@lumtis lumtis mentioned this pull request Jun 17, 2024
10 tasks
@skosito skosito changed the title feat: cctx validate outbound refactor: cctx validate outbound Jun 17, 2024
Copy link
Contributor

@kingpinXD kingpinXD left a comment

Choose a reason for hiding this comment

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

lgtm , left a minor comment

@skosito skosito requested a review from swift1337 as a code owner June 19, 2024 17:50
@skosito skosito merged commit 38e1753 into develop Jun 19, 2024
19 checks passed
@skosito skosito deleted the cctx-validate-outbound branch June 19, 2024 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement a ValidateOutbound method in crosschain keeper
3 participants