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

[feature] #3871: Register<AssetDefinition> permissions #4049

Merged

Conversation

ilchu
Copy link
Contributor

@ilchu ilchu commented Nov 13, 2023

Description

With this change, having a permission token is required to register AssetDefinitions in domains for accounts besides the domain owner.

  • added CanMintUserAsset permission token
  • added CanRegisterAccountInDomain permission token
  • added CanRegisterAssetDefinitionInDomain permission_token
  • renamed CanXXXAssetsWithDefinition to CanXXXAssetWithDefinition
  • renamed Grant/Revoke::permission_token to Grant/Revoke::permission

Linked issue

Closes #3871.

Benefits

More granular control over roles in permissioned blockchain.

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)
  • I've adapted an integration test for the code changes
  • I replied to all comments after code review, marking all implemented changes with thumbs up

@ilchu ilchu self-assigned this Nov 13, 2023
@github-actions github-actions bot added the iroha2-dev The re-implementation of a BFT hyperledger in RUST label Nov 13, 2023
@coveralls
Copy link

coveralls commented Nov 13, 2023

Pull Request Test Coverage Report for Build 7163917976

  • 0 of 48 (0.0%) changed or added relevant lines in 5 files are covered.
  • 7010 unchanged lines in 130 files lost coverage.
  • Overall coverage decreased (-3.2%) to 56.193%

Changes Missing Coverage Covered Lines Changed/Added Lines %
smart_contract/utils/src/debug.rs 0 1 0.0%
smart_contract/executor/derive/src/default.rs 0 2 0.0%
core/test_network/src/lib.rs 0 5 0.0%
smart_contract/executor/src/default/tokens.rs 0 7 0.0%
smart_contract/executor/src/default.rs 0 33 0.0%
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%
config/src/kura.rs 2 79.41%
config/src/lib.rs 2 0.0%
ffi/src/option.rs 2 71.43%
config/src/genesis.rs 3 72.92%
Totals Coverage Status
Change from base Build 5423219773: -3.2%
Covered Lines: 22975
Relevant Lines: 40886

💛 - Coveralls

@Arjentix Arjentix self-assigned this Nov 13, 2023
@Erigara Erigara self-assigned this Nov 14, 2023
Erigara
Erigara previously approved these changes Nov 14, 2023
Copy link
Contributor

@Erigara Erigara left a comment

Choose a reason for hiding this comment

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

lgtm

smart_contract/executor/src/default.rs Show resolved Hide resolved
@Arjentix
Copy link
Contributor

Also there is an unrelated commit in this PR. You should probably remove it

@ilchu ilchu force-pushed the 3871-asset-definition-permissions branch 2 times, most recently from be4eda2 to 6ccc149 Compare November 27, 2023 07:41
@ilchu ilchu force-pushed the 3871-asset-definition-permissions branch 4 times, most recently from 52e35bd to 198d083 Compare December 4, 2023 08:25
@mversic mversic force-pushed the 3871-asset-definition-permissions branch 3 times, most recently from 16b25d0 to 7364565 Compare January 18, 2024 08:06
mversic
mversic previously approved these changes Jan 18, 2024
@mversic mversic force-pushed the 3871-asset-definition-permissions branch 6 times, most recently from 93fa6a5 to 4365ae0 Compare January 18, 2024 12:38
@mversic mversic self-requested a review January 18, 2024 12:38
mversic
mversic previously approved these changes Jan 18, 2024
mversic
mversic previously approved these changes Jan 18, 2024
@mversic mversic force-pushed the 3871-asset-definition-permissions branch 2 times, most recently from 55fd661 to 941ec03 Compare January 18, 2024 13:08
core/src/smartcontracts/isi/account.rs Outdated Show resolved Hide resolved
core/src/smartcontracts/isi/domain.rs Outdated Show resolved Hide resolved
@mversic mversic force-pushed the 3871-asset-definition-permissions branch from 941ec03 to ede479e Compare January 18, 2024 14:06
@mversic mversic requested a review from Arjentix January 18, 2024 14:09
…gister<Account>`/`Mint<Asset>` permissions

Signed-off-by: Ilia Churin <churin.ilya@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
@mversic mversic force-pushed the 3871-asset-definition-permissions branch from ede479e to 3e22684 Compare January 18, 2024 14:21
@mversic mversic merged commit cb5972f into hyperledger-iroha:iroha2-dev Jan 19, 2024
13 checks passed
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.

5 participants