Skip to content

Controllable block producer #792

@Mirko-von-Leipzig

Description

@Mirko-von-Leipzig

Block and batch production is currently automatic, every M seconds a batch build is triggered, and every N a block.

This makes it difficult to get the chain into a specific state since batches and blocks are somewhat random. It would be useful for integration tests, demonstrations and test tooling for builders if this was more controllable.

I propose an additional manual block-producer mode. When launched in this mode, the block-producer does not spin up batch and block producer tasks, but instead launches a server to accept commands from.

The first concrete step of this issue should be a API design, but I imagine we could start with a simple /build_batch and /build_block. Maybe we want to allow specifying number of transactions/batches to select, or even which ones to include.

It would also be ideal if the user of this API did not need to know about its specifics, and could instead use CLI to control it. This should be described in the initial design proposal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    block-producerRelated to the block producer component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions