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

subsmt_milestone_1 #1228

Merged
merged 2 commits into from
Dec 3, 2024
Merged

subsmt_milestone_1 #1228

merged 2 commits into from
Dec 3, 2024

Conversation

YanOctavian
Copy link
Contributor

Milestone Delivery Checklist

  • The milestone-delivery-template.md has been copied and updated.
  • This pull request is being made by the same account as the accepted application.
  • I have disclosed any and all sources of reused code in the submitted repositories and have done my due diligence to meet its license requirements.
  • In case of acceptance, invoices must be submitted and payments will be transferred to the Polkadot AssetHub and/or fiat account provided in the application.
  • The delivery is according to the Guidelines for Milestone Deliverables.

Link to the application pull request: w3f/Grants-Program#2335

@semuelle semuelle self-assigned this Dec 2, 2024
Copy link
Member

@semuelle semuelle left a comment

Choose a reason for hiding this comment

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

Hi @YanOctavian. Thanks for the delivery, but the PR is currently editing our application template as well; could you undo those changes?

@YanOctavian
Copy link
Contributor Author

Hi @YanOctavian. Thanks for the delivery, but the PR is currently editing our application template as well; could you undo those changes?

@semuelle Thank you for your reminder. I will update it as soon as possible.

Copy link
Member

@semuelle semuelle left a comment

Choose a reason for hiding this comment

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

I am trying to compile the project locally, but I run into issues. First, cargo build failed because the members folders are case sensitive (SMT, not smt). Then, it fails with the following error message. This also happens using docker build (docker compose works, though). Could you check?

   Compiling sp-runtime v31.0.1 (https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.14.0#778e9d15)
   Compiling alloc-stdlib v0.2.2
   Compiling num-bigint v0.4.6
   Compiling const-random v0.1.18
   Compiling scale-decode v0.11.1
error[E0277]: the trait bound `generic::header::Header<Number, Hash>: Encode` is not satisfied
    --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/generic/header.rs:75:39
     |
75   | impl<Number, Hash> traits::Header for Header<Number, Hash>
     |                                       ^^^^^^^^^^^^^^^^^^^^ the trait `Encode` is not implemented for `generic::header::Header<Number, Hash>`, which is required by `generic::header::Header<Number, Hash>: Codec`
     |
     = note: required for `generic::header::Header<Number, Hash>` to implement `Codec`
note: required by a bound in `traits::Header`
    --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/traits.rs:1199:24
     |
1198 | pub trait Header:
     |           ------ required by a bound in this trait
1199 |     Clone + Send + Sync + Codec + Eq + MaybeSerialize + Debug + TypeInfo + 'static
     |                           ^^^^^ required by this bound in `Header`
help: consider extending the `where` clause, but there might be an alternative better way to express this requirement
     |
78   |     Hash: HashT, generic::header::Header<Number, Hash>: Encode
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0277]: the trait bound `generic::header::Header<Number, Hash>: Encode` is not satisfied
   --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/generic/header.rs:148:17
    |
148 |         Hash::hash_of(self)
    |         ------------- ^^^^ the trait `Encode` is not implemented for `generic::header::Header<Number, Hash>`
    |         |
    |         required by a bound introduced by this call
    |
note: required by a bound in `traits::Hash::hash_of`
   --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/traits.rs:973:16
    |
973 |     fn hash_of<S: Encode>(s: &S) -> Self::Output {
    |                   ^^^^^^ required by this bound in `Hash::hash_of`
help: consider extending the `where` clause, but there might be an alternative better way to express this requirement
    |
143 |     Hash: HashT, generic::header::Header<Number, Hash>: Encode
    |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   Compiling js-sys v0.3.74
   Compiling darling v0.20.10
For more information about this error, try `rustc --explain E0277`.
error: could not compile `sp-runtime` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

@kevin-valerio
Copy link

I am trying to compile the project locally, but I run into issues. First, cargo build failed because the members folders are case sensitive (SMT, not smt). Then, it fails with the following error message. This also happens using docker build (docker compose works, though). Could you check?

   Compiling sp-runtime v31.0.1 (https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.14.0#778e9d15)
   Compiling alloc-stdlib v0.2.2
   Compiling num-bigint v0.4.6
   Compiling const-random v0.1.18
   Compiling scale-decode v0.11.1
error[E0277]: the trait bound `generic::header::Header<Number, Hash>: Encode` is not satisfied
    --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/generic/header.rs:75:39
     |
75   | impl<Number, Hash> traits::Header for Header<Number, Hash>
     |                                       ^^^^^^^^^^^^^^^^^^^^ the trait `Encode` is not implemented for `generic::header::Header<Number, Hash>`, which is required by `generic::header::Header<Number, Hash>: Codec`
     |
     = note: required for `generic::header::Header<Number, Hash>` to implement `Codec`
note: required by a bound in `traits::Header`
    --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/traits.rs:1199:24
     |
1198 | pub trait Header:
     |           ------ required by a bound in this trait
1199 |     Clone + Send + Sync + Codec + Eq + MaybeSerialize + Debug + TypeInfo + 'static
     |                           ^^^^^ required by this bound in `Header`
help: consider extending the `where` clause, but there might be an alternative better way to express this requirement
     |
78   |     Hash: HashT, generic::header::Header<Number, Hash>: Encode
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0277]: the trait bound `generic::header::Header<Number, Hash>: Encode` is not satisfied
   --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/generic/header.rs:148:17
    |
148 |         Hash::hash_of(self)
    |         ------------- ^^^^ the trait `Encode` is not implemented for `generic::header::Header<Number, Hash>`
    |         |
    |         required by a bound introduced by this call
    |
note: required by a bound in `traits::Hash::hash_of`
   --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/traits.rs:973:16
    |
973 |     fn hash_of<S: Encode>(s: &S) -> Self::Output {
    |                   ^^^^^^ required by this bound in `Hash::hash_of`
help: consider extending the `where` clause, but there might be an alternative better way to express this requirement
    |
143 |     Hash: HashT, generic::header::Header<Number, Hash>: Encode
    |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   Compiling js-sys v0.3.74
   Compiling darling v0.20.10
For more information about this error, try `rustc --explain E0277`.
error: could not compile `sp-runtime` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

Same issue for me.

@YanOctavian
Copy link
Contributor Author

I am trying to compile the project locally, but I run into issues. First, cargo build failed because the members folders are case sensitive (SMT, not smt). Then, it fails with the following error message. This also happens using docker build (docker compose works, though). Could you check?

   Compiling sp-runtime v31.0.1 (https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.14.0#778e9d15)
   Compiling alloc-stdlib v0.2.2
   Compiling num-bigint v0.4.6
   Compiling const-random v0.1.18
   Compiling scale-decode v0.11.1
error[E0277]: the trait bound `generic::header::Header<Number, Hash>: Encode` is not satisfied
    --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/generic/header.rs:75:39
     |
75   | impl<Number, Hash> traits::Header for Header<Number, Hash>
     |                                       ^^^^^^^^^^^^^^^^^^^^ the trait `Encode` is not implemented for `generic::header::Header<Number, Hash>`, which is required by `generic::header::Header<Number, Hash>: Codec`
     |
     = note: required for `generic::header::Header<Number, Hash>` to implement `Codec`
note: required by a bound in `traits::Header`
    --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/traits.rs:1199:24
     |
1198 | pub trait Header:
     |           ------ required by a bound in this trait
1199 |     Clone + Send + Sync + Codec + Eq + MaybeSerialize + Debug + TypeInfo + 'static
     |                           ^^^^^ required by this bound in `Header`
help: consider extending the `where` clause, but there might be an alternative better way to express this requirement
     |
78   |     Hash: HashT, generic::header::Header<Number, Hash>: Encode
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0277]: the trait bound `generic::header::Header<Number, Hash>: Encode` is not satisfied
   --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/generic/header.rs:148:17
    |
148 |         Hash::hash_of(self)
    |         ------------- ^^^^ the trait `Encode` is not implemented for `generic::header::Header<Number, Hash>`
    |         |
    |         required by a bound introduced by this call
    |
note: required by a bound in `traits::Hash::hash_of`
   --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/traits.rs:973:16
    |
973 |     fn hash_of<S: Encode>(s: &S) -> Self::Output {
    |                   ^^^^^^ required by this bound in `Hash::hash_of`
help: consider extending the `where` clause, but there might be an alternative better way to express this requirement
    |
143 |     Hash: HashT, generic::header::Header<Number, Hash>: Encode
    |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   Compiling js-sys v0.3.74
   Compiling darling v0.20.10
For more information about this error, try `rustc --explain E0277`.
error: could not compile `sp-runtime` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

It seems that this issue was caused by some dependencies being updated, as I haven't encountered this problem locally.

@kevin-valerio
Copy link

I am trying to compile the project locally, but I run into issues. First, cargo build failed because the members folders are case sensitive (SMT, not smt). Then, it fails with the following error message. This also happens using docker build (docker compose works, though). Could you check?

   Compiling sp-runtime v31.0.1 (https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.14.0#778e9d15)
   Compiling alloc-stdlib v0.2.2
   Compiling num-bigint v0.4.6
   Compiling const-random v0.1.18
   Compiling scale-decode v0.11.1
error[E0277]: the trait bound `generic::header::Header<Number, Hash>: Encode` is not satisfied
    --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/generic/header.rs:75:39
     |
75   | impl<Number, Hash> traits::Header for Header<Number, Hash>
     |                                       ^^^^^^^^^^^^^^^^^^^^ the trait `Encode` is not implemented for `generic::header::Header<Number, Hash>`, which is required by `generic::header::Header<Number, Hash>: Codec`
     |
     = note: required for `generic::header::Header<Number, Hash>` to implement `Codec`
note: required by a bound in `traits::Header`
    --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/traits.rs:1199:24
     |
1198 | pub trait Header:
     |           ------ required by a bound in this trait
1199 |     Clone + Send + Sync + Codec + Eq + MaybeSerialize + Debug + TypeInfo + 'static
     |                           ^^^^^ required by this bound in `Header`
help: consider extending the `where` clause, but there might be an alternative better way to express this requirement
     |
78   |     Hash: HashT, generic::header::Header<Number, Hash>: Encode
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0277]: the trait bound `generic::header::Header<Number, Hash>: Encode` is not satisfied
   --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/generic/header.rs:148:17
    |
148 |         Hash::hash_of(self)
    |         ------------- ^^^^ the trait `Encode` is not implemented for `generic::header::Header<Number, Hash>`
    |         |
    |         required by a bound introduced by this call
    |
note: required by a bound in `traits::Hash::hash_of`
   --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/traits.rs:973:16
    |
973 |     fn hash_of<S: Encode>(s: &S) -> Self::Output {
    |                   ^^^^^^ required by this bound in `Hash::hash_of`
help: consider extending the `where` clause, but there might be an alternative better way to express this requirement
    |
143 |     Hash: HashT, generic::header::Header<Number, Hash>: Encode
    |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   Compiling js-sys v0.3.74
   Compiling darling v0.20.10
For more information about this error, try `rustc --explain E0277`.
error: could not compile `sp-runtime` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

It seems that this issue was caused by some dependencies being updated, as I haven't encountered this problem locally.

Exactly, it was after I cargo update. I've just reverted to my previous Cargo.lock and it works now.

@YanOctavian
Copy link
Contributor Author

I am trying to compile the project locally, but I run into issues. First, cargo build failed because the members folders are case sensitive (SMT, not smt). Then, it fails with the following error message. This also happens using docker build (docker compose works, though). Could you check?

   Compiling sp-runtime v31.0.1 (https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.14.0#778e9d15)
   Compiling alloc-stdlib v0.2.2
   Compiling num-bigint v0.4.6
   Compiling const-random v0.1.18
   Compiling scale-decode v0.11.1
error[E0277]: the trait bound `generic::header::Header<Number, Hash>: Encode` is not satisfied
    --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/generic/header.rs:75:39
     |
75   | impl<Number, Hash> traits::Header for Header<Number, Hash>
     |                                       ^^^^^^^^^^^^^^^^^^^^ the trait `Encode` is not implemented for `generic::header::Header<Number, Hash>`, which is required by `generic::header::Header<Number, Hash>: Codec`
     |
     = note: required for `generic::header::Header<Number, Hash>` to implement `Codec`
note: required by a bound in `traits::Header`
    --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/traits.rs:1199:24
     |
1198 | pub trait Header:
     |           ------ required by a bound in this trait
1199 |     Clone + Send + Sync + Codec + Eq + MaybeSerialize + Debug + TypeInfo + 'static
     |                           ^^^^^ required by this bound in `Header`
help: consider extending the `where` clause, but there might be an alternative better way to express this requirement
     |
78   |     Hash: HashT, generic::header::Header<Number, Hash>: Encode
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0277]: the trait bound `generic::header::Header<Number, Hash>: Encode` is not satisfied
   --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/generic/header.rs:148:17
    |
148 |         Hash::hash_of(self)
    |         ------------- ^^^^ the trait `Encode` is not implemented for `generic::header::Header<Number, Hash>`
    |         |
    |         required by a bound introduced by this call
    |
note: required by a bound in `traits::Hash::hash_of`
   --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/traits.rs:973:16
    |
973 |     fn hash_of<S: Encode>(s: &S) -> Self::Output {
    |                   ^^^^^^ required by this bound in `Hash::hash_of`
help: consider extending the `where` clause, but there might be an alternative better way to express this requirement
    |
143 |     Hash: HashT, generic::header::Header<Number, Hash>: Encode
    |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   Compiling js-sys v0.3.74
   Compiling darling v0.20.10
For more information about this error, try `rustc --explain E0277`.
error: could not compile `sp-runtime` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

@kevin-valerio @semuelle Thank you very much for your feedback. After running cargo update locally, I was able to reproduce the issue. I will need a day to resolve this dependency error.

@YanOctavian
Copy link
Contributor Author

It seems that there have been some major upgrades and updates to the Polkadot SDK recently.

@YanOctavian
Copy link
Contributor Author

YanOctavian commented Dec 3, 2024

I am trying to compile the project locally, but I run into issues. First, cargo build failed because the members folders are case sensitive (SMT, not smt). Then, it fails with the following error message. This also happens using docker build (docker compose works, though). Could you check?

   Compiling sp-runtime v31.0.1 (https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.14.0#778e9d15)
   Compiling alloc-stdlib v0.2.2
   Compiling num-bigint v0.4.6
   Compiling const-random v0.1.18
   Compiling scale-decode v0.11.1
error[E0277]: the trait bound `generic::header::Header<Number, Hash>: Encode` is not satisfied
    --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/generic/header.rs:75:39
     |
75   | impl<Number, Hash> traits::Header for Header<Number, Hash>
     |                                       ^^^^^^^^^^^^^^^^^^^^ the trait `Encode` is not implemented for `generic::header::Header<Number, Hash>`, which is required by `generic::header::Header<Number, Hash>: Codec`
     |
     = note: required for `generic::header::Header<Number, Hash>` to implement `Codec`
note: required by a bound in `traits::Header`
    --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/traits.rs:1199:24
     |
1198 | pub trait Header:
     |           ------ required by a bound in this trait
1199 |     Clone + Send + Sync + Codec + Eq + MaybeSerialize + Debug + TypeInfo + 'static
     |                           ^^^^^ required by this bound in `Header`
help: consider extending the `where` clause, but there might be an alternative better way to express this requirement
     |
78   |     Hash: HashT, generic::header::Header<Number, Hash>: Encode
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0277]: the trait bound `generic::header::Header<Number, Hash>: Encode` is not satisfied
   --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/generic/header.rs:148:17
    |
148 |         Hash::hash_of(self)
    |         ------------- ^^^^ the trait `Encode` is not implemented for `generic::header::Header<Number, Hash>`
    |         |
    |         required by a bound introduced by this call
    |
note: required by a bound in `traits::Hash::hash_of`
   --> /home/x/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/778e9d1/substrate/primitives/runtime/src/traits.rs:973:16
    |
973 |     fn hash_of<S: Encode>(s: &S) -> Self::Output {
    |                   ^^^^^^ required by this bound in `Hash::hash_of`
help: consider extending the `where` clause, but there might be an alternative better way to express this requirement
    |
143 |     Hash: HashT, generic::header::Header<Number, Hash>: Encode
    |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   Compiling js-sys v0.3.74
   Compiling darling v0.20.10
For more information about this error, try `rustc --explain E0277`.
error: could not compile `sp-runtime` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

@kevin-valerio @semuelle I switched the polkadot-sdk branch to stable2409 and cargo build successfully. The code has been updated. Thank you for your feedback. Have a good day!

Copy link
Member

@semuelle semuelle left a comment

Choose a reason for hiding this comment

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

Thanks for the updates, @YanOctavian & @kevin-valerio. I am happy to report that everything is working now and your milestone is hereby accepted. Congrats! You can find my evaluation notes here.

@semuelle semuelle merged commit 0defe4a into w3f:master Dec 3, 2024
3 checks passed
Copy link

github-actions bot commented Dec 3, 2024

🪙 Please fill out the invoice form in order to initiate the payment process. Thank you!

@YanOctavian
Copy link
Contributor Author

Thanks for the updates, @YanOctavian & @kevin-valerio. I am happy to report that everything is working now and your milestone is hereby accepted. Congrats! You can find my evaluation notes here.

@semuelle Good job! Thank you very much. I have submitted the invioce.

@YanOctavian YanOctavian mentioned this pull request Dec 5, 2024
10 tasks
@YanOctavian
Copy link
Contributor Author

@semuelle @kevin-valerio Just wanted to know if the M1 payment could be processed before the 25th. If so, we would be very happy. Wishing you a wonderful holiday!

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

Successfully merging this pull request may close these issues.

3 participants