Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/52.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Hyperledger fabric 额外的事务验证逻辑能否在订购方级别实现?_Hyperledger Fabric - Fatal编程技术网

Hyperledger fabric 额外的事务验证逻辑能否在订购方级别实现?

Hyperledger fabric 额外的事务验证逻辑能否在订购方级别实现?,hyperledger-fabric,Hyperledger Fabric,据我所知,orderer服务的功能是按照收到的订单将事务发送给对等方,并提供总订单交付和一致性的可靠性。作为一名开发人员,我可以向orderer服务添加代码,以便在向验证对等方广播数据块之前执行额外的验证检查,例如tx1应该始终位于tx2之前,或者根据事务负载执行一些验证。虽然扩展当前的ordering服务实现对我来说不是一种正确的方法,如果您想添加一个额外的验证策略,您可能会考虑使用可插入的ESCC或VSCC策略(分别认可、验证策略)的可能性。 此外,只要符合/实现交付/广播API,您就可以自

据我所知,orderer服务的功能是按照收到的订单将事务发送给对等方,并提供总订单交付和一致性的可靠性。作为一名开发人员,我可以向orderer服务添加代码,以便在向验证对等方广播数据块之前执行额外的验证检查,例如tx1应该始终位于tx2之前,或者根据事务负载执行一些验证。

虽然扩展当前的ordering服务实现对我来说不是一种正确的方法,如果您想添加一个额外的验证策略,您可能会考虑使用可插入的ESCC或VSCC策略(分别认可、验证策略)的可能性。 此外,只要符合/实现交付/广播API,您就可以自带订购服务并将其插入,而不是插入两个当前可用的选项

message BroadcastResponse {
    common.Status status = 1;
}

message SeekNewest { }

message SeekOldest { }

message SeekSpecified {
    uint64 number = 1;
}

message SeekPosition {
    oneof Type {
        SeekNewest newest = 1;
        SeekOldest oldest = 2;
        SeekSpecified specified = 3;
    }
}

// SeekInfo specifies the range of requested blocks to return
// If the start position is not found, an error is immediately returned
// Otherwise, blocks are returned until a missing block is encountered, then behavior is dictated
// by the SeekBehavior specified.  If BLOCK_UNTIL_READY is specified, the reply will block until
// the requested blocks are available, if FAIL_IF_NOT_READY is specified, the reply will return an
// error indicating that the block is not found.  To request that all blocks be returned indefinitely
// as they are created, behavior should be set to BLOCK_UNTIL_READY and the stop should be set to
// specified with a number of MAX_UINT64
message SeekInfo {
    enum SeekBehavior {
        BLOCK_UNTIL_READY = 0;
        FAIL_IF_NOT_READY = 1;
    }
    SeekPosition start = 1;    // The position to start the deliver from
    SeekPosition stop = 2;     // The position to stop the deliver
    SeekBehavior behavior = 3; // The behavior when a missing block is encountered
}

message DeliverResponse {
    oneof Type {
        common.Status status = 1;
        common.Block block = 2;
    }
}

service AtomicBroadcast {
    // broadcast receives a reply of Acknowledgement for each common.Envelope in order, indicating success or type of failure
    rpc Broadcast(stream common.Envelope) returns (stream BroadcastResponse) {}

    // deliver first requires an Envelope of type DELIVER_SEEK_INFO with Payload data as a mashaled SeekInfo message, then a stream of block replies is received.
    rpc Deliver(stream common.Envelope) returns (stream DeliverResponse) {}
}