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

Introduce an optional title parameter to the AddAssetQuantity and SubtractAssetQuantity, enhancing functionality within Iroha Core for improved message communication. Ensure corresponding handling capabilities in Iroha CLI for seamless integration. #4003

Merged
merged 16 commits into from
Jan 19, 2024

Conversation

dominious1
Copy link
Contributor

@dominious1 dominious1 commented Oct 17, 2023

Description

Enhance functionality in the C++ Iroha base core code by introducing an optional argument, "title," to the AddAssetQuantity and SubtractAssetQuantity commands within the commands.proto bufs. Ensure seamless integration and functionality of this optional parameter, and optimize associated Gtests to accommodate these modifications. Additionally, enhance the Python client, contained in a separate repository, to effectively handle these changes. This refinement contributes to a more robust and adaptable system, aligning with the evolving requirements of the codebase.

Link to Python client library which use protobuf GRPC shared code base:
https://github.com/hyperledger/iroha-python/

This is part of internship project:
https://wiki.hyperledger.org/display/INTERN/Iroha+1%3A+extend+queries+with+optional+arguments

Link to PR in iroha-python compatible with those changes:
hyperledger/iroha-python#157

PR which updates documentation:
#4032

@baziorek
Copy link
Member

@dominious1 Please add some description. I know that it is connected with internship project, but others also should know. And also provide link to client library.

@baziorek baziorek added 1.x api-changes Changes in the API for client libraries 1.5 labels Oct 18, 2023
shared_model/schema/queries.proto Outdated Show resolved Hide resolved
shared_model/schema/commands.proto Outdated Show resolved Hide resolved
shared_model/schema/commands.proto Outdated Show resolved Hide resolved
Copy link
Member

@baziorek baziorek left a comment

Choose a reason for hiding this comment

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

  • remember about changing documentation
  • remember about adding changes to iroha-lib (file: iroha/iroha-lib/model/Tx.{h,c}pp), if You have problems with this ask @andprogrammer

irohad/model/commands/add_asset_quantity.hpp Outdated Show resolved Hide resolved
@baziorek
Copy link
Member

baziorek commented Jan 9, 2024

@dominious1 Good news! I was able (hopefully) to fix dependencies with golang: #4173
just resolve conflicts, and we will try to run tests and check if everything works now:D.

Copy link
Member

@baziorek baziorek left a comment

Choose a reason for hiding this comment

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

LGTM

@baziorek
Copy link
Member

To sum up changes:

  1. There were suggestion from @Mingela : Introduce an optional title parameter to the AddAssetQuantity and SubtractAssetQuantity, enhancing functionality within Iroha Core for improved message communication. Ensure corresponding handling capabilities in Iroha CLI for seamless integration. #4003 (review) - it was corrected, but ...
  2. There were problem with dependencies - fixed by me in: Trying to repair dependency which stopped working (protoc for golang) #4173
  3. After "Update branch" - all tests pass, and it is still good for me (revied already)

@baziorek
Copy link
Member

baziorek commented Jan 19, 2024

@6r1d I just receive message from @lebdron that he reviewed this. But he does not have permissions to approve changes anymore.

@lebdron Thanks a lot for the review!

EDIT: Sorry, by accident I used wrong nicks. It was revieved by @iceseer , not @lebdron. Sorry @lebdron for pinging You:D.

@6r1d
Copy link
Contributor

6r1d commented Jan 19, 2024

It was also checked by @iceseer

@baziorek
Copy link
Member

@6r1d I just receive message from @lebdron that he reviewed this. But he does not have permissions to approve changes anymore.

@lebdron Thanks a lot for the review!

Sorry, I was wrong, it was checked by @iceseer not @lebdron . Sorry, it is my faoult that I not always connect nicks with people. Sorry for wrong information from me. Thanks @6r1d for correcting me:)

