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

789 add hip 745 optionally send transaction data without required transaction fields #857

Conversation

NicolaMirchev
Copy link
Contributor

Description:
Initial solution regarding HIP-745

This PR modifies ... in order to support ...

  • Added new logic for serialization and deserialization of a transaction based on whether it was previously locked, or no

Fixes #

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

NikolaMirchev added 4 commits January 17, 2024 14:19
…f it is not locked

Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>
…nc location eddited testcase

Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>
Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>
Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>
NikolaMirchev added 2 commits January 19, 2024 15:54
Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>
Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>
Copy link

codecov bot commented Jan 22, 2024

Codecov Report

Attention: 176 lines in your changes are missing coverage. Please review.

Comparison is base (c7cb717) 72.47% compared to head (379b845) 72.20%.

❗ Current head 379b845 differs from pull request most recent head a8c6452. Consider uploading reports for the commit a8c6452 to get more accurate results

Files Patch % Lines
transaction.go 61.44% 24 Missing and 8 partials ⚠️
account_allowance_adjust_transaction.go 0.00% 6 Missing ⚠️
freeze_transaction.go 0.00% 6 Missing ⚠️
prng_transaction.go 0.00% 6 Missing ⚠️
token_pause_transaction.go 0.00% 6 Missing ⚠️
account_allowance_approve_transaction.go 50.00% 2 Missing and 1 partial ⚠️
account_allowance_delete_transaction.go 50.00% 2 Missing and 1 partial ⚠️
account_create_transaction.go 50.00% 2 Missing and 1 partial ⚠️
account_delete_transaction.go 50.00% 2 Missing and 1 partial ⚠️
account_update_transaction.go 50.00% 2 Missing and 1 partial ⚠️
... and 35 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #857      +/-   ##
===========================================
- Coverage    72.47%   72.20%   -0.28%     
===========================================
  Files          164      164              
  Lines        26202    26514     +312     
===========================================
+ Hits         18991    19144     +153     
- Misses        6571     6688     +117     
- Partials       640      682      +42     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

NikolaMirchev added 2 commits January 22, 2024 13:18
Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>
Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>
NikolaMirchev added 2 commits January 23, 2024 15:26
Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>
Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>
Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@NicolaMirchev NicolaMirchev marked this pull request as ready for review January 23, 2024 13:52
@NicolaMirchev NicolaMirchev merged commit dc676cc into develop Jan 23, 2024
5 of 6 checks passed
@NicolaMirchev NicolaMirchev deleted the 789-add-hip-745-optionally-send-transaction-data-without-required-transaction-fields branch January 23, 2024 13:52
NicolaMirchev added a commit that referenced this pull request Feb 6, 2024
…nsaction fields (#857)

* Implemented initial logic about serializing a transaction to bytes, if it is not locked

Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>

* Eddited  to consider that transaction may not be signed. Refactored  func location eddited testcase

Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>

* Refactored all transactions

Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>

* Added one example with token transfer transaction

Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>

* Removed lint warnings

Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>

* Refactored  to check if signedBodyBytes is empty instead of

Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>

* Added some testcases

Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>

* Added tests and comments

Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>

* Added a check inside 'account_create_transaction' for stakedNodeID

Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>

* Refactored examples directories

Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>

---------

Signed-off-by: NikolaMirchev <nikola.mirchev@limechain.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add HIP-745: Optionally send transaction data without required transaction fields
2 participants