Skip to content

Conversation

@fairax
Copy link
Contributor

@fairax fairax commented Oct 6, 2025

No description provided.

@fairax fairax self-assigned this Oct 6, 2025
type CheckAssociatedRelayNumber = pallet_configuration::CheckAssociatedRelayNumber<Self>;
type ConsensusHook = ConsensusHookWrapper;
type SelectCore = cumulus_pallet_parachain_system::DefaultCoreSelector<Runtime>;
type RelayParentOffset = ConstU32<0>;
Copy link
Member

Choose a reason for hiding this comment

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

Это что-то для async-backing на стороне реле?..

The offset between the tip of the relay chain and the parent relay block used as parent when authoring a parachain block.

This setting directly impacts the number of descendant headers that are expected in the set_validation_data inherent.

For any setting N larger than zero, the inherent expects that the inherent includes the relay parent plus N descendants. These headers are required to validate that new parachain blocks are authored at the correct offset.

While this helps to reduce forks on the parachain side, it increases the delay for processing XCM messages. So, the value should be chosen wisely.

If set to 0, this config has no impact.

В cumulus yet-another-parachain стоит

/// Build with an offset of 1 behind the relay chain.
const RELAY_PARENT_OFFSET: u32 = 1;

Copy link
Member

Choose a reason for hiding this comment

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

А, стоп, это для elastic scaling:

https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/guides/enable_elastic_scaling/index.html#enable-the-relay-parent-offset-feature

Понять бы смысл, возможно нам стоит это включить на случай появления elastic scaling на реле?

Cc: @mrshiposha (Вроде он что-то про elastic-scaling слышал, я пока не особо читал как оно должно работать)

Copy link
Member

Choose a reason for hiding this comment

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

А это нам полезно по идее, это не от elastic scaling, а просто как новая опция async-backing

async-backing позволяет парачейну производить блоки позже, используя старые блоки реле

Если нам не так сильно нужна скорость XCM, то можно поставить offset чтобы парачейну нужно было реже свои форки делать, в тестах они у нас очень часто происходят

https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/guides/handling_parachain_forks/index.html

.saturating_add(T::DbWeight::get().writes(1_u64))
}

fn weigh_message() -> Weight {
Copy link
Member

Choose a reason for hiding this comment

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

У нас есть какой-то бенчмарк для этого? Я не очень понимаю откуда эти веса вообще берутся и зачем нужны

Cc: @mrshiposha

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Да, он находится в polkadot-sdk

@CertainLach CertainLach force-pushed the unique-polkadot-2509 branch from 9a8ded6 to 5cbd516 Compare October 7, 2025 14:05
@CertainLach CertainLach merged commit 5cbd516 into develop Oct 7, 2025
10 of 15 checks passed
@CertainLach CertainLach deleted the unique-polkadot-2509 branch October 7, 2025 20:24
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