Expand description

This module is the core of Tuxedo’s parachain support.

The types and methods defined in this crate are of equal importance to those in the tuxedo-core crate, and this crate should be considered a simple extension to that one and equally “core“y. The reason Tuxedo separates the parachain specific aspects is because Polkadot and Cumulus are quite heavy to compile, and sovereign chains are able to completely avoid it.

It’s primary jobs are to

  • Manage transient storage details for the parachain inherent, specifically the relay parent block number.
  • Provide collation information to the client side collator service.
  • Implement the validate_block function required by relay chain validators. This task is achieved through the register_validate_block! macro.

This code is inspired by, cumulus pallet parachain system https://paritytech.github.io/polkadot-sdk/master/cumulus_pallet_parachain_system/index.html

Re-exports§

  • pub use tuxedo_core;

Macros§

  • Prepares a Tuxedo runtime to be parachain compatible by doing two main tasks.

Structs§

  • A wrapper type around Cumulus’s ParachainInherentData type that can be stored. A wrapper type around Cumulus’s ParachainInherentData type. This type is convertible Into and From the inner type. This is necessary so that we can implement the UtxoData trait.

Enums§

  • A mock version of the RelayParentNumberStorage that can be used in tests without externalities.
  • A public interface for accessing and mutating the relay parent number. This is expected to be called from the parachain piece

Traits§

  • An abstraction over reading the ambiently available relay parent block number. This allows it to be mocked during tests and not require actual externalities.
  • A way for the relay chain validators to determine whether a particular parachain extrinsic is the parachain inherent and whether the parachain inherent data can be extracted from it.
  • An extension trait that allows us to implement more methods on tuxedo-core’s executive.
  • An abstraction over setting the ambiently available relay parent block number. This allows it to be mocked during tests and require actual externalities.