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

Iris Milestone 2 Delivery #371

Merged
merged 3 commits into from
Mar 11, 2022
Merged

Iris Milestone 2 Delivery #371

merged 3 commits into from
Mar 11, 2022

Conversation

driemworks
Copy link
Contributor

@driemworks driemworks commented Feb 18, 2022

Milestone Delivery Checklist

Link to the application pull request: w3f/Grants-Program#657
Amendment: w3f/Grants-Program#812

@takahser
Copy link
Contributor

Thanks for the delivery. We will look into it as soon as possible.

deliveries/iris-milestone-2.md Outdated Show resolved Hide resolved
@ashlink11 ashlink11 self-assigned this Feb 28, 2022
@ashlink11
Copy link
Contributor

Good day @driemworks!

My name is Ashley & I've started working on your evaluation today!

I want to let you know that this is my third week here at W3F and I'm relatively new to the Polkadot eco, so I really appreciate your great documentation.

I've been studying your grant application (it's very thorough & clear, thank you!), and I noticed the images for sample-runtime-diagram, queueing and rewarding, high-level-diagram are broken. Your explanations are really excellent, but since I'm new, if it's not too much trouble, could provide those images to aid my understanding? You could provide them here quickly which would be helpful and/or update your original application.

Also, I plan to get started on testing very soon because I tend to have a lot of beginner questions. If you'd like to help move the process along, feel free to give me any/all beginner tips for understanding & testing.

Thank you and hope you have a great day!

@driemworks
Copy link
Contributor Author

I think you might be looking at an older version of the proposal. I submitted an amendment that was merged a couple weeks ago where those images should have been removed. For clarity, here's the PR for the original submission w3f/Grants-Program#657 and here's the amendment which doesn't contain those images: w3f/Grants-Program#812 (here you can see the removal of those images: w3f/Grants-Program@cf56030). There are two broken images in the "early work" section that I just noticed. I'll fix those, but it shouldn't impact your testing.

As for any tips, I would recommend starting with taking a look at the deliverables for milestone 1 here: #327. The testing for the second delivery is a bit more intensive than the first, so it could be a good idea to go through the testing scenarios for the first delivery to get started since it should give you a decent idea on getting it all set up (if you look at the google sheet attached to the testing guide, it's outlined in the first tab). You can also take a look at this medium publication which has a quick overview from milestone1 and a quick demo video: https://medium.com/iridium/iris-a-next-gen-decentralized-storage-network-a53562c27de2. There's a demo video for milestone 2 also, attached to the testing guide mentioned in this submission.

I'd be happy to hop on a call or chat if I can clarify anything further.

@ashlink11
Copy link
Contributor

@driemworks Thank you SO much for this message so I could study the amendments. I super appreciate the info on how I should study & test. I studied a while longer and I think I'm really starting to understand what you're doing here. By the way, thank you so much for offering to hop on a call.

This is the first substrate-based evaluation I'm doing and like I said, I'm very new to the Polkadot eco, sorry.

Am I correct in this thinking so far?: If I understand correctly, very simplistically, there's the private IPFS Iris blockchain that manages access to secure offchain content and also there are parachains that know how to interact with the Iris blockchain. You have two pallets: Iris-assets and Iris-session & these are based off Parity asset and session pallets. ... and devs can use your pallets to build Iris-compatible parachains?

I haven't finished reading all your documentation yet, but tomorrow I plan next to quickly read through the M1 deliverables, and then try to get some M2 tests running, because I think I'm starting to understand. I do plan to read all your docs, but I at least want to keep the process moving for you since I may have lots of Qs.

Expect an update from me tomorrow, thanks!

@driemworks
Copy link
Contributor Author

The original idea in the initial proposal was that parachains would have to include a pallet in their runtime to be "iris compatible", but that was changed in the amendment. We modified the design so that there wouldn't need to be any explicit dependencies between parachains if they want to leverage iris. Moving forward, parachains would be compatible as long as they're connected to the same relay chain as iris (by using XCM). The third milestone will deliver a chain extension and a suite of contracts, which should let contracts on parachains interact with iris fairly smoothly.

Essentially, there are two modules to iris (currently), the 'iris-assets' layer that acts as a data ownership and access management layer (where data ownership is synonymous with asset class ownership, and data access synonymous with holding an asset minted from the class), and 'iris-session' which uses the session pallet to hook into the validator set to both make the validator set dynamic (controlled by the network root) and to incentivize validator nodes to provide storage to the network (i.e. ipfs pin) using a rudimentary reward points system (this should give you a good idea on what I mean by that: https://iridium-labs.github.io/pallets.html). M1 delivered the iris-assets module, and this delivery focuses on the iris-session module.

@ashlink11
Copy link
Contributor

Good day @driemworks! Thanks so much for that explanation. I had to ask my teammates some questions this morning since this is my first time testing with Docker. I am working through your testing guide slowly. It might be nice to hop on a call in a few hours or later if I can't figure it out myself. Thanks!!

@driemworks
Copy link
Contributor Author

I hope all is going smoothly @cruikshankss. I can be available anytime tomorrow for a call if you want! You can also reach me on discord: driemworks#1849

@ashlink11
Copy link
Contributor

Hi @driemworks! I was out of office on Friday, but thanks so much for providing your discord. I plan to ping you there as well regarding this update.

I was able to get your Docker images running and was able to get your Milestone 1 branch compiled, but I wasn't able to get your Milestone 2 branch compiled, and neither was my boss able to. (details below)

Looking ahead to test the ui deliverable, in the ui repo README.md, it says the prerequisites to test the ui are:

Prerequisites
Setup and run an [Iris node](https://github.com/iridium-labs/substrate/tree/iris)
Setup and run an [IPFS node](https://docs.ipfs.io/install/)
It is assumed that the IPFS node exposes it's api on the default port: 4001.

The docs have multiple different install options; I'm not sure which type of IPFS node to install so please let me know. 😎 This is all so fun for me to learn and I'm really enjoying testing your project!

And here are the compiler errors/warnings on the Iris node:

Here's a screenshot from my boss's terminal:
Screenshot 2022-03-07 at 11 12 18

And here's terminal output of the branch I was on, the command I ran and my errors & warnings:

     ~/.../substrate/bin/node-template/pallets/iris-session/src ± iris_milestone_2
❯ cargo test iris
    Updating git repository `https://github.com/rs-ipfs/rust-ipfs`
  Downloaded addr2line v0.16.0
  Downloaded scale-info-derive v1.0.0
  Downloaded serde_json v1.0.68
  Downloaded slog v2.7.0
  Downloaded tinyvec v1.5.0
  Downloaded tracing v0.1.28
  Downloaded sharded-slab v0.1.3
  Downloaded impl-codec v0.5.1
  Downloaded futures-core v0.3.17
  Downloaded instant v0.1.11
  Downloaded radium v0.6.2
  Downloaded parity-util-mem v0.10.2
  Downloaded futures v0.3.17
  Downloaded synstructure v0.12.5
  Downloaded wyz v0.2.0
  Downloaded trie-root v0.16.0
  Downloaded erased-serde v0.3.16
  Downloaded subtle v2.4.1
  Downloaded typenum v1.14.0
  Downloaded wasmi-validation v0.4.1
  Downloaded proc-macro-nested v0.1.7
  Downloaded unicode-normalization v0.1.19
  Downloaded rustc-demangle v0.1.21
  Downloaded pin-project-lite v0.2.7
  Downloaded twox-hash v1.6.1
  Downloaded memory-db v0.27.0
  Downloaded zeroize v1.4.2
  Downloaded thiserror v1.0.29
  Downloaded tracing-core v0.1.20
  Downloaded signature v1.3.1
  Downloaded scale-info v1.0.0
  Downloaded futures-macro v0.3.17
  Downloaded object v0.26.2
  Downloaded uint v0.9.1
  Downloaded futures-executor v0.3.17
  Downloaded slab v0.4.4
  Downloaded regex-automata v0.1.10
  Downloaded libsecp256k1-core v0.2.2
  Downloaded futures-channel v0.3.17
  Downloaded tracing-subscriber v0.2.24
  Downloaded curve25519-dalek v2.1.3
  Downloaded rand_distr v0.4.2
  Downloaded curve25519-dalek v3.2.0
  Downloaded cc v1.0.70
  Downloaded thiserror-impl v1.0.29
  Downloaded secrecy v0.7.0
  Downloaded proc-macro2 v1.0.29
  Downloaded primitive-types v0.10.1
  Downloaded paste v1.0.5
  Downloaded parking_lot_core v0.7.2
  Downloaded futures-task v0.3.17
  Downloaded ahash v0.7.4
  Downloaded serde v1.0.130
  Downloaded parity-scale-codec-derive v2.3.1
  Downloaded libsecp256k1-gen-genmult v0.2.1
  Downloaded tracing-attributes v0.1.16
  Downloaded libsecp256k1-gen-ecmult v0.2.1
  Downloaded parity-scale-codec v2.3.1
  Downloaded bitvec v0.20.4
  Downloaded backtrace v0.3.61
  Downloaded futures-util v0.3.17
  Downloaded gimli v0.25.0
  Downloaded futures-sink v0.3.17
  Downloaded futures-io v0.3.17
  Downloaded libc v0.2.103
  Downloaded frame-metadata v14.0.0
  Downloaded byte-slice-cast v1.1.0
  Downloaded base58 v0.1.0
  Downloaded anyhow v1.0.44
  Downloaded trie-db v0.22.6
  Downloaded syn v1.0.77
  Downloaded libsecp256k1 v0.6.0
  Downloaded lock_api v0.4.5
  Downloaded smallvec v1.7.0
  Downloaded ed25519 v1.2.0
  Downloaded parking_lot v0.10.2
  Downloaded serde_derive v1.0.130
  Downloaded funty v1.1.0
  Downloaded 78 crates (5.2 MB) in 1.09s
   Compiling proc-macro2 v1.0.29
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.77
   Compiling libc v0.2.103
   Compiling typenum v1.14.0
   Compiling version_check v0.9.3
   Compiling serde v1.0.130
   Compiling serde_derive v1.0.130
   Compiling subtle v2.4.1
   Compiling radium v0.6.2
   Compiling wyz v0.2.0
   Compiling memchr v2.4.1
   Compiling funty v1.1.0
   Compiling byte-slice-cast v1.1.0
   Compiling arrayvec v0.7.1
   Compiling byteorder v1.4.3
   Compiling smallvec v1.7.0
   Compiling once_cell v1.8.0
   Compiling crunchy v0.2.2
   Compiling pin-project-lite v0.2.7
   Compiling log v0.4.14
   Compiling futures-core v0.3.17
   Compiling sp-std v4.0.0-dev (/Users/ash/wthree/substrate/primitives/std)
   Compiling erased-serde v0.3.16
   Compiling hex v0.4.3
   Compiling futures-task v0.3.17
   Compiling futures-channel v0.3.17
   Compiling serde_json v1.0.68
   Compiling proc-macro-nested v0.1.7
   Compiling futures-sink v0.3.17
   Compiling slog v2.7.0
   Compiling itoa v0.4.8
   Compiling futures-io v0.3.17
   Compiling anyhow v1.0.44
   Compiling slab v0.4.4
   Compiling parity-util-mem v0.10.2
   Compiling arrayvec v0.5.2
   Compiling environmental v1.1.3
   Compiling signature v1.3.1
   Compiling base64 v0.12.3
   Compiling cc v1.0.70
   Compiling base58 v0.1.0
   Compiling gimli v0.25.0
   Compiling rustc-demangle v0.1.21
   Compiling paste v1.0.5
   Compiling either v1.6.1
   Compiling futures-macro v0.3.17
   Compiling futures-util v0.3.17
   Compiling instant v0.1.11
   Compiling tracing-core v0.1.20
   Compiling sharded-slab v0.1.3
   Compiling regex-automata v0.1.10
   Compiling lock_api v0.4.5
   Compiling thread_local v1.1.3
   Compiling wasmi-validation v0.4.1
   Compiling trie-root v0.16.0
   Compiling tinyvec v1.5.0
   Compiling generic-array v0.14.4
   Compiling ahash v0.7.4
   Compiling ed25519 v1.2.0
   Compiling uint v0.9.1
   Compiling hash256-std-hasher v0.15.2
   Compiling matchers v0.0.1
   Compiling blake2-rfc v0.2.18
   Compiling bitvec v0.20.4
   Compiling tracing-log v0.1.2
   Compiling unicode-normalization v0.1.19
   Compiling aho-corasick v0.7.18
   Compiling object v0.26.2
   Compiling getrandom v0.2.3
   Compiling getrandom v0.1.16
   Compiling parking_lot_core v0.8.5
   Compiling parking_lot_core v0.7.2
   Compiling num_cpus v1.13.0
   Compiling quote v1.0.9
   Compiling chrono v0.4.19
   Compiling simba v0.5.1
   Compiling backtrace v0.3.61
   Compiling rand_core v0.6.3
   Compiling rand_core v0.5.1
   Compiling parking_lot v0.11.2
   Compiling parking_lot v0.10.2
   Compiling addr2line v0.16.0
   Compiling generic-array v0.12.4
   Compiling rand_chacha v0.3.1
   Compiling wasmi v0.9.1
   Compiling regex v1.5.4
   Compiling rand_pcg v0.2.1
   Compiling rand_chacha v0.2.2
   Compiling hashbrown v0.11.2
   Compiling rand v0.8.4
   Compiling digest v0.8.1
   Compiling block-buffer v0.7.3
   Compiling digest v0.9.0
   Compiling crypto-mac v0.8.0
   Compiling block-buffer v0.9.0
   Compiling crypto-mac v0.11.1
   Compiling rand v0.7.3
   Compiling trie-db v0.22.6
   Compiling sha2 v0.8.2
   Compiling libsecp256k1-core v0.2.2
   Compiling hmac v0.8.1
   Compiling pbkdf2 v0.4.0
   Compiling sha2 v0.9.8
   Compiling pbkdf2 v0.8.0
   Compiling hmac v0.11.0
   Compiling hmac-drbg v0.3.0
   Compiling Inflector v0.11.4
   Compiling fixed-hash v0.7.0
   Compiling twox-hash v1.6.1
   Compiling rand_distr v0.4.2
   Compiling toml v0.5.8
   Compiling libsecp256k1-gen-genmult v0.2.1
   Compiling libsecp256k1-gen-ecmult v0.2.1
   Compiling libsecp256k1 v0.6.0
   Compiling sp-panic-handler v3.0.0 (/Users/ash/wthree/substrate/primitives/panic-handler)
   Compiling synstructure v0.12.5
   Compiling thiserror-impl v1.0.29
   Compiling impl-trait-for-tuples v0.2.1
   Compiling zeroize_derive v1.2.0
   Compiling derive_more v0.99.16
   Compiling ref-cast-impl v1.0.6
   Compiling tracing-attributes v0.1.16
   Compiling sp-debug-derive v3.0.0 (/Users/ash/wthree/substrate/primitives/debug-derive)
   Compiling parity-util-mem-derive v0.1.0
   Compiling dyn-clonable-impl v0.9.0
   Compiling async-trait v0.1.51
   Compiling frame-support-procedural-tools-derive v3.0.0 (/Users/ash/wthree/substrate/frame/support/procedural/tools/derive)
   Compiling nalgebra-macros v0.1.0
   Compiling dyn-clonable v0.9.0
   Compiling zeroize v1.4.2
   Compiling ref-cast v1.0.6
   Compiling nalgebra v0.27.1
   Compiling merlin v2.0.1
   Compiling curve25519-dalek v2.1.3
   Compiling curve25519-dalek v3.2.0
   Compiling secrecy v0.7.0
   Compiling tracing v0.1.28
   Compiling thiserror v1.0.29
   Compiling schnorrkel v0.9.1
   Compiling proc-macro-crate v1.1.0
   Compiling tiny-bip39 v0.8.2
   Compiling frame-support-procedural-tools v4.0.0-dev (/Users/ash/wthree/substrate/frame/support/procedural/tools)
   Compiling parity-scale-codec-derive v2.3.1
   Compiling scale-info-derive v1.0.0
   Compiling sp-runtime-interface-proc-macro v4.0.0-dev (/Users/ash/wthree/substrate/primitives/runtime-interface/proc-macro)
   Compiling sp-api-proc-macro v4.0.0-dev (/Users/ash/wthree/substrate/primitives/api/proc-macro)
   Compiling substrate-bip39 v0.4.4
   Compiling frame-support-procedural v4.0.0-dev (/Users/ash/wthree/substrate/frame/support/procedural)
   Compiling futures-executor v0.3.17
   Compiling parity-scale-codec v2.3.1
   Compiling futures v0.3.17
   Compiling sp-version-proc-macro v4.0.0-dev (/Users/ash/wthree/substrate/primitives/version/proc-macro)
   Compiling impl-serde v0.3.1
   Compiling tracing-serde v0.1.2
   Compiling ed25519-dalek v1.0.1
   Compiling scale-info v1.0.0
   Compiling impl-codec v0.5.1
   Compiling sp-storage v4.0.0-dev (/Users/ash/wthree/substrate/primitives/storage)
   Compiling sp-wasm-interface v4.0.0-dev (/Users/ash/wthree/substrate/primitives/wasm-interface)
   Compiling tracing-subscriber v0.2.24
   Compiling sp-externalities v0.10.0-dev (/Users/ash/wthree/substrate/primitives/externalities)
   Compiling primitive-types v0.10.1
   Compiling sp-arithmetic v4.0.0-dev (/Users/ash/wthree/substrate/primitives/arithmetic)
   Compiling frame-metadata v14.0.0
   Compiling sp-tracing v4.0.0-dev (/Users/ash/wthree/substrate/primitives/tracing)
   Compiling sp-runtime-interface v4.0.0-dev (/Users/ash/wthree/substrate/primitives/runtime-interface)
   Compiling memory-db v0.27.0
   Compiling sp-core v4.0.0-dev (/Users/ash/wthree/substrate/primitives/core)
warning: unreachable pattern
   --> primitives/core/src/offchain/testing.rs:439:4
    |
439 |             Some(_) => IpfsRequestStatus::Finished(IpfsResponse::Success),
    |             ^^^^^^^
    |
    = note: `#[warn(unreachable_patterns)]` on by default

warning: missing documentation for an associated function
   --> primitives/core/src/offchain/testing.rs:218:2
    |
218 |     pub fn fulfill_ipfs_expected(&mut self, id: u16) {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: the lint level is defined here
   --> primitives/core/src/lib.rs:20:9
    |
20  | #![warn(missing_docs)]
    |         ^^^^^^^^^^^^

   Compiling sp-trie v4.0.0-dev (/Users/ash/wthree/substrate/primitives/trie)
   Compiling sp-keystore v0.10.0-dev (/Users/ash/wthree/substrate/primitives/keystore)
   Compiling sp-state-machine v0.10.0-dev (/Users/ash/wthree/substrate/primitives/state-machine)
warning: `sp-core` (lib) generated 2 warnings
   Compiling sp-io v4.0.0-dev (/Users/ash/wthree/substrate/primitives/io)
   Compiling sp-application-crypto v4.0.0-dev (/Users/ash/wthree/substrate/primitives/application-crypto)
   Compiling sp-runtime v4.0.0-dev (/Users/ash/wthree/substrate/primitives/runtime)
   Compiling statrs v0.15.0
   Compiling sp-inherents v4.0.0-dev (/Users/ash/wthree/substrate/primitives/inherents)
   Compiling sp-version v4.0.0-dev (/Users/ash/wthree/substrate/primitives/version)
   Compiling sp-staking v4.0.0-dev (/Users/ash/wthree/substrate/primitives/staking)
   Compiling linregress v0.4.4
   Compiling sp-api v4.0.0-dev (/Users/ash/wthree/substrate/primitives/api)
   Compiling sp-session v4.0.0-dev (/Users/ash/wthree/substrate/primitives/session)
   Compiling frame-support v4.0.0-dev (/Users/ash/wthree/substrate/frame/support)
   Compiling sp-timestamp v4.0.0-dev (/Users/ash/wthree/substrate/primitives/timestamp)
   Compiling sp-authorship v4.0.0-dev (/Users/ash/wthree/substrate/primitives/authorship)
   Compiling frame-system v4.0.0-dev (/Users/ash/wthree/substrate/frame/system)
   Compiling frame-benchmarking v4.0.0-dev (/Users/ash/wthree/substrate/frame/benchmarking)
   Compiling pallet-authorship v4.0.0-dev (/Users/ash/wthree/substrate/frame/authorship)
   Compiling pallet-balances v4.0.0-dev (/Users/ash/wthree/substrate/frame/balances)
   Compiling pallet-timestamp v4.0.0-dev (/Users/ash/wthree/substrate/frame/timestamp)
   Compiling pallet-assets v4.0.0-dev (/Users/ash/wthree/substrate/frame/assets)
   Compiling pallet-im-online v4.0.0-dev (/Users/ash/wthree/substrate/frame/im-online)
   Compiling pallet-session v4.0.0-dev (/Users/ash/wthree/substrate/frame/session)
   Compiling pallet-iris-assets v1.0.0 (/Users/ash/wthree/substrate/bin/node-template/pallets/iris-assets)
   Compiling pallet-iris-session v1.0.0 (/Users/ash/wthree/substrate/bin/node-template/pallets/iris-session)
warning: unused imports: `OffchainWorkerExt`, `TransactionPoolExt`, `testing`
  --> bin/node-template/pallets/iris-session/src/mock.rs:19:13
   |
19 |     offchain::{testing, OffchainWorkerExt, TransactionPoolExt},
   |                ^^^^^^^  ^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

warning: unused imports: `KeystoreExt`, `SyncCryptoStore`, `testing::KeyStore`
  --> bin/node-template/pallets/iris-session/src/mock.rs:24:19
   |
24 | use sp_keystore::{testing::KeyStore, KeystoreExt, SyncCryptoStore};
   |                   ^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^  ^^^^^^^^^^^^^^^

warning: unused import: `std::sync::Arc`
  --> bin/node-template/pallets/iris-session/src/mock.rs:27:5
   |
27 | use std::sync::Arc;
   |     ^^^^^^^^^^^^^^

warning: `pallet-iris-session` (lib test) generated 3 warnings
    Finished test [unoptimized + debuginfo] target(s) in 1m 12s
     Running unittests (/Users/ash/wthree/substrate/target/debug/deps/pallet_iris_session-bded6d9589b9e01d)

running 10 tests
test tests::iris_session_submit_rpc_ready_works_for_valid_values ... ok
test tests::iris_session_add_validator_fails_with_invalid_origin ... ok
test tests::iris_session_remove_validator_fails_with_invalid_origin ... ok
test tests::iris_session_simple_setup_should_work ... FAILED
test tests::iris_session_remove_validator_updates_validators_list ... FAILED
test tests::iris_session_validators_receive_reward_when_add_bytes_to_ipfs ... FAILED
test tests::iris_can_fetch_bytes_and_add_to_offchain_storage ... FAILED
test tests::iris_session_join_storage_pool ... FAILED
test tests::iris_session_duplicate_check ... FAILED
test tests::iris_session_add_validator_updates_validators_list ... FAILED

failures:

---- tests::iris_session_simple_setup_should_work stdout ----
thread 'tests::iris_session_simple_setup_should_work' panicked at 'assertion failed: `(left == right)`
  left: `[UintAuthorityId(1), UintAuthorityId(2), UintAuthorityId(3)]`,
 right: `[UintAuthorityId(0), UintAuthorityId(1), UintAuthorityId(2)]`', bin/node-template/pallets/iris-session/src/tests.rs:33:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- tests::iris_session_remove_validator_updates_validators_list stdout ----
thread 'tests::iris_session_remove_validator_updates_validators_list' panicked at 'assertion failed: `(left == right)`
  left: `[8e568d9bbdf66aa177cf76e7ce90264339586b92af41f2be491575076abc8659 (5FHLNKi4...), 0abfba1c88e46b489902a4657c6b4a16b442edeac0bebd46ce3a4e0d8da3f737 (5CJoHpab...), 2a13b7ac988eedb54d07868709d3fe91fabd229e39cdad6b1351d1412a71013e (5D1sj3HD...)]`,
 right: `[74a32f0313339b4965f189754681f8d1402db40b2bb027b05d62a7e0e836ba2a (5EhdtReN...), 62773764c8af80afaf96136249c718d04aebe929284d651ac9625c746d567058 (5EHoxtut...)]`', bin/node-template/pallets/iris-session/src/tests.rs:59:9

---- tests::iris_session_validators_receive_reward_when_add_bytes_to_ipfs stdout ----
thread 'tests::iris_session_validators_receive_reward_when_add_bytes_to_ipfs' panicked at 'assertion failed: `(left == right)`
  left: `3`,
 right: `0`', bin/node-template/pallets/iris-session/src/tests.rs:257:9

---- tests::iris_can_fetch_bytes_and_add_to_offchain_storage stdout ----
thread 'tests::iris_can_fetch_bytes_and_add_to_offchain_storage' panicked at 'internal error: entered unreachable code: only `Identity` is a valid response type.', bin/node-template/pallets/iris-session/src/lib.rs:934:29

---- tests::iris_session_join_storage_pool stdout ----
thread 'tests::iris_session_join_storage_pool' panicked at 'Expected Ok(_). Got Err(
    Module {
        index: 5,
        error: 4,
        message: Some(
            "CantCreateRequest",
        ),
    },
)', bin/node-template/pallets/iris-session/src/tests.rs:162:9

---- tests::iris_session_duplicate_check stdout ----
thread 'tests::iris_session_duplicate_check' panicked at 'assertion failed: `(left == right)`
  left: `[526e414a0795311b9304673317eed793a84e9d28c6cab65aa6acdf6a2c60b513 (5DvnY4Ls...), d8c78d775992ea3439c7437ad3a21a4f6fcf4b13a4506c4da06be54adb13770b (5GxwUnAu...), e4c6e9c0ed36e6754592799124a336017c0c203e392bb927f48240d9b1b44645 (5HEfs67g...), ba19586d718415aea08161118bc4b30bb783b97da01d9cdf66d444d18bbfe222 (5GGiHwVe...)]`,
 right: `[7c936929b42bfb5869fedfe3d86d2f2c4d7a4e9bd0308608fca5d778a1ab506b (5Et3atFH...), 74c1862a7e0a7a6ac017912be1c4bfe8d8eb6b13215a457cbf53523f69e9ed46 (5EhnuBMp...), 9632a3e7333496c510342c62d877602228d1579b149dc94af5a17268b536c739 (5FTe5n1U...), ba19586d718415aea08161118bc4b30bb783b97da01d9cdf66d444d18bbfe222 (5GGiHwVe...)]`', bin/node-template/pallets/iris-session/src/tests.rs:90:9

---- tests::iris_session_add_validator_updates_validators_list stdout ----
thread 'tests::iris_session_add_validator_updates_validators_list' panicked at 'assertion failed: `(left == right)`
  left: `[8aad04880de906ee07e7bf0f1960b074a2d92e14e7cc0966c6d5087d779bdb1f (5FCXrxqW...), 7cfe8956620a28da08895c9f4ec504ae62f43f096443a074ac82c87416595d34 (5EtbQcjW...), bce8ec64d0cc75b86f81cd4eff5c1a6e42e512d06e14ecbffdff4a48a4df1a49 (5GLQ3ypq...), c0b3c2a63e682ea38fdfd2141369e9b71d1e7b0afa6e81b6e4bc76cf2fcc377c (5GRNT7RT...)]`,
 right: `[f4617895ad9c89e87b6d2da33c610a6a9a685e4b274c0e73c630806b35598752 (5Hb8Vii2...), fce20e4f5ddfb4ae1fda4da672341fa843597cbf887d0198330162d7fd608049 (5HnH5QPU...), 58bb4f55383d3e42d50404792627225e5b103922a797bd93fd9db7807d35c868 (5E53iM4J...), c0b3c2a63e682ea38fdfd2141369e9b71d1e7b0afa6e81b6e4bc76cf2fcc377c (5GRNT7RT...)]`', bin/node-template/pallets/iris-session/src/tests.rs:48:9


failures:
    tests::iris_can_fetch_bytes_and_add_to_offchain_storage
    tests::iris_session_add_validator_updates_validators_list
    tests::iris_session_duplicate_check
    tests::iris_session_join_storage_pool
    tests::iris_session_remove_validator_updates_validators_list
    tests::iris_session_simple_setup_should_work
    tests::iris_session_validators_receive_reward_when_add_bytes_to_ipfs

test result: FAILED. 3 passed; 7 failed; 0 ignored; 0 measured; 1 filtered out; finished in 0.58s

error: test failed, to rerun pass '--lib'

@ashlink11
Copy link
Contributor

@driemworks I looked it up and Discord is actually having a major outage so let's continue convo here. I've set up a go-ipfs node locally. Attempting now to get the ui running.

@driemworks
Copy link
Contributor Author

I've updated the tests for the iris-session pallet, they are now passing as intended. Additionally, the errors that David encountered are resolved as well. However, after more thoroughly testing the repo I have noticed some issues with existing tests that are seemingly inherited from the rs-ipfs/sustrate repository (iris is a fork of this for the time being), specifically in client/offchain/src/api.rs and client/service/src/task_manager/mod.rs.

The way I see it, we have two options. Either:

  1. I attempt to fix these issues now and make it part of this delivery.
  2. I wait until the subsequent milestone delivery.

I would understand if it's preferred that they be fixed now (even though they were already existing and unchanged as part of this delivery), however, I think it makes more sense to wait. My repository is not in sync with the substrate master currently. I attempted to upgrade my fork as part of this milestone but rust-ipfs relies on an older version of libp2p (0.39.1) that is incompatible with the current substrate master (0.40.0). There is an ongoing effort to upgrade the libp2p version of rust-ipfs which is currently being reviewed rs-ipfs/rust-ipfs#499. Once that's completed and merged, I can upgrade to the latest substrate master. Option 1 could delay this milestone delivery even further as well as lead to potential throwaway work, as the substrate master has seen significant changes since the rs-ipfs/substrate fork was created (almost a year out of sync).

Either way, I'll start looking into making the necessary changes to fix these issues. Please let me know if this should be included in this delivery or if it can be postponed to the next one.

@ashlink11
Copy link
Contributor

@driemworks I am sorry you are dealing with blocks due to versioning. Once again, bravo to you for innovating in a fast-moving ecosystem.

@Noc2, May I please request your expertise in answering the Iris team's question, ^above. Thank you.

@ashlink11
Copy link
Contributor

@semuelle Hello Sebastian, since you evaluated their milestone 1, may I also request your expertise on the most recent question from the Iris team (above)?

Copy link
Collaborator

@Noc2 Noc2 left a comment

Choose a reason for hiding this comment

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

Hi @driemworks. Thanks for bringing this up. In general, feel free to create an amendment and update the contract accordingly. It’s basically up to you. Either potentially reducing the scope and you can explain as part of the PR, why this is the case or you could also increase the scope/budget and add the additional time, which you require to fix it. The grants committee is usually quite flexible regarding these changes as long as they are reasonable. All that said, are you aware of the following repo: https://github.com/DanHenton/pocket-substrate/tree/ipfs-ocw Maybe that is useful for you.

@driemworks
Copy link
Contributor Author

@Noc2 @cruikshankss Unfortuantely, it seems the pocket-substrate repo is suffering from the same issue. However, good news: I was able to fix the failing tests without any major rework of the ipfs integration into the runtime. I've committed the necessary changes to the iris_milestone_2 branch of my repo. I've also pushed the latest docker build, which includes the changes, to the docker hub. We should be good to move forward with testing without any change of scope for now.

@ashlink11
Copy link
Contributor

@cruikshankss Thank you for your work to push those fixes.

My team and I attempted to compile & run your fixed branch with cargo test iris, both with current Rust toolchain and with two different rust toolchains, like you mentioned 1.57.0, and then the nightly version (2021-10-06), but were unable to compile Iris.

We used these commands:

rustup override set nightly-2021-10-06
rustup target add wasm32-unknown-unknown --toolchain nightly-2021-10-06

I also tried:

rustup override set 1.57.0

For reference, to get back to the stable version, we use these commands:

rustup default stable
rustup update

I can provide more error logs/information if you need, because I am hoping you could provide me specific commands to run for the rust toolchain so I can run your unit tests.

It's understandable there are so many steps to this cutting-edge invention you're building and I feel bad asking for more instructions since you've so carefully explained so many steps already, in multiple ways, video, two great testing guides, docs page, and filled in gaps for me/sped things up for me. Thanks for understanding and helping!

@driemworks
Copy link
Contributor Author

Just to reiterate/share what we discussed on discord:
The compilation failure was because of a bad merge that I performed yesterday. It's resolved now and the tests are able to be run successfully. I updated the git branches so iris_milestone_2 is up to date with the most recent working code . I also updated the docker image to the latest build.

@ashlink11
Copy link
Contributor

Hi @driemworks,

I've accepted this milestone and forwarded your invoice. Wishing you continued success with Iris!

@ashlink11
Copy link
Contributor

Hi again @driemworks,

Actually, there is a bookkeeping error in your invoice, where the amount is correct, but it says "Milestone 1" instead of "Milestone 2". Would you please submit another invoice through our form?

Thank you!

@driemworks
Copy link
Contributor Author

driemworks commented Mar 11, 2022

@cruikshankss I've updated my invoice but it seems there's an issue with the form. When I open the link I'm seeing:

Screenshot 2022-03-11 112412

@ashlink11 ashlink11 merged commit 7fdd99a into w3f:master Mar 11, 2022
@ashlink11
Copy link
Contributor

@driemworks The invoice form actually does seem to be down right now. I've investigated into it and I plan to let you know when it's back up. Sorry for the technical issues and thank you for your patience.

@ashlink11
Copy link
Contributor

@driemworks Would you please email me your invoice at [email protected] while we work on fixing the form?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants