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

xcNFT M1 & M2 Delivery #1220

Merged
merged 2 commits into from
Nov 19, 2024
Merged

xcNFT M1 & M2 Delivery #1220

merged 2 commits into from
Nov 19, 2024

Conversation

dudo50
Copy link
Contributor

@dudo50 dudo50 commented Nov 7, 2024

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#2358

@keeganquigley
Copy link
Contributor

Hi @dudo50 thanks for the delivery and sorry for the delay. I am working on the eval now and am running into a couple failed unit tests. Could you take a look?

cargo test --package pallet-parachain-xcnft --lib -- tests --nocapture:

Output
   Compiling sp-panic-handler v13.0.0 (/home/ubuntu/polkadot-sdk/substrate/primitives/panic-handler)
error[E0658]: use of unstable library feature 'lazy_cell'
  --> substrate/primitives/panic-handler/src/lib.rs:34:2
   |
34 |     sync::LazyLock,
   |     ^^^^^^^^^^^^^^
   |
   = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
   --> substrate/primitives/panic-handler/src/lib.rs:132:13
    |
132 |     static RE: LazyLock<Regex> = LazyLock::new(|| {
    |                ^^^^^^^^^^^^^^^
    |
    = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
   --> substrate/primitives/panic-handler/src/lib.rs:132:31
    |
132 |     static RE: LazyLock<Regex> = LazyLock::new(|| {
    |                                  ^^^^^^^^
    |
    = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
   --> substrate/primitives/panic-handler/src/lib.rs:132:31
    |
132 |     static RE: LazyLock<Regex> = LazyLock::new(|| {
    |                                  ^^^^^^^^^^^^^
    |
    = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

For more information about this error, try `rustc --explain E0658`.
error: could not compile `sp-panic-handler` (lib) due to 4 previous errors
warning: build failed, waiting for other jobs to finish...
error[E0658]: use of unstable library feature 'lazy_cell'
  --> substrate/primitives/trie/src/cache/shared_cache.rs:28:14
   |
28 |     sync::{Arc, LazyLock},
   |                 ^^^^^^^^
   |
   = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
  --> substrate/primitives/trie/src/cache/shared_cache.rs:32:22
   |
32 | static RANDOM_STATE: LazyLock<ahash::RandomState> = LazyLock::new(|| {
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
  --> substrate/primitives/trie/src/cache/shared_cache.rs:32:53
   |
32 | static RANDOM_STATE: LazyLock<ahash::RandomState> = LazyLock::new(|| {
   |                                                     ^^^^^^^^
   |
   = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
  --> substrate/primitives/trie/src/cache/shared_cache.rs:32:53
   |
32 | static RANDOM_STATE: LazyLock<ahash::RandomState> = LazyLock::new(|| {
   |                                                     ^^^^^^^^^^^^^
   |
   = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error: could not compile `sp-trie` (lib) due to 4 previous errors

cargo test --package pallet-parachain-xcnft-two --lib -- tests --nocapture:

Output
   Compiling sp-panic-handler v13.0.0 (/home/ubuntu/polkadot-sdk/substrate/primitives/panic-handler)
error[E0658]: use of unstable library feature 'lazy_cell'
  --> substrate/primitives/panic-handler/src/lib.rs:34:2
   |
34 |     sync::LazyLock,
   |     ^^^^^^^^^^^^^^
   |
   = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
   --> substrate/primitives/panic-handler/src/lib.rs:132:13
    |
132 |     static RE: LazyLock<Regex> = LazyLock::new(|| {
    |                ^^^^^^^^^^^^^^^
    |
    = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
   --> substrate/primitives/panic-handler/src/lib.rs:132:31
    |
132 |     static RE: LazyLock<Regex> = LazyLock::new(|| {
    |                                  ^^^^^^^^
    |
    = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
   --> substrate/primitives/panic-handler/src/lib.rs:132:31
    |
132 |     static RE: LazyLock<Regex> = LazyLock::new(|| {
    |                                  ^^^^^^^^^^^^^
    |
    = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

For more information about this error, try `rustc --explain E0658`.
error: could not compile `sp-panic-handler` (lib) due to 4 previous errors
warning: build failed, waiting for other jobs to finish...
error[E0658]: use of unstable library feature 'lazy_cell'
  --> substrate/primitives/trie/src/cache/shared_cache.rs:28:14
   |
28 |     sync::{Arc, LazyLock},
   |                 ^^^^^^^^
   |
   = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
  --> substrate/primitives/trie/src/cache/shared_cache.rs:32:22
   |
32 | static RANDOM_STATE: LazyLock<ahash::RandomState> = LazyLock::new(|| {
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
  --> substrate/primitives/trie/src/cache/shared_cache.rs:32:53
   |
32 | static RANDOM_STATE: LazyLock<ahash::RandomState> = LazyLock::new(|| {
   |                                                     ^^^^^^^^
   |
   = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
  --> substrate/primitives/trie/src/cache/shared_cache.rs:32:53
   |
32 | static RANDOM_STATE: LazyLock<ahash::RandomState> = LazyLock::new(|| {
   |                                                     ^^^^^^^^^^^^^
   |
   = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error: could not compile `sp-trie` (lib) due to 4 previous errors
ubuntu@ip-172-31-16-209:~/polkadot-sdk$ cargo test --package pallet-parachain-xcnft-two --lib -- tests --nocapture
warning: /home/ubuntu/polkadot-sdk/Cargo.toml: unused manifest key: workspace.lints.rust.unexpected_cfgs.check-cfg
   Compiling sp-panic-handler v13.0.0 (/home/ubuntu/polkadot-sdk/substrate/primitives/panic-handler)
   Compiling sp-keystore v0.34.0 (/home/ubuntu/polkadot-sdk/substrate/primitives/keystore)
   Compiling sp-trie v29.0.0 (/home/ubuntu/polkadot-sdk/substrate/primitives/trie)
   Compiling sp-weights v27.0.0 (/home/ubuntu/polkadot-sdk/substrate/primitives/weights)
error[E0658]: use of unstable library feature 'lazy_cell'
  --> substrate/primitives/panic-handler/src/lib.rs:34:2
   |
34 |     sync::LazyLock,
   |     ^^^^^^^^^^^^^^
   |
   = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
   --> substrate/primitives/panic-handler/src/lib.rs:132:13
    |
132 |     static RE: LazyLock<Regex> = LazyLock::new(|| {
    |                ^^^^^^^^^^^^^^^
    |
    = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
   --> substrate/primitives/panic-handler/src/lib.rs:132:31
    |
132 |     static RE: LazyLock<Regex> = LazyLock::new(|| {
    |                                  ^^^^^^^^
    |
    = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
   --> substrate/primitives/panic-handler/src/lib.rs:132:31
    |
132 |     static RE: LazyLock<Regex> = LazyLock::new(|| {
    |                                  ^^^^^^^^^^^^^
    |
    = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

For more information about this error, try `rustc --explain E0658`.
error: could not compile `sp-panic-handler` (lib) due to 4 previous errors
warning: build failed, waiting for other jobs to finish...
error[E0658]: use of unstable library feature 'lazy_cell'
  --> substrate/primitives/trie/src/cache/shared_cache.rs:28:14
   |
28 |     sync::{Arc, LazyLock},
   |                 ^^^^^^^^
   |
   = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
  --> substrate/primitives/trie/src/cache/shared_cache.rs:32:22
   |
32 | static RANDOM_STATE: LazyLock<ahash::RandomState> = LazyLock::new(|| {
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
  --> substrate/primitives/trie/src/cache/shared_cache.rs:32:53
   |
32 | static RANDOM_STATE: LazyLock<ahash::RandomState> = LazyLock::new(|| {
   |                                                     ^^^^^^^^
   |
   = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
  --> substrate/primitives/trie/src/cache/shared_cache.rs:32:53
   |
32 | static RANDOM_STATE: LazyLock<ahash::RandomState> = LazyLock::new(|| {
   |                                                     ^^^^^^^^^^^^^
   |
   = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error: could not compile `sp-trie` (lib) due to 4 previous errors

cargo test:

Output
error[E0658]: use of unstable library feature 'lazy_cell'
  --> substrate/primitives/panic-handler/src/lib.rs:34:2
   |
34 |     sync::LazyLock,
   |     ^^^^^^^^^^^^^^
   |
   = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
   --> substrate/primitives/panic-handler/src/lib.rs:132:13
    |
132 |     static RE: LazyLock<Regex> = LazyLock::new(|| {
    |                ^^^^^^^^^^^^^^^
    |
    = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
   --> substrate/primitives/panic-handler/src/lib.rs:132:31
    |
132 |     static RE: LazyLock<Regex> = LazyLock::new(|| {
    |                                  ^^^^^^^^
    |
    = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

error[E0658]: use of unstable library feature 'lazy_cell'
   --> substrate/primitives/panic-handler/src/lib.rs:132:31
    |
132 |     static RE: LazyLock<Regex> = LazyLock::new(|| {
    |                                  ^^^^^^^^^^^^^
    |
    = note: see issue #109736 <https://github.com/rust-lang/rust/issues/109736> for more information

Zombienet is running and I'm in the root dir of the cloned polkadot sdk

Do I need to do something else for these to work? Thanks for any help you can provide.

@dudo50
Copy link
Contributor Author

dudo50 commented Nov 18, 2024

Hey @keeganquigley , no worries and thanks!

Looking into this, and the tests seem to work fine for me.
Snímka obrazovky 2024-11-18 o 17 57 40

It seems like a compilation issue to substrate modules not to the xcNFT.

Could you please confirm your rust version and if you are running nightly and not stable? Also please list which version of rust are you running. You can do this by rustup -V

I have following version for comparison: rustc version is rustc 1.84.0-nightly (5ec7d6eee 2024-11-17)

If you are not on latest you can try using this to see if that would resolve your issue:

rustup upgrade 
rustup default nightly    

Let me know if this resolved your issue.

Thanks!

@keeganquigley
Copy link
Contributor

Thanks @dudo50 you're right, indeed I was running stable. It's working now but cargo test fails due to the revive pallet now for some reason:

error: failed to run custom build command for `pallet-revive-fixtures v0.1.0 (/home/ubuntu/polkadot-sdk/substrate/frame/revive/fixtures)`

Caused by:
  process didn't exit successfully: `/home/ubuntu/polkadot-sdk/target/debug/build/pallet-revive-fixtures-35f4272dadda2e02/build-script-build` (exit status: 1)
  --- stdout
  cargo::rerun-if-env-changed=PALLET_REVIVE_FIXTURES_RUSTUP_TOOLCHAIN
  cargo::rerun-if-env-changed=PALLET_REVIVE_FIXTURES_STRIP
  cargo::rerun-if-env-changed=PALLET_REVIVE_FIXTURES_OPTIMIZE
  cargo::rerun-if-changed=/home/ubuntu/polkadot-sdk/substrate/frame/revive/fixtures
  cargo::rerun-if-changed=/home/ubuntu/polkadot-sdk/substrate/frame/revive/uapi

  --- stderr
      Updating crates.io index
       Locking 12 packages to latest compatible versions
        Adding polkavm-derive v0.14.0 (available: v0.16.0)
  error: "/home/ubuntu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/Cargo.lock" does not exist, unable to build with the standard library, try:
          rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu

  Error: Failed to build contracts

@dudo50
Copy link
Contributor Author

dudo50 commented Nov 19, 2024

Thanks for the swift reply @keeganquigley,

It again seems to be a compilation problem not related to xcNFT, as the cargo test works for me (It errored out at first due to no space on device, but then it compiled successfully).

screen

I've tried to ask Copilot for a resolution to problem that you are experiencing, and this is what it suggested:

"The error message indicates that the build process is failing because the standard library source code is missing. You can resolve this by adding the rust-src component for the nightly toolchain.

Run the following command in your terminal:

rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu

This command will install the source code for the standard library, which is required for the build process. After running this command, try building your project again."

Let me know if that resolved the issue.

Thanks!

@dudo50
Copy link
Contributor Author

dudo50 commented Nov 19, 2024

@keeganquigley Sorry for another ping, but meanwhile, I noticed that there was an ambiguous test present in the tests for the pallet_nfts xcNFT version. It accessed pallet_nfts storage directly which is not allowed. After removal error is no longer present. This test was removed from the pallet_uniques version as well, but I forgot to remove it from the pallet_nfts version. We were unable to use the set_accept_ownership function in both versions for some reason; it failed despite the parameters being 100% correct. For some reason, the function didn't set the proposed owner as accepting ownership. When overriding and directly accessing storage, we were able to make the test pass, but this isn't correct behaviour for tests (They shouldn't access the storage of other pallets (Thus the error occurred despite test passing)). This is set as future work and requires further investigation.

Commit: paraspell-research/polkadot-sdk@57a29b1

Feel free to pull the latest version of the ParaSpell research polkadot-sdk.

@keeganquigley
Copy link
Contributor

keeganquigley commented Nov 19, 2024

Thanks @dudo50 yes I noticed this too, it's completely passing for me now thanks for the fix.

Thanks for the suggestions, cargo test still errors out for me but now it's due to disk space, as you mentioned above, even after I try upping it. No worries since it's on my end I'm willing to go ahead and pass it but maybe consider testing on more platforms. Great work as usual!

Here is milestone 1 and milestone 2 evaluations.

@keeganquigley keeganquigley merged commit a251b9d into w3f:master Nov 19, 2024
8 checks passed
Copy link

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

Copy link

Congratulations on completing the first milestone of this grant! As part of the Grants Program, we want to help grant recipients acknowledge their grants publicly. To that end, we've created a badge for projects that successfully deliver their first milestone. Please use the badge only in reference to the work that has been completed as part of this grant, so please do not display it on your team or project's homepage unless accompanied by a short description of the grant. Furthermore, you're now welcome to announce the grant publicly. Please remember to observe the foundation's guidelines in doing so. If you haven't already, reach out to [email protected] for feedback on your announcement and cross-promotion.

Thank you for your contribution, and good luck! If you have any remaining milestone, let us know if you encounter any delays by leaving a comment on the application PR or submitting an amendment.

Copy link

We noticed that this is the last milestone of your project. Congratulations on completing your grant! 🎊

So, where to from here? First of all, you should join our Grants Community chat, if you haven't already, so we can stay in touch.
If you are looking for continuative support for your project, there are quite a few options. The main goal of the W3F grants program is to support research as well as early-stage technical projects. If your project still falls under one of those categories, you might want to apply for a follow-up grant. However, depending on your goals and project status, there are other support programs in our ecosystem that might be better suited as the next step. For example, projects with a Business Case/Token should look into the Substrate Builders Program or VC Funding and Common Good projects have a good chance of receiving Treasury Funding. If you are looking for guidance, the team at https://substrate.io/ecosystem/square-one/ has compiled a list of ecosystem support sources and are happy to help you navigate it.

For a more comprehensive list, see our Alternative Funding page. Let us know if you have any questions regarding the above. We are more than happy to point you to additional resources and help you determine the best course of action.
Lastly, we hope your W3F grant was a success and we want to thank you for being part of the journey!

@dudo50
Copy link
Contributor Author

dudo50 commented Nov 19, 2024

Thanks, @keeganquigley!
Your kind words regarding our work are really appreciated!

Yes, improved testing is definitely part of future work plans. So is the switch towards reserved transfers instead of transact transfers.

I will ping you once we submit the invoices (tomorrow).

With kind regards,
Dudo

@dudo50
Copy link
Contributor Author

dudo50 commented Nov 20, 2024

Hey @keeganquigley,
The DOT and FIAT invoice has been submitted. We combined the milestones together into 1 invoice for each currency. Hope that's fine.

Please let us know if everything is okay and invoices are received correctly.

Thanks!

With kind regards,
Dudo

@keeganquigley
Copy link
Contributor

Thanks @dudo50 hmm I'm not sure if that will work regarding mixing the milestone invoices together. Let me double check with the Finance team and get back to you.

@keeganquigley
Copy link
Contributor

@dudo50 ok should be good to go, thanks for checking with us!

@dudo50
Copy link
Contributor Author

dudo50 commented Nov 20, 2024

Good. Thanks for the information @keeganquigley !

With kind regards,
Dudo

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