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

[fix] #0000: On-chain predictable iteration order #4130

Merged

Conversation

mversic
Copy link
Contributor

@mversic mversic commented Dec 8, 2023

Description

  • replace all HashMap/HashSet in iroha_core with IndexMap/IndexSet
  • add HashMap/HashSet to dissallowed_types

Linked issue

Closes #3

Benefits

Checklist

  • I've read CONTRIBUTING.md
  • I've used the standard signed-off commit format (or will squash just before merging)
  • All applicable CI checks pass (or I promised to make them pass later)
  • (optional) I've written unit tests for the code changes
  • I replied to all comments after code review, marking all implemented changes with thumbs up

@github-actions github-actions bot added the iroha2-dev The re-implementation of a BFT hyperledger in RUST label Dec 8, 2023
@mversic mversic changed the title [feature]: On-chain predictable iteration order [feature] [#3](https://app.zenhub.com/workspaces/iroha-v2-60ddb820813b9100181fc060/issues/zh/3): On-chain predictable iteration order Dec 8, 2023
@mversic mversic changed the title [feature] [#3](https://app.zenhub.com/workspaces/iroha-v2-60ddb820813b9100181fc060/issues/zh/3): On-chain predictable iteration order [feature]: On-chain predictable iteration order Dec 8, 2023
core/clippy.toml Outdated Show resolved Hide resolved
@mversic mversic changed the title [feature]: On-chain predictable iteration order [feature] #0000: On-chain predictable iteration order Dec 8, 2023
@mversic mversic force-pushed the predicatable_iteration_order branch from c45cccc to 2ab42c7 Compare December 8, 2023 08:42
@coveralls
Copy link

coveralls commented Dec 8, 2023

Pull Request Test Coverage Report for Build 7179205152

  • 9 of 19 (47.37%) changed or added relevant lines in 8 files are covered.
  • 7095 unchanged lines in 130 files lost coverage.
  • Overall coverage decreased (-3.2%) to 56.221%

Changes Missing Coverage Covered Lines Changed/Added Lines %
core/src/sumeragi/view_change.rs 0 1 0.0%
core/src/sumeragi/mod.rs 0 4 0.0%
core/src/smartcontracts/isi/triggers/set.rs 3 8 37.5%
Files with Coverage Reduction New Missed Lines %
config/base/derive/src/view.rs 1 99.37%
config/src/block_sync.rs 1 95.0%
config/src/network.rs 1 93.75%
config/src/torii.rs 1 95.45%
config/src/wasm.rs 1 87.5%
core/src/smartcontracts/isi/block.rs 1 87.5%
ffi/src/option.rs 2 71.43%
config/src/genesis.rs 3 72.92%
config/src/logger.rs 3 92.68%
data_model/derive/src/has_origin.rs 3 95.16%
Totals Coverage Status
Change from base Build 5423219773: -3.2%
Covered Lines: 23055
Relevant Lines: 41008

💛 - Coveralls

@Arjentix Arjentix self-assigned this Dec 8, 2023
Arjentix
Arjentix previously approved these changes Dec 8, 2023
Copy link
Contributor

@Arjentix Arjentix left a comment

Choose a reason for hiding this comment

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

In the issue you wrote that you'll use BTree* collections. Why did you change your mind?

core/clippy.toml Outdated Show resolved Hide resolved
core/clippy.toml Outdated Show resolved Hide resolved
@mversic mversic force-pushed the predicatable_iteration_order branch 3 times, most recently from 36fe1f3 to 65146ae Compare December 8, 2023 11:12
@mversic mversic changed the title [feature] #0000: On-chain predictable iteration order [fix] #0000: On-chain predictable iteration order Dec 8, 2023
@mversic mversic force-pushed the predicatable_iteration_order branch 3 times, most recently from fca8b85 to 42a889b Compare December 11, 2023 05:44
@mversic
Copy link
Contributor Author

mversic commented Dec 11, 2023

In the issue you wrote that you'll use BTree* collections. Why did you change your mind?

it seemed as a more natural replacement. As long as the bug is fixed we can always switch to b-trees.

core/Cargo.toml Show resolved Hide resolved
core/clippy.toml Outdated Show resolved Hide resolved
@mversic mversic force-pushed the predicatable_iteration_order branch 2 times, most recently from 5b76dbb to 54d09db Compare December 11, 2023 09:18
@mversic mversic requested a review from Erigara December 11, 2023 09:19
Copy link
Contributor

@Arjentix Arjentix left a comment

Choose a reason for hiding this comment

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

So index at the end

@mversic mversic merged commit 49e837d into hyperledger-iroha:iroha2-dev Dec 12, 2023
11 checks passed
@mversic mversic deleted the predicatable_iteration_order branch December 12, 2023 11:50
Asem-Abdelhady pushed a commit to Asem-Abdelhady/iroha that referenced this pull request Jan 9, 2024
Asem-Abdelhady pushed a commit to Asem-Abdelhady/iroha that referenced this pull request Jan 22, 2024
Asem-Abdelhady pushed a commit to Asem-Abdelhady/iroha that referenced this pull request Feb 9, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants