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] #1650: tidy up data_model #1645

Merged
merged 6 commits into from
Dec 2, 2021

Conversation

mversic
Copy link
Contributor

@mversic mversic commented Nov 30, 2021

Signed-off-by: Marin Veršić marin.versic101@gmail.com

Description of the Change

  • Move World from data_model into wsv as it will never be used by clients.
  • Implement IntoSchema for blocks and transitive dependencies as a preparation for block streaming
  • rename Query -> ExecutableQuery, QueryOutput -> Query
  • fix roles feature inconsistencies
  • move some transaction structures to data_model. Will be used for block streaming

Issue

Closes #1650

Benefits

decoupled iroha_client and iroha_core libraries. Client should never depend on core

Possible Drawbacks

Usage Examples or Tests [optional]

Alternate Designs [optional]

@github-actions github-actions bot added the iroha2-dev The re-implementation of a BFT hyperledger in RUST label Nov 30, 2021
@codecov
Copy link

codecov bot commented Nov 30, 2021

Codecov Report

Merging #1645 (4db7f4c) into iroha2-dev (4341b35) will increase coverage by 0.18%.
The diff coverage is 63.91%.

Impacted file tree graph

@@              Coverage Diff               @@
##           iroha2-dev    #1645      +/-   ##
==============================================
+ Coverage       77.18%   77.36%   +0.18%     
==============================================
  Files             127      128       +1     
  Lines           20403    20403              
==============================================
+ Hits            15748    15785      +37     
+ Misses           4655     4618      -37     
Impacted Files Coverage Δ
client/src/client.rs 78.41% <ø> (+1.24%) ⬆️
config/src/runtime_upgrades.rs 79.31% <ø> (ø)
core/src/lib.rs 62.34% <ø> (ø)
core/src/queue.rs 98.04% <ø> (+0.21%) ⬆️
core/src/smartcontracts/isi/account.rs 46.00% <0.00%> (+0.45%) ⬆️
core/src/smartcontracts/isi/asset.rs 63.07% <ø> (ø)
core/src/smartcontracts/isi/domain.rs 48.44% <ø> (ø)
core/src/smartcontracts/isi/tx.rs 80.00% <ø> (ø)
core/src/smartcontracts/isi/world.rs 69.23% <ø> (+2.56%) ⬆️
core/src/smartcontracts/mod.rs 100.00% <ø> (ø)
... and 41 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4341b35...4db7f4c. Read the comment docs.

core/src/tx.rs Show resolved Hide resolved
core/src/wsv.rs Show resolved Hide resolved
core/src/wsv.rs Outdated Show resolved Hide resolved
core/src/wsv.rs Outdated Show resolved Hide resolved
core/src/wsv.rs Show resolved Hide resolved
core/src/wsv.rs Show resolved Hide resolved
data_model/src/lib.rs Outdated Show resolved Hide resolved
data_model/src/lib.rs Outdated Show resolved Hide resolved
data_model/src/lib.rs Outdated Show resolved Hide resolved
@appetrosyan appetrosyan added the Refactor Improvement to overall code quality label Nov 30, 2021
appetrosyan
appetrosyan previously approved these changes Nov 30, 2021
@mversic mversic force-pushed the data_model_refactor branch 2 times, most recently from c1ec6af to 537a2e4 Compare November 30, 2021 14:15
@appetrosyan appetrosyan changed the title tidy up data_model [refactor] tidy up data_model Nov 30, 2021
@mversic mversic force-pushed the data_model_refactor branch 6 times, most recently from 45b4d5a to 1751048 Compare November 30, 2021 17:35
/// The [`Transaction`]'s payload.
pub payload: Payload,
/// [`Transaction`]'s [`Signature`]s.
pub signatures: SignaturesOf<Payload>,
Copy link
Contributor Author

@mversic mversic Nov 30, 2021

Choose a reason for hiding this comment

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

had to made these fields public

s8sato
s8sato previously approved these changes Dec 1, 2021
core/src/kura.rs Outdated Show resolved Hide resolved
s8sato
s8sato previously approved these changes Dec 1, 2021
@mversic mversic changed the title [refactor] tidy up data_model [refactor] #1650: tidy up data_model Dec 1, 2021
DEFAULT_MAX_LOG_LEVEL
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a consideration. Do you think it would be better to move all configurations into the config crate, and privatise some of the fields?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did this only because I had to, otherwise dependencies would bleed between crates. Namely, iroha_data_model would have to be dependecy of crates with configuration or the other way around and logically they shouldn't be

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but yes, this can be repeated if dynamic configuration is added for those config fields. Maybe I should comment that somewhere?

core/src/queue.rs Outdated Show resolved Hide resolved
core/src/wsv.rs Outdated Show resolved Hide resolved
…Block

Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
@mversic mversic merged commit b21ae37 into hyperledger:iroha2-dev Dec 2, 2021
@mversic mversic deleted the data_model_refactor branch April 16, 2024 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iroha2-dev The re-implementation of a BFT hyperledger in RUST Refactor Improvement to overall code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants