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

Pocs milestone1 #1111

Merged
merged 5 commits into from
Jan 30, 2024
Merged

Pocs milestone1 #1111

merged 5 commits into from
Jan 30, 2024

Conversation

Purva-Chaudhari
Copy link
Contributor

@Purva-Chaudhari Purva-Chaudhari commented Jan 21, 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, an invoice must be submitted and the payment will be transferred to the Polkadot/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#2066

@keeganquigley keeganquigley self-assigned this Jan 24, 2024
@keeganquigley
Copy link
Contributor

Thanks for the delivery @Purva-Chaudhari I started my evaluation, and currently I am unable to get it to compile on both Ubuntu and my Mac. Can you look into it? It fails with the following errors:

error[E0449]: visibility qualifiers are not permitted here
    --> pallets/contracts/src/lib.rs:1254:3
     |
1254 |         environmental!(executing_contract: bool);
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: trait items always share the visibility of their trait
     = note: this error originates in the macro `environmental` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: unused imports: `CallFlags`, `ReturnCode`
  --> pallets/contracts/src/wasm/mod.rs:31:52
   |
31 |     AllowDeprecatedInterface, AllowUnstableInterface, CallFlags, Environment, ReturnCode, Runtime,
   |                                                       ^^^^^^^^^               ^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

warning: unused import: `Saturating`
  --> pallets/contracts/src/gasstakeinfo.rs:22:11
   |
22 |     traits::{Saturating},
   |              ^^^^^^^^^^

warning: unused import: `Config`
   --> pallets/contracts/src/lib.rs:130:22
    |
130 | use pallet_staking::{Config as StakingCon};
    |                      ^^^^^^

For more information about this error, try `rustc --explain E0449`.
warning: `pallet-contracts` (lib) generated 3 warnings
error: could not compile `pallet-contracts` (lib) due to 3 previous errors; 3 warnings emitted
Verbose output
Caused by:
  process didn't exit successfully: `/Users/keeganquigley/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/rustc --crate-name pallet_contracts --edition=2021 pallets/contracts/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=122 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked --cfg 'feature="default"' --cfg 'feature="rand"' --cfg 'feature="serde"' --cfg 'feature="std"' --cfg 'feature="wasm-instrument"' -C metadata=e19402a82d40381e -C extra-filename=-e19402a82d40381e --out-dir /Users/keeganquigley/pocs/target/debug/deps -C incremental=/Users/keeganquigley/pocs/target/debug/incremental -L dependency=/Users/keeganquigley/pocs/target/debug/deps --extern bitflags=/Users/keeganquigley/pocs/target/debug/deps/libbitflags-836e35251ffc9d73.rmeta --extern environmental=/Users/keeganquigley/pocs/target/debug/deps/libenvironmental-4e38eb79678a08e1.rmeta --extern frame_election_provider_support=/Users/keeganquigley/pocs/target/debug/deps/libframe_election_provider_support-26800c9dd0f95658.rmeta --extern frame_support=/Users/keeganquigley/pocs/target/debug/deps/libframe_support-0fe2d467bbfb8a00.rmeta --extern frame_system=/Users/keeganquigley/pocs/target/debug/deps/libframe_system-959f6a98ff00be6b.rmeta --extern impl_trait_for_tuples=/Users/keeganquigley/pocs/target/debug/deps/libimpl_trait_for_tuples-ed7f1e12c7e1cd7b.dylib --extern log=/Users/keeganquigley/pocs/target/debug/deps/liblog-d297b84eda71b3aa.rmeta --extern pallet_contracts_primitives=/Users/keeganquigley/pocs/target/debug/deps/libpallet_contracts_primitives-ec6fa8222f0b66f2.rmeta --extern pallet_contracts_proc_macro=/Users/keeganquigley/pocs/target/debug/deps/libpallet_contracts_proc_macro-c2969e906b772a93.dylib --extern pallet_session=/Users/keeganquigley/pocs/target/debug/deps/libpallet_session-0bf7f021e97f99cf.rmeta --extern pallet_staking=/Users/keeganquigley/pocs/target/debug/deps/libpallet_staking-a65d07d996c38b2a.rmeta --extern codec=/Users/keeganquigley/pocs/target/debug/deps/libparity_scale_codec-0c277898eb8b23c9.rmeta --extern rand=/Users/keeganquigley/pocs/target/debug/deps/librand-e0c37ac1d84a2bb6.rmeta --extern scale_info=/Users/keeganquigley/pocs/target/debug/deps/libscale_info-c13d800dab6edf7b.rmeta --extern serde=/Users/keeganquigley/pocs/target/debug/deps/libserde-b5e699d6984c89fd.rmeta --extern smallvec=/Users/keeganquigley/pocs/target/debug/deps/libsmallvec-4af0b788c7760341.rmeta --extern sp_api=/Users/keeganquigley/pocs/target/debug/deps/libsp_api-ec8aa352d24af295.rmeta --extern sp_core=/Users/keeganquigley/pocs/target/debug/deps/libsp_core-cb15ca1b91329c0f.rmeta --extern sp_io=/Users/keeganquigley/pocs/target/debug/deps/libsp_io-8ea4f31ac6d02728.rmeta --extern sp_runtime=/Users/keeganquigley/pocs/target/debug/deps/libsp_runtime-1b665a44366910ff.rmeta --extern sp_session=/Users/keeganquigley/pocs/target/debug/deps/libsp_session-ea4aede5cdd78ea3.rmeta --extern sp_staking=/Users/keeganquigley/pocs/target/debug/deps/libsp_staking-b33655e66f61c4e5.rmeta --extern sp_std=/Users/keeganquigley/pocs/target/debug/deps/libsp_std-9cd6f9a7ddd7e020.rmeta --extern wasm_instrument=/Users/keeganquigley/pocs/target/debug/deps/libwasm_instrument-55a004652bc81373.rmeta --extern wasmi=/Users/keeganquigley/pocs/target/debug/deps/libwasmi-096468da6559283b.rmeta -L native=/Users/keeganquigley/pocs/target/debug/build/secp256k1-sys-055feda4dfbd2f93/out -L native=/Users/keeganquigley/pocs/target/debug/build/psm-25c6262a8c6fa4d1/out -L native=/Users/keeganquigley/pocs/target/debug/build/zstd-sys-e660d8e5b052d3fb/out -L native=/Users/keeganquigley/pocs/target/debug/build/wasmtime-runtime-2b546d4ba449dc1e/out` (exit status: 1)
warning: build failed, waiting for other jobs to finish

Here are my toolchains:

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu

installed targets for active toolchain
--------------------------------------

wasm32-unknown-unknown
x86_64-unknown-linux-gnu

active toolchain
----------------

nightly-x86_64-unknown-linux-gnu (overridden by +toolchain on the command line)
rustc 1.77.0-nightly (5bd5d214e 2024-01-25)

@keeganquigley
Copy link
Contributor

keeganquigley commented Jan 26, 2024

I am also not seeing any instructions for the Docker Compose file. If I can get it running with Docker that will work too.

@Purva-Chaudhari
Copy link
Contributor Author

Purva-Chaudhari commented Jan 26, 2024

Hi @keeganquigley sorry I forgot to mention rust nightly version .
Nightly-2023-12-21
(Nightly should be < 24)

The polkadot contracts pallet doesn't compile with recent nightly.

About docker the command is
docker-compose up --build -d However you will have to compile it before running docker , cause it added use cache for convenience.
The docker however runs out of space. If there are some references to optimize build for docker please let us know .

@Purva-Chaudhari
Copy link
Contributor Author

@keeganquigley , have added more instructions in readme if needed

@keeganquigley
Copy link
Contributor

Thanks @Purva-Chaudhari much appreciated. Here is my ongoing evaluation. The Docker compose command is failing but I think this shouldn't be an issue because since I can launch the node with just the Dockerfile/manually. Everything is compiling now, so I will continue on and manually test out the pallet functions.

Copy link
Contributor

@keeganquigley keeganquigley left a comment

Choose a reason for hiding this comment

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

Also, how can I run the benchmarking tests? I'm getting a workspace error when running cargo test --package pallet-balances --features runtime-benchmarks

@Purva-Chaudhari
Copy link
Contributor Author

Purva-Chaudhari commented Jan 29, 2024

@keeganquigley we haven't added any dependency pallet of pallet-contract for benchmarking. pallet-balances is dependency of pallet-contracts which we have added , do we want to run tests for pallet-balances too? its not in workspace obviously as it is second dependency.

Additionally for pallet-contract https://github.com/auguth/pocs/blob/master/tests/test.json we have made a list of passing and failing tests. The failing tests have been failing without our addition, can be tested on commit bba42edd6133b7080121c4bd968aeccfa30c954a where we just externally added pallet contract folder from version v1.0.0 and did not make any change. I think they might need some flag enabled. Was looking to reach out to someone from pallet-contract to know how to make all tests to pass.

@Purva-Chaudhari
Copy link
Contributor Author

@keeganquigley Docker should work now , some minor updates have been made. If you have mac, you might have to increase the memory limit.

We have added some notes on benchmark too

Thanks

@keeganquigley
Copy link
Contributor

Thanks for the fixes @Purva-Chaudhari everything is working now. Understood regarding the benchmarking and no worries on the tests. I've completed my evaluation and am happy to pass the milestone. Good luck on the next one!

@keeganquigley
Copy link
Contributor

UPDATE: Edited document to fix parsing.

@keeganquigley keeganquigley merged commit 4472f0b into w3f:master Jan 30, 2024
2 of 3 checks passed
Copy link

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

@RouvenP
Copy link

RouvenP commented Feb 16, 2024

hi @Purva-Chaudhari it seems we have not yet received your invoice - is that correct?

@Purva-Chaudhari
Copy link
Contributor Author

Yes, there has been some logistical changes from our end and the account to change is setting up. So we plan to submit it with milestone 2 or earlier if possible.

Sorry for the inconvenience.

@RouvenP
Copy link

RouvenP commented Feb 19, 2024

No worries, there's no time pressure on our end. I just wanted to make sure we didn't miss anything.

@jobyreuben jobyreuben mentioned this pull request Mar 6, 2024
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