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

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

Closed
rphmeier opened this issue Apr 2, 2019 · 1 comment
Closed
Assignees
Labels
J0-enhancement An additional feature request.
Milestone

Comments

@rphmeier
Copy link
Contributor

rphmeier commented Apr 2, 2019

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.

@marcio-diaz
Copy link
Contributor

Closing in favor of better approach, see #2342 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J0-enhancement An additional feature request.
Projects
None yet
Development

No branches or pull requests

2 participants