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] #1606: Add ipfs link to domain logo in Domain structure #1886

Merged
merged 1 commit into from
Feb 10, 2022

Conversation

Arjentix
Copy link
Contributor

@Arjentix Arjentix commented Feb 9, 2022

Description of the Change

Add new field into Domain structure. Field represents IPFS link into Domain logo.
Add IpfsPath structure to superficially validate path

I haven't find good IPFS paths specifications, so I was inspiring these realisations:

  1. ipfs crate
  2. cid crate

Issue

Resolves #1606

Benefits

Now domains can have logo

Possible Drawbacks

IPFS paths isn't fully validated. Full validation requires hash decoding and possible requesting IPFS system to check, if image really exists.

Checkout #1885

Usage Examples or Tests [optional]

See client/integration_tests/add_domain.rs

@github-actions github-actions bot added the iroha2-dev The re-implementation of a BFT hyperledger in RUST label Feb 9, 2022
@Arjentix Arjentix changed the title Add ipfs link to domain logo in Domain structure [feature] #1606 Add ipfs link to domain logo in Domain structure Feb 9, 2022
@Arjentix Arjentix changed the title [feature] #1606 Add ipfs link to domain logo in Domain structure [feature] #1606: Add ipfs link to domain logo in Domain structure Feb 9, 2022
@codecov
Copy link

codecov bot commented Feb 9, 2022

Codecov Report

Merging #1886 (9547d20) into iroha2-dev (34e9c4f) will increase coverage by 0.00%.
The diff coverage is 81.60%.

Impacted file tree graph

@@             Coverage Diff             @@
##           iroha2-dev    #1886   +/-   ##
===========================================
  Coverage       78.66%   78.67%           
===========================================
  Files             156      156           
  Lines           22140    22227   +87     
===========================================
+ Hits            17417    17486   +69     
- Misses           4723     4741   +18     
Impacted Files Coverage Δ
data_model/src/lib.rs 70.06% <80.48%> (+1.13%) ⬆️
...ermissions_validators/src/public_blockchain/mod.rs 95.61% <100.00%> (+0.03%) ⬆️
actor/src/lib.rs 89.07% <0.00%> (-0.69%) ⬇️
core/src/sumeragi/network_topology.rs 95.83% <0.00%> (-0.28%) ⬇️
p2p/src/peer.rs 82.03% <0.00%> (-0.23%) ⬇️
core/src/sumeragi/mod.rs 85.29% <0.00%> (-0.11%) ⬇️
core/src/smartcontracts/isi/expression.rs 88.20% <0.00%> (+0.22%) ⬆️
actor/src/actor_id.rs 95.00% <0.00%> (+5.00%) ⬆️

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 34e9c4f...9547d20. Read the comment docs.

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
data_model/src/lib.rs Outdated Show resolved Hide resolved
data_model/src/lib.rs Show resolved Hide resolved
appetrosyan
appetrosyan previously approved these changes Feb 9, 2022
client/tests/integration_tests/add_domain.rs Outdated Show resolved Hide resolved
data_model/src/lib.rs Outdated Show resolved Hide resolved
data_model/src/lib.rs Show resolved Hide resolved
let _domain = Domain {
logo: Some(logo),
..Domain::test("sora")
};
Copy link
Contributor

Choose a reason for hiding this comment

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

there are no assertions in the test? does it test anything?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think I would remove it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, it just an example of usage with logo. But I'm agree, looks strange. I'm gonna remove it

appetrosyan
appetrosyan previously approved these changes Feb 10, 2022
mversic
mversic previously approved these changes Feb 10, 2022
…ructure

Signed-off-by: Arjentix <arjentix@gmail.com>
@appetrosyan appetrosyan self-requested a review February 10, 2022 12:07
@Arjentix Arjentix merged commit 34b184e into hyperledger:iroha2-dev Feb 10, 2022
@Arjentix Arjentix deleted the add_logo_link_into_domain branch February 12, 2022 18:44
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.

3 participants