{"id":304571,"date":"2020-05-31T15:00:24","date_gmt":"2020-05-31T15:00:24","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=304571"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=304571","title":{"rendered":"Fabex \u2014 block explorer \u0434\u043b\u044f Hyperledger Fabric"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/501422\/\">\u041f\u0440\u0438\u0432\u0435\u0442, \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/github.com\/hyperledger-labs\/fabex\" rel=\"nofollow\">Fabex<\/a> \u2014 block explorer \u0434\u043b\u044f Hyperledger Fabric, \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0439 \u0432 Hyperledger Labs \u0438 \u0438\u043c\u0435\u044e\u0449\u0438\u0439 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043a\u0441\u043f\u043b\u043e\u0440\u0435\u0440\u0430. \u041f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0430 Golang (\u0430 \u043d\u0435 \u043d\u0430 Nodejs, \u043a\u0430\u043a \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439), \u0445\u0440\u0430\u043d\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435 \u0432 MongoDB \u0438\u043b\u0438 Cassandra \u043f\u043e \u0432\u044b\u0431\u043e\u0440\u0443 (\u0430 \u043d\u0435 \u0432 PostgresSQL, \u043a\u0430\u043a \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439), \u0438\u043c\u0435\u0435\u0442 \u043a\u0430\u043a GRPC, \u0442\u0430\u043a \u0438 REST API. E\u0433\u043e \u043b\u0435\u0433\u043a\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430. \u0414\u0435\u0442\u0430\u043b\u0438 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sa\/vu\/j7\/savuj7dp8qj0wjptdgxod-txb-k.png\"><\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<p>  <i>\u0414\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440<br \/>  \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044f \u043b\u0435\u0434\u0436\u0435\u0440 \u0441 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430\u043c\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0420\u0420\u0414 \u041a\u041f, \u043d\u043e \u0432\u043e\u043a\u0440\u0443\u0433 \u043d\u0435\u0433\u043e \u043d\u0435\u0442 \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438 \u0438 \u043c\u0435\u0441\u0442\u0430\u043c\u0438 \u043e\u043d \u0441\u044b\u0440\u043e\u0432\u0430\u0442. \u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430 \u0441 HLF 2.0. \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u044c\u0441\u044f \u043a \u044d\u0442\u043e\u043c\u0443 \u043a\u0430\u043a \u043a \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0432 \u0440\u0430\u043d\u043d\u0435\u0439 \u0441\u0442\u0430\u0434\u0438\u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f.<\/p>\n<p>  \u042f \u0445\u043e\u0447\u0443 \u043f\u0440\u0438\u0432\u043b\u0435\u0447\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0438 \u0434\u0430\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043b\u0438\u0446. Fabex \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u0445 \u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u0435\u0440\u0430\u0445.<br \/>  <\/i><\/p>\n<h3>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 block explorer \u0438 \u0437\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d Fabex<\/h3>\n<p>   \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 block explorer \u2014 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c, \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0431\u043b\u043e\u043a\u0438 \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u043d\u0438\u0445 \u043d\u0443\u0436\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. <br \/>  \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0431\u043b\u043e\u043a\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0430 <a href=\"http:\/\/www.bchainledger.com\/2017\/04\/hyperledger-fabric-v10-block-structure.html\" rel=\"nofollow\">\u0432 \u0431\u043b\u043e\u0433\u0435 \u0443 Senthil Nathan<\/a>. \u041a\u0430\u0436\u0434\u0430\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 Fabex \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0438 \u0431\u043b\u043e\u043a\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0430\u043d\u043d\u0430\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043f\u043e\u043f\u0430\u043b\u0430:<\/p>\n<pre><code class=\"go\">type Tx struct {     ChannelId      string      Txid           string      Hash           string     PreviousHash   string      Blocknum       uint64      Payload        string     ValidationCode int32      Time           int64  } <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043d\u0435 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u043e \u043b\u0438\u0448\u044c \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u043a\u0430\u0436\u0443\u0442\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c\u0438. <b>Txid<\/b> \u0438 <b>Payload<\/b> \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, ID \u0438 write set \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438. \u0418\u043c\u0435\u043d\u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u0441\u0430\u043c\u0438 \u0437\u0430 \u0441\u0435\u0431\u044f \u0438 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u0431\u043b\u043e\u043a\u0443, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f, \u043d\u043e \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 <b>ValidationCode<\/b> \u2014 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u043d\u044b\u0439 \u0432 int32 \u043a\u043e\u0434 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438, \u0438\u043b\u0438, \u0438\u043d\u0430\u0447\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u0441\u0442\u0430\u0442\u0443\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0438\u0440 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438. \u041e\u0442 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442, \u043f\u043e\u0432\u043b\u0438\u044f\u0435\u0442 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043d\u0430 world state \u0438\u043b\u0438 \u043d\u0435\u0442 (\u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u043e\u043d\u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u0430, \u043d\u043e \u0438 <i>\u0443\u0447\u0442\u0435\u043d\u0430<\/i> \u0432 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435). \u041f\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0441\u0447\u0435\u0442\u0443, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u043b\u044e\u0431\u043e\u0435 \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <b>ValidationCode<\/b> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u0430, \u043d\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u0441 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0435\u0439, \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f:<\/p>\n<pre><code class=\"go\">\t&quot;VALID&quot;:                        0, \t&quot;NIL_ENVELOPE&quot;:                 1, \t&quot;BAD_PAYLOAD&quot;:                  2, \t&quot;BAD_COMMON_HEADER&quot;:            3, \t&quot;BAD_CREATOR_SIGNATURE&quot;:        4, \t&quot;INVALID_ENDORSER_TRANSACTION&quot;: 5, \t&quot;INVALID_CONFIG_TRANSACTION&quot;:   6, \t&quot;UNSUPPORTED_TX_PAYLOAD&quot;:       7, \t&quot;BAD_PROPOSAL_TXID&quot;:            8, \t&quot;DUPLICATE_TXID&quot;:               9, \t&quot;ENDORSEMENT_POLICY_FAILURE&quot;:   10, \t&quot;MVCC_READ_CONFLICT&quot;:           11, \t&quot;PHANTOM_READ_CONFLICT&quot;:        12, \t&quot;UNKNOWN_TX_TYPE&quot;:              13, \t&quot;TARGET_CHAIN_NOT_FOUND&quot;:       14, \t&quot;MARSHAL_TX_ERROR&quot;:             15, \t&quot;NIL_TXACTION&quot;:                 16, \t&quot;EXPIRED_CHAINCODE&quot;:            17, \t&quot;CHAINCODE_VERSION_CONFLICT&quot;:   18, \t&quot;BAD_HEADER_EXTENSION&quot;:         19, \t&quot;BAD_CHANNEL_HEADER&quot;:           20, \t&quot;BAD_RESPONSE_PAYLOAD&quot;:         21, \t&quot;BAD_RWSET&quot;:                    22, \t&quot;ILLEGAL_WRITESET&quot;:             23, \t&quot;INVALID_WRITESET&quot;:             24, \t&quot;NOT_VALIDATED&quot;:                254, \t&quot;INVALID_OTHER_REASON&quot;:         255\t <\/code><\/pre>\n<p>  Fabex \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441 \u043f\u0438\u0440\u0430 \u0445\u0435\u0448 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430, \u0438\u0449\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u0431\u043b\u043e\u043a \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u043d\u0435\u0442, \u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0431\u043b\u043e\u043a \u0432 \u0431\u0430\u0437\u0435 \u0438 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0441 \u043f\u0438\u0440\u0430 \u0431\u043b\u043e\u043a\u0438 \u043f\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0432\u0443\u044e\u0449\u0435\u043c\u0443 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0443. \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432. \u0411\u0430\u0437\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u0441\u0451 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f, \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<h3>Cassandra \u0438\u043b\u0438 MongoDB \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430<\/h3>\n<p>  \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e Fabex \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b PostgresSQL \u0438 MongoDB, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u043e\u0434\u043d\u0438 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. \u0417\u0430\u0442\u0435\u043c \u044f \u0441\u0442\u0430\u043b \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435, \u043d\u043e \u043d\u0435 in-memory, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0431\u043b\u043e\u043a\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. \u0412 \u0438\u0442\u043e\u0433\u0435 <a href=\"https:\/\/www.sciencedirect.com\/science\/article\/pii\/S1319157816300453\" rel=\"nofollow\">\u043e\u0434\u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044f<\/a> \u0443\u0431\u0435\u0434\u0438\u043b\u0430 \u043c\u0435\u043d\u044f, \u0447\u0442\u043e Cassandra \u2014 \u044d\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e: \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435, (\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e) \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f. <\/p>\n<p>  \u041a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u0430\u044f (\u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0433\u0438\u0431\u0440\u0438\u0434\u043d\u0430\u044f \u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f kv) Cassandra \u0447\u0438\u0442\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e, \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u043e\u0439 \u0441 Redis:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vq\/d_\/yo\/vqd_yo2mewketv4jb80wmeyrres.png\"><br \/>  <i><a href=\"https:\/\/www.sciencedirect.com\/science\/article\/pii\/S1319157816300453\" rel=\"nofollow\">www.sciencedirect.com\/science\/article\/pii\/S1319157816300453<\/a><\/i><\/p>\n<p>  \u041d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0443\u043b\u0435\u0432\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/lu\/8v\/6f\/lu8v6farpzhahscpbzqnufjq67c.png\"><br \/>  <i><a href=\"https:\/\/www.sciencedirect.com\/science\/article\/pii\/S1319157816300453\" rel=\"nofollow\">www.sciencedirect.com\/science\/article\/pii\/S1319157816300453<\/a><\/i><\/p>\n<p>  \u041d\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e Cassandra \u2014 \u043e\u0447\u0435\u043d\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u0438 \u0435\u0441\u043b\u0438 \u0432\u044b \u0442\u043e\u0447\u043d\u043e \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 (\u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/www.youtube.com\/watch?v=SAyClLjN6Sk\" rel=\"nofollow\">\u044d\u0442\u043e\u0442 \u0434\u043e\u043a\u043b\u0430\u0434<\/a> \u0434\u043b\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f), \u043b\u0443\u0447\u0448\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f MongoDB. \u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 Fabex:<br \/>  <code>.\/fabex -configpath=configs -db=<b>mongo<\/b><br \/>  .\/fabex -configpath=configs -db=<b>cassandra<\/b><br \/>  <\/code><\/p>\n<p>  PostgresSQL \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0443\u0431\u0440\u0430\u0442\u044c \u0432\u0432\u0438\u0434\u0443 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0442\u0440\u0435\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0439 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430. \u041d\u043e \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0438\u0434\u0435\u0438, \u043a\u0430\u043a\u043e\u0435 \u0435\u0449\u0451 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e, \u043d\u0443\u0436\u043d\u043e \u043b\u0438\u0448\u044c \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441:<\/p>\n<pre><code class=\"go\">type Manager interface {     Connect() error     Insert(tx Tx) error     QueryBlockByHash(hash string) ([]Tx, error)     GetByTxId(txid string) ([]Tx, error)     GetByBlocknum(blocknum uint64) ([]Tx, error)     GetBlockInfoByPayload(payload string) ([]Tx, error)     QueryAll() ([]Tx, error)     GetLastEntry() (Tx, error) } <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441<\/h3>\n<p>  Fabex \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0441\u044f \u043a\u0430\u043a \u0441\u0435\u0440\u0432\u0438\u0441, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u043b\u044e\u0431\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435. \u041e\u043d \u043d\u0435 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0432\u043e\u0451 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432 CouchDB, \u0445\u043e\u0442\u044f \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u0440\u043e\u0449\u0435, \u0430 \u0445\u0440\u0430\u043d\u0438\u0442 \u0435\u0433\u043e \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e. \u041e\u043d \u043d\u0435 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0431\u044b\u0442\u044c UI dashboard&#8217;\u043e\u043c \u0441 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u043c\u0438, \u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u044f\u0441\u043d\u043e\u0435 GRPC API (\u0430 \u0442\u0430\u043a\u0436\u0435 REST API \u0438 CLI), \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0449\u0435\u0435 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430 \u0442\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e. \u041d\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0439 UI \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f. <\/p>\n<p>  GRPC API \u043f\u043e\u043a\u0430 (\u0438, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0431\u0443\u0434\u0435\u0442) \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 <a href=\"https:\/\/github.com\/hyperledger-labs\/fabex\/blob\/master\/proto\/fabex.proto\" rel=\"nofollow\">fabex.proto<\/a>:<\/p>\n<pre><code class=\"go\">service Fabex {     rpc Explore(RequestRange) returns (stream Entry);     rpc Get(Entry) returns (stream Entry); } <\/code><\/pre>\n<p>  <b>rpc Explore<\/b> \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0438\u0437 \u0431\u043b\u043e\u043a\u043e\u0432 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 <i>RequestRange<\/i> \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 stream \u0441 \u044d\u0442\u0438\u043c\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u043c\u0438. <\/p>\n<p>  <b>rpc Get<\/b> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0411\u0414 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439, \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0449\u0438\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c (\u043d\u043e\u043c\u0435\u0440 \u0431\u043b\u043e\u043a\u0430, ID \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, \u043a\u043b\u044e\u0447 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438).<\/p>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e GRPC-\u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043b\u0438\u0431\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u0438\u0437 \u043f\u0430\u043a\u0435\u0442\u0430 <i>github.com\/hyperledger-labs\/fabex\/client<\/i>.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0438\u0437 \u0431\u043b\u043e\u043a\u043e\u0432 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u0441 10 \u043f\u043e 15 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e:  <\/p>\n<pre><code class=\"go\">txs, err := client.Explore(1, 15) <\/code><\/pre>\n<p>  \u0410 \u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0444\u0438\u043b\u044c\u0440\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b:<\/p>\n<p>   \u2014 \u0444\u0438\u043b\u044c\u0442\u0440 \u043f\u043e ID \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438:  <\/p>\n<pre><code class=\"go\">txs, err := client.Get(&amp;pb.Entry{Txid:&quot;x&quot;}) <\/code><\/pre>\n<p>   \u2014 \u0444\u0438\u043b\u044c\u0442\u0440 \u043f\u043e \u043d\u043e\u043c\u0435\u0440\u0443 \u0431\u043b\u043e\u043a\u0430:  <\/p>\n<pre><code class=\"go\">txs, err := client.Get(&amp;pb.Entry{Blocknum:42}) <\/code><\/pre>\n<p>   \u2014 \u043f\u043e \u043a\u043b\u044e\u0447\u044e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438:  <\/p>\n<pre><code class=\"go\">txs, err := client.Get(&amp;pb.Entry{Payload:&quot;mykey&quot;}) <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043f\u043e \u0431\u043b\u043e\u043a\u0430\u043c, \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f helper&#8217;\u043e\u043c <i>PackTxsToBlocks<\/i>:  <\/p>\n<pre><code class=\"go\">blocks, err := helpers.PackTxsToBlocks(txs) <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e GRPC-\u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/github.com\/hyperledger-labs\/fabex\/blob\/master\/client\/example\/client.go\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  \u0414\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u0430\u043a\u0436\u0435 <a href=\"https:\/\/github.com\/hyperledger-labs\/fabex\/blob\/master\/rest\/router.go\" rel=\"nofollow\">REST API<\/a>.<\/p>\n<p>  <\/p>\n<h3>\u041a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0442\u044c<\/h3>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c fabex, \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u043c\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438:<br \/>  <code>make mongo-test<\/code> \u2014 \u0437\u0430\u043f\u0443\u0441\u043a \u0431\u0430\u0437\u044b<br \/>  <code>make fabric-test<\/code> \u2014 \u0437\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0435\u0442\u0438<br \/>  <code>make fabex-test<\/code> \u2014 \u0437\u0430\u043f\u0443\u0441\u043a fabex<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u0432\u0430\u0441 \u043f\u043e\u0434\u043d\u044f\u0442\u0430 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 MongoDB), \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0441\u0435\u0442\u044c Fabric \u0438 Fabex. \u041c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0442\u044c\/\u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0432 <a href=\"https:\/\/github.com\/hyperledger-labs\/fabex\/blob\/master\/client\/client.go\" rel=\"nofollow\">client.go<\/a> \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 Fabex.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 HabrCar (<i>make fabric-test<\/i> \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0441\u0435\u0442\u043a\u0443 \u0441 \u0447\u0435\u0439\u043d\u043a\u043e\u0434\u043e\u043c fabcar):<\/p>\n<p>  <code>docker exec cli peer chaincode invoke -o orderer.example.com:7050 -C mychannel -n fabcar -c '{&quot;Args&quot;:[&quot;createCar&quot;, &quot;car0&quot;, &quot;HabraCar&quot;, &quot;V8&quot;, &quot;black&quot;, &quot;Habr&quot;]}' --waitForEvent --tls --cafile \/opt\/gopath\/src\/github.com\/hyperledger\/fabric\/peer\/crypto\/ordererOrganizations\/example.com\/orderers\/orderer.example.com\/msp\/tlscacerts\/tlsca.example.com-cert.pem --peerAddresses peer0.org1.example.com:7051 --peerAddresses peer0.org2.example.com:9051 --tlsRootCertFiles \/opt\/gopath\/src\/github.com\/hyperledger\/fabric\/peer\/crypto\/peerOrganizations\/org1.example.com\/peers\/peer0.org1.example.com\/tls\/ca.crt --tlsRootCertFiles \/opt\/gopath\/src\/github.com\/hyperledger\/fabric\/peer\/crypto\/peerOrganizations\/org2.example.com\/peers\/peer0.org2.example.com\/tls\/ca.crt <\/code><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c <i>client\/example\/client.go<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442 \u043f\u044f\u0442\u044b\u0439 \u0431\u043b\u043e\u043a:<\/p>\n<pre><code class=\"go\">go run client\/example\/client.go<\/code><\/pre>\n<p>  \u0412\u044b\u0432\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u0438\u043c:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ch\/lq\/xb\/chlqxbwzplswdwy5ylnulmp10e4.png\"><\/p>\n<p>  \u041f\u043e\u0447\u0435\u043c\u0443 \u043c\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043b\u0438 5 \u0431\u043b\u043e\u043a? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0435 \u0447\u0435\u0442\u044b\u0440\u0435 \u043d\u0435\u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b \u0438 \u043d\u0435\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u044b: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u0430\u043d\u0430\u043b\u0430, \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0430\u043d\u0447\u043e\u0440\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438, \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0430\u043d\u0447\u043e\u0440\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043e\u0434\u043d\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u0430\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u043f\u0440\u0438 \u043f\u043e\u0434\u043d\u044f\u0442\u0438\u0438 \u0441\u0435\u0442\u0438 \u0434\u043b\u044f \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f (\u0438 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0435\u0442\u0438 block time \u0440\u0430\u0432\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u0432\u0443\u043c \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u043c, \u0430 \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0431\u043e\u043b\u0435\u0435 \u0434\u0432\u0443\u0445 \u0441\u0435\u043a\u0443\u043d\u0434, \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043d\u0438\u0445 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u0430\u0445). <\/p>\n<p>  <\/p>\n<h3>\u0420\u0435\u0436\u0438\u043c CLI<\/h3>\n<p>  \u0412\u0441\u0451 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u0432\u044b\u0448\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0438 \u0431\u0435\u0437 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 API, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f CLI. \u0415\u0441\u043b\u0438 \u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0447\u0438\u0441\u0442\u0443\u044e \u0431\u0430\u0437\u0443, \u0435\u0451 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u043c\u0438:  <\/p>\n<pre><code class=\"go\">.\/fabex -task=explore -configpath=tests -configname=config -enrolluser=true -db=mongo<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/3v\/wt\/pr\/3vwtprixnswyo7nnfyhwoyqbzro.png\"><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u044f\u0442\u044b\u0439 \u0431\u043b\u043e\u043a:  <\/p>\n<pre><code class=\"go\">.\/fabex -task=getblock -blocknum=5 -configpath=tests -configname=config -enrolluser=true -db=mongo<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ny\/a0\/z1\/nya0z1ebn-fpfzcawe0pzdhaaqc.png\"><\/p>\n<p>  <code>make stop-mongo-test<\/code> \u2014 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b<br \/>  <code>make stop-fabric-test<\/code> \u2014 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0435\u0442\u0438<\/p>\n<p>  \u041e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e. \u041c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0442\u0430\u0440\u0433\u0435\u0442\u044b <a href=\"https:\/\/github.com\/hyperledger-labs\/fabex\/blob\/master\/Makefile\" rel=\"nofollow\">Makefile<\/a> \u0438 <a href=\"https:\/\/github.com\/hyperledger-labs\/fabex\/blob\/master\/readme.md\" rel=\"nofollow\">readme<\/a> \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438. \u0418\u043b\u0438 \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043c\u043d\u0435 \u0432 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c (\u0441\u0441\u044b\u043b\u043a\u0430 \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u0435), \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043f\u043e\u043c\u043e\u0447\u044c.<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/501422\/\"> https:\/\/habr.com\/ru\/post\/501422\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/501422\/\">\u041f\u0440\u0438\u0432\u0435\u0442, \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/github.com\/hyperledger-labs\/fabex\" rel=\"nofollow\">Fabex<\/a> \u2014 block explorer \u0434\u043b\u044f Hyperledger Fabric, \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0439 \u0432 Hyperledger Labs \u0438 \u0438\u043c\u0435\u044e\u0449\u0438\u0439 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043a\u0441\u043f\u043b\u043e\u0440\u0435\u0440\u0430. \u041f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0430 Golang (\u0430 \u043d\u0435 \u043d\u0430 Nodejs, \u043a\u0430\u043a \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439), \u0445\u0440\u0430\u043d\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435 \u0432 MongoDB \u0438\u043b\u0438 Cassandra \u043f\u043e \u0432\u044b\u0431\u043e\u0440\u0443 (\u0430 \u043d\u0435 \u0432 PostgresSQL, \u043a\u0430\u043a \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439), \u0438\u043c\u0435\u0435\u0442 \u043a\u0430\u043a GRPC, \u0442\u0430\u043a \u0438 REST API. E\u0433\u043e \u043b\u0435\u0433\u043a\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430. \u0414\u0435\u0442\u0430\u043b\u0438 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sa\/vu\/j7\/savuj7dp8qj0wjptdgxod-txb-k.png\"><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-304571","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=304571"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304571\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=304571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}