[][src]Trait exonum_supervisor::SupervisorInterface

pub trait SupervisorInterface {
    fn request_artifact_deploy(
        &self,
        context: CallContext,
        artifact: DeployRequest
    ) -> Result<(), ExecutionError>;
fn confirm_artifact_deploy(
        &self,
        context: CallContext,
        artifact: DeployConfirmation
    ) -> Result<(), ExecutionError>;
fn propose_config_change(
        &self,
        context: CallContext,
        propose: ConfigPropose
    ) -> Result<(), ExecutionError>;
fn confirm_config_change(
        &self,
        context: CallContext,
        vote: ConfigVote
    ) -> Result<(), ExecutionError>; }

Supervisor service transactions.

Required methods

fn request_artifact_deploy(
    &self,
    context: CallContext,
    artifact: DeployRequest
) -> Result<(), ExecutionError>

Requests artifact deploy.

This request should be initiated by the validator (and depending on the Supervisor mode several other actions can be required, e.g. sending the same request by majority of other validators as well). After that, the supervisor will try to deploy the artifact, and if this procedure will be successful it will send confirm_artifact_deploy transaction.

fn confirm_artifact_deploy(
    &self,
    context: CallContext,
    artifact: DeployConfirmation
) -> Result<(), ExecutionError>

Confirmation that the artifact was successfully deployed by the validator.

The artifact is registered in the dispatcher if all validators send this confirmation. This confirmation is sent automatically by the node if the deploy succeeds.

fn propose_config_change(
    &self,
    context: CallContext,
    propose: ConfigPropose
) -> Result<(), ExecutionError>

Propose config change

This request should be sent by one of validators as the proposition to change current configuration to new one. All another validators are able to vote for this configuration by sending confirm_config_change transaction. The configuration application rules depend on the Supervisor mode, e.g. confirmations are not required for the Simple mode, and for Decentralized mode (2/3+1) confirmations are required. Note: only one proposal at time is possible.

fn confirm_config_change(
    &self,
    context: CallContext,
    vote: ConfigVote
) -> Result<(), ExecutionError>

Confirm config change

This confirm should be sent by validators to vote for proposed configuration. Vote of the author of the propose_config_change transaction is taken into account automatically. The configuration application rules depend on the Supervisor mode.

Loading content...

Trait Implementations

impl Transaction<dyn SupervisorInterface + 'static> for DeployRequest[src]

impl Transaction<dyn SupervisorInterface + 'static> for DeployConfirmation[src]

impl Transaction<dyn SupervisorInterface + 'static> for ConfigPropose[src]

impl Transaction<dyn SupervisorInterface + 'static> for ConfigVote[src]

impl Interface for dyn SupervisorInterface[src]

Implementors

impl<Mode> SupervisorInterface for Supervisor<Mode> where
    Mode: SupervisorMode
[src]

Loading content...