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

Enhance node service and runtime configurations for relay chain compatibility #853

Open
wants to merge 31 commits into
base: main
Choose a base branch
from

Conversation

asiniscalchi
Copy link
Member

@asiniscalchi asiniscalchi commented Oct 24, 2024

PR Type

enhancement, configuration changes


Description

  • Updated node service to handle relay chain slot and parachain inherent data, improving compatibility with relay chains.
  • Defined MAXIMUM_BLOCK_WEIGHT with updated weight calculations and adjusted related tests.
  • Enabled multiple blocks per slot in Aura configuration and updated relay number check in parachain system configuration.
  • Adjusted timestamp configuration by setting MinimumPeriod to 0 and reduced MILLISECS_PER_BLOCK to 6000.
  • Added new dependencies for parachain inherent and relay sproof modules in Cargo.toml files.

Changes walkthrough 📝

Relevant files
Enhancement
2 files
service.rs
Update node service for relay chain slot and parachain data

node/src/service.rs

  • Added imports for Slot and SlotDuration.
  • Modified the logic for calculating the relay chain slot and parachain
    inherent data.
  • Removed the calculation of slot_duration and target_gas_price.
  • +28/-10 
    lib.rs
    Define maximum block weight and update tests                         

    primitives/src/lib.rs

  • Added MAXIMUM_BLOCK_WEIGHT constant with new weight calculations.
  • Updated test assertions for block weights.
  • +14/-8   
    Configuration changes
    4 files
    aura.rs
    Enable multiple blocks per slot in Aura configuration       

    runtime/laos/src/configs/aura.rs

    • Changed AllowMultipleBlocksPerSlot parameter to true.
    +1/-1     
    cumulus_parachain_system.rs
    Update relay number check in parachain system configuration

    runtime/laos/src/configs/cumulus_parachain_system.rs

  • Updated CheckAssociatedRelayNumber to use
    RelayNumberMonotonicallyIncreases.
  • +2/-1     
    timestamp.rs
    Adjust timestamp configuration minimum period                       

    runtime/laos/src/configs/timestamp.rs

    • Set MinimumPeriod parameter to 0.
    +2/-2     
    lib.rs
    Reduce milliseconds per block for runtime                               

    runtime/laos/src/lib.rs

    • Changed MILLISECS_PER_BLOCK from 12000 to 6000.
    +1/-1     
    Documentation
    1 files
    download_polkadot.sh
    Update download directory comment in script                           

    zombienet/download_polkadot.sh

    • Updated default download directory comment.
    +1/-1     
    Dependencies
    2 files
    Cargo.toml
    Add new dependencies for parachain inherent and relay sproof

    Cargo.toml

  • Added new dependencies for cumulus-primitives-parachain-inherent and
    cumulus-test-relay-sproof-builder.
  • +3/-0     
    Cargo.toml
    Add workspace dependencies for relay chain and parachain 

    node/Cargo.toml

  • Added workspace dependencies for relay chain and parachain inherent
    modules.
  • +3/-0     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    @asiniscalchi
    Copy link
    Member Author

    /describe

    @github-actions github-actions bot changed the title Feature/active async backing Enhance node service and runtime configurations for relay chain compatibility Oct 24, 2024
    Copy link

    PR Description updated to latest commit (6b0b60a)

    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.

    2 participants