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

chore: add precheck for receivers account in sendRawTransactionCheck #3310

Conversation

nadezhdapopovaa
Copy link
Contributor

Description:
Added precheck for receiver's account in sendRawTransactionCheck

Fixes #3286

Copy link

github-actions bot commented Dec 5, 2024

Test Results

    4 files   -  16    425 suites  +165   27s ⏱️ - 41m 10s
1 508 tests +896  1 507 ✅ +901  1 💤  - 3  0 ❌  - 2 
1 517 runs  +760  1 516 ✅ +767  1 💤  - 5  0 ❌  - 2 

Results for commit 2ccf78d. ± Comparison against base commit b5e747f.

♻️ This comment has been updated with latest results.

@nadezhdapopovaa nadezhdapopovaa force-pushed the 3286-add-prechecks-to-the-sendrawtransaction-method-to-verify-the-validity-of-the-receivers-account-address branch from 589773c to 92c28db Compare December 5, 2024 14:56
Copy link
Member

@quiet-node quiet-node left a comment

Choose a reason for hiding this comment

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

Great work! Some blocking requests

packages/relay/src/lib/precheck.ts Outdated Show resolved Hide resolved
packages/relay/src/lib/precheck.ts Outdated Show resolved Hide resolved
packages/relay/src/lib/precheck.ts Outdated Show resolved Hide resolved
packages/relay/src/lib/precheck.ts Outdated Show resolved Hide resolved
packages/relay/src/lib/precheck.ts Show resolved Hide resolved
@nadezhdapopovaa nadezhdapopovaa force-pushed the 3286-add-prechecks-to-the-sendrawtransaction-method-to-verify-the-validity-of-the-receivers-account-address branch 2 times, most recently from 66403c6 to 7931099 Compare December 11, 2024 14:39
@nadezhdapopovaa nadezhdapopovaa force-pushed the 3286-add-prechecks-to-the-sendrawtransaction-method-to-verify-the-validity-of-the-receivers-account-address branch from 7931099 to 3b85b1a Compare December 11, 2024 14:53
Copy link
Member

@quiet-node quiet-node left a comment

Choose a reason for hiding this comment

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

Great work! However, additional tests are still needed. Also a batch of unit tests is required in the precheck.spec.ts file to functionally test the method.

packages/relay/src/lib/precheck.ts Show resolved Hide resolved
packages/server/tests/acceptance/rpc_batch1.spec.ts Outdated Show resolved Hide resolved
natanasow
natanasow previously approved these changes Dec 13, 2024
packages/relay/src/lib/precheck.ts Outdated Show resolved Hide resolved
victor-yanev
victor-yanev previously approved these changes Dec 13, 2024
Copy link
Contributor

@victor-yanev victor-yanev left a comment

Choose a reason for hiding this comment

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

LGTM, one small nit

packages/relay/src/lib/errors/JsonRpcError.ts Outdated Show resolved Hide resolved
konstantinabl
konstantinabl previously approved these changes Dec 13, 2024
quiet-node
quiet-node previously approved these changes Dec 13, 2024
@quiet-node quiet-node modified the milestones: 0.62.0, 0.63.0 Dec 13, 2024
…eceivers account precheck

Signed-off-by: Nadezhda Popova <[email protected]>
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
18.8% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copy link
Member

@quiet-node quiet-node left a comment

Choose a reason for hiding this comment

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

1 Q other than that everything LGTM! Great work as always 🚀 💪🏼 🙌🏼

@nadezhdapopovaa nadezhdapopovaa merged commit 1ee437d into main Dec 17, 2024
42 of 43 checks passed
@nadezhdapopovaa nadezhdapopovaa deleted the 3286-add-prechecks-to-the-sendrawtransaction-method-to-verify-the-validity-of-the-receivers-account-address branch December 17, 2024 09:10
Copy link

codecov bot commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.91%. Comparing base (b5e747f) to head (2ccf78d).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3310      +/-   ##
==========================================
- Coverage   84.91%   84.91%   -0.01%     
==========================================
  Files          69       69              
  Lines        4655     4660       +5     
  Branches     1042     1044       +2     
==========================================
+ Hits         3953     3957       +4     
  Misses        397      397              
- Partials      305      306       +1     
Flag Coverage Δ
config-service 98.14% <ø> (ø)
relay 78.76% <80.00%> (+<0.01%) ⬆️
server 83.28% <ø> (ø)
ws-server 36.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/relay/src/lib/errors/JsonRpcError.ts 74.50% <ø> (ø)
packages/relay/src/lib/precheck.ts 89.09% <100.00%> (+0.51%) ⬆️

... and 1 file with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add prechecks to the sendRawTransaction method to verify the validity of the receiver's account address.
7 participants