@baziorek baziorek merged commit cd31f16 into hyperledger:main Jan 19, 2024
25 checks passed
baziorek added a commit to dominious1/iroha that referenced this pull request Jan 26, 2024
…tractAssetQuantity, enhancing functionality within Iroha Core for improved message communication. Ensure corresponding handling capabilities in Iroha CLI for seamless integration. (hyperledger#4003)

* Implement addition of new parameters to Iroha Core for enhanced message communication, with corresponding handling capabilities in Iroha CLI.

* Improve GTests in reference to param title

* Enhance test coverage in the JsonCommandTest class by addressing serialization and deserialization scenarios for various command types. This commit ensures comprehensive testing, including edge cases and unknown command types, to guarantee the robustness of the JsonCommandFactory's functionality.

* Enhance test cases related to the SubtractAccountAsset functionality to improve reliability, readability, and maintainability. This commit refactors and strengthens the existing test suite, addressing scenarios such as permission checks, domain permission validity, asset presence, precision validation, and asset quantity sufficiency. These improvements contribute to a more robust testing environment for the SubtractAccountAsset functionality.

Signed-off-by: dominious1 <[email protected]>

---------

Signed-off-by: dominious1 <[email protected]>
Signed-off-by: dominious1 <[email protected]>
Co-authored-by: G. Bazior <[email protected]>
baziorek added a commit to dominious1/iroha that referenced this pull request Jan 26, 2024
…tractAssetQuantity, enhancing functionality within Iroha Core for improved message communication. Ensure corresponding handling capabilities in Iroha CLI for seamless integration. (hyperledger#4003)

* Implement addition of new parameters to Iroha Core for enhanced message communication, with corresponding handling capabilities in Iroha CLI.

* Improve GTests in reference to param title

* Enhance test coverage in the JsonCommandTest class by addressing serialization and deserialization scenarios for various command types. This commit ensures comprehensive testing, including edge cases and unknown command types, to guarantee the robustness of the JsonCommandFactory's functionality.

* Enhance test cases related to the SubtractAccountAsset functionality to improve reliability, readability, and maintainability. This commit refactors and strengthens the existing test suite, addressing scenarios such as permission checks, domain permission validity, asset presence, precision validation, and asset quantity sufficiency. These improvements contribute to a more robust testing environment for the SubtractAccountAsset functionality.

Signed-off-by: dominious1 <[email protected]>

---------

Signed-off-by: dominious1 <[email protected]>
Signed-off-by: dominious1 <[email protected]>
Co-authored-by: G. Bazior <[email protected]>
dominious1 added a commit to dominious1/iroha that referenced this pull request Feb 1, 2024
…tractAssetQuantity, enhancing functionality within Iroha Core for improved message communication. Ensure corresponding handling capabilities in Iroha CLI for seamless integration. (hyperledger#4003)

* Implement addition of new parameters to Iroha Core for enhanced message communication, with corresponding handling capabilities in Iroha CLI.

* Improve GTests in reference to param title

* Enhance test coverage in the JsonCommandTest class by addressing serialization and deserialization scenarios for various command types. This commit ensures comprehensive testing, including edge cases and unknown command types, to guarantee the robustness of the JsonCommandFactory's functionality.

* Enhance test cases related to the SubtractAccountAsset functionality to improve reliability, readability, and maintainability. This commit refactors and strengthens the existing test suite, addressing scenarios such as permission checks, domain permission validity, asset presence, precision validation, and asset quantity sufficiency. These improvements contribute to a more robust testing environment for the SubtractAccountAsset functionality.

Signed-off-by: dominious1 <[email protected]>

---------

Signed-off-by: dominious1 <[email protected]>
Signed-off-by: dominious1 <[email protected]>
Co-authored-by: G. Bazior <[email protected]>
Signed-off-by: dominious1 <[email protected]>
@nxsaken nxsaken added the iroha1 The legacy version of Iroha. label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.5 api-changes Changes in the API for client libraries iroha1 The legacy version of Iroha.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants