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

Integrate Treasury and Council Pallets with Enhanced Configuration and Benchmarking #716

Merged
merged 100 commits into from
Sep 2, 2024

Conversation

asiniscalchi
Copy link
Member

@asiniscalchi asiniscalchi commented Aug 8, 2024

PR Type

Enhancement, Configuration changes


Description

  • Integrated the Treasury and Council pallets into the runtime, providing governance capabilities.
  • Added configurations for the collective council and treasury, including parameters for proposals and spending.
  • Updated block weight and length configurations to use RuntimeBlockWeights and RuntimeBlockLength.
  • Added benchmarking for the Treasury pallet and included weights for both collective and treasury pallets.
  • Enhanced the benchmarking script with a development mode for quicker testing.

Changes walkthrough 📝

Relevant files
Enhancement
8 files
lib.rs
Update block weight and length configurations                       

primitives/src/lib.rs

  • Removed MAXIMUM_BLOCK_WEIGHT and NORMAL_DISPATCH_RATIO constants.
  • Updated imports to use parachains_common.
  • Renamed BlockLength and BlockWeights to RuntimeBlockLength and
    RuntimeBlockWeights.
  • +7/-22   
    apis.rs
    Use RuntimeBlockWeights in runtime API                                     

    runtime/laos/src/apis.rs

    • Updated to use RuntimeBlockWeights instead of BlockWeights.
    +1/-1     
    lib.rs
    Integrate Treasury and Council pallets into runtime           

    runtime/laos/src/lib.rs

  • Added migrations module.
  • Integrated Treasury and Council pallets into the runtime.
  • +6/-1     
    migrations.rs
    Add migrations module                                                                       

    runtime/laos/src/migrations.rs

    • Added a new migrations module with type alias for migrations.
    +19/-0   
    mod.rs
    Add weights for collective and treasury pallets                   

    runtime/laos/src/weights/mod.rs

    • Added pallet_collective and pallet_treasury to weights.
    +2/-0     
    pallet_collective.rs
    Add weights for pallet_collective                                               

    runtime/laos/src/weights/pallet_collective.rs

    • Added autogenerated weights for pallet_collective.
    +269/-0 
    pallet_treasury.rs
    Add weights for pallet_treasury                                                   

    runtime/laos/src/weights/pallet_treasury.rs

    • Added autogenerated weights for pallet_treasury.
    +175/-0 
    run_all_benchmarking.sh
    Add development mode to benchmarking script                           

    scripts/run_all_benchmarking.sh

    • Added development mode with different steps and repeat values.
    +19/-3   
    Tests
    1 files
    benchmarks.rs
    Include Treasury pallet in benchmarks                                       

    runtime/laos/src/benchmarks.rs

    • Added pallet_treasury to benchmarks.
    +1/-0     
    Configuration changes
    5 files
    collective_council.rs
    Add collective council configuration                                         

    runtime/laos/src/configs/collective_council.rs

  • Added configuration for collective_council.
  • Defined parameters for council motion duration, max proposals, and max
    members.
  • +35/-0   
    mod.rs
    Add collective council and treasury modules                           

    runtime/laos/src/configs/mod.rs

    • Added collective_council and treasury modules.
    +2/-0     
    system.rs
    Update system configuration for block weights and length 

    runtime/laos/src/configs/system.rs

  • Updated BlockWeights and BlockLength to use RuntimeBlockWeights and
    RuntimeBlockLength.
  • +2/-2     
    treasury.rs
    Add Treasury pallet configuration                                               

    runtime/laos/src/configs/treasury.rs

  • Added configuration for the Treasury pallet.
  • Defined parameters for proposal bonds, spend period, and treasury
    account.
  • +94/-0   
    xcm_message_queue.rs
    Update XCM message queue configuration                                     

    runtime/laos/src/configs/xcm_message_queue.rs

    • Updated to use RuntimeBlockWeights instead of BlockWeights.
    +2/-2     
    Dependencies
    1 files
    Cargo.toml
    Add dependencies for treasury and collective pallets         

    Cargo.toml

    • Added dependencies for pallet-treasury and pallet-collective.
    +2/-0     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @asiniscalchi asiniscalchi marked this pull request as draft August 8, 2024 08:00
    @asiniscalchi
    Copy link
    Member Author

    /describe

    @github-actions github-actions bot changed the title Feature/add treasury Integrate and Configure Treasury Pallet in Runtime Aug 8, 2024
    Copy link

    github-actions bot commented Aug 8, 2024

    PR Description updated to latest commit (8c7292b)

    @asiniscalchi asiniscalchi marked this pull request as ready for review August 8, 2024 11:03
    @asiniscalchi asiniscalchi linked an issue Aug 8, 2024 that may be closed by this pull request
    @luispdm
    Copy link
    Contributor

    luispdm commented Aug 29, 2024

    This has to be merged after #723

    @luispdm luispdm merged commit 9ffd116 into main Sep 2, 2024
    9 checks passed
    @luispdm luispdm deleted the feature/add_treasury branch September 2, 2024 12:00
    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.

    Add Treasury Controlled by Council Using pallet_treasury Integrate Treasury in Parachain Runtime
    3 participants