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

QuarsLab Assessment Review #3825

Open
mnaamani opened this issue Jun 2, 2022 · 2 comments
Open

QuarsLab Assessment Review #3825

mnaamani opened this issue Jun 2, 2022 · 2 comments

Comments

@mnaamani
Copy link
Member

mnaamani commented Jun 2, 2022

Some general points

  • MEDIUM_1 - update substrate and old dependencies
    Updating to newer version of substrate is certainly in the roadmap for carthage and mainnet - MEDIUM_1 v1.1: Upgrade the Joystream runtime to the latest Substrate version. #3487
    We could also bump versions of substrate dependencies with cargo-update
    Perhaps we can add cargo audit step to our CI checks - as an informative check
  • INFO_1 - #[transactional] I believe this will be available in substrate v3+ so we should certainly make use of it
  • 5.1.3 Benchmarking - We certainly have made progress here but still many pallets are incomplete.
    • Currently we have a github action that builds runtime with benchmarks features and generates weights. This happens on every PR. It takes several hours and always times out. We should re-visit this. It doesn't make sense to generate weights on every PR. Instead this should be a manual invocation that generates and checks in the newly generated weights. It should also be performed on the "reference" hardware.
  • LOW_8 - content::delete_post - extrinsic does not exist
  • INFO_8 - content::create_post - extrinsic does not exit
@Lezek123
Copy link
Contributor

Lezek123 commented Jun 2, 2022

Since I already did some research on #[transactional], I'm just going to add to this:

The #[transactional] macro is already available with our version of frame_support, the way you can use it is:

use frame_support::transactional;

// ...
        #[weight = 10_000_000]
        #[transactional]
        pub fn some_transactional_extrinsic() -> DispatchResult {
            // ...
        }

However, it seems that our version of frame_support pallet doesn't include a fix (paritytech/substrate#7301), which makes the #[transactional] work with try_do_something()?; syntax:

image

So it's quite clunky to use unless we bump frame_support to a version that includes the fix.

It's worth noting that #[transactional] was recently made a default behavior for all extrinsics in substrate:
paritytech/substrate#11431

@bedeho
Copy link
Member

bedeho commented Jun 2, 2022

Related: #3827

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

No branches or pull requests

3 participants