Skip to content

Documentation on how to use the subtrate compatible finality-aleph consensus #1726

Description

@hhamud

I have read your original alephBFT API documentation but I noticed that you also have a subtrate compatible version here. I wanted to know how to integrate that component instead into a subtrate compatible node.

If this is the wrong place to ask such a question then I will delete and ask somewhere else.

Thanks in advance.

Activity

  1. ggawryal commented on May 21, 2024

    @ggawryal
    Contributor

    Hi @hhamud,

    The code in AlephBFT repo is a standalone consensus implementation for general purposes, and here we have only its integration with substrate. This integration is done in https://github.com/Cardinal-Cryptography/aleph-node/tree/r-13.3/finality-aleph.

    However, our priority was always adding new features to Aleph Zero blockchain, which may make it harder to reuse our substrate integration of our consensus for other blockchains.
    That being said, not everything used in finality-aleph is absolutely necessary to run a custom blockchain, as well as we might rely too much in some parts of the code on some specific substrate client parts (like Aura).

    Nevertheless, the integration includes, inter alia:

    • Implementing data availability for AlephBFT,
    • Handling session switches and possible AlephBFT version upgrades,
    • Implementing own block sync protocol, more tailored to AlephBFT (currently we're finishing this) - we found that the one implemented in substrate is not really consensus agnostic, as it assumes that the consensus mechanism is somewhat based on the longest chain rule, and AlephBFT inherently is not. This caused us some problems in the past.

    You can also see how the blockchain's components, and particularly finality-aleph is initialized there: https://github.com/Cardinal-Cryptography/aleph-node/blob/r-13.3/bin/node/src/service.rs.

  2. hhamud commented on May 21, 2024

    @hhamud
    Author

    Thanks for the reply. I am fine with it depending on aura for block authorship, in my case I'm mainly concerned with block finalisation.

    Could you point to where the code is for the block sync issues?

  3. ggawryal commented on May 22, 2024

    @ggawryal
    Contributor

    New sync protocol is there: https://github.com/Cardinal-Cryptography/aleph-node/tree/main/finality-aleph/src/sync.

    And you can see how it's initialized there:

    let sync_io = SyncIO::new(

  4. hhamud commented on Jun 1, 2024

    @hhamud
    Author

    You are using a forked version of the polkadot-sdk. What version is it forked from and what changes were made to it that were necessary?

  5. Marcin-Radecki commented on Jun 5, 2024

    @Marcin-Radecki
    Contributor

    Hi, aleph-node 13.3 version is based on polkadot-sdk 1.2.0. You can see all the changes to upstream branch here: paritytech/polkadot-sdk@polkadot-v1.2.0...Cardinal-Cryptography:polkadot-sdk:aleph-v1.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions