Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Utility for consensus engines to dispatch transactions to the network #2181

@rphmeier

Description

@rphmeier

Since cryptography used in consensus is often generic or in some cases (e.g. PoW) doesn't exist, it will tend to be different from the account cryptography used in a runtime.

We will need to amend the various consensus Runtime API traits to get methods such as

trait SomeConsensusApi {
    fn construct_report_call(evidence: ReportSpecificEvidence) -> Vec<u8>; // corresponds to some unsigned extrinsic or `Call` type
}

and then consensus engines should have access to some kind of trait or context that has a function

// signs and dispatches an encoded call with some pre-configured key
// perhaps via a `--reporting-key` CLI.
fn sign_and_dispatch_encoded_call(Vec<u8>) -> Result<(), Error>;

The implementation of this sign_and_dispatch_encoded_call function will vary from runtime to runtime.

Metadata

Metadata

Assignees

Labels

J0-enhancementAn additional feature request.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions