{"id":80122,"date":"2020-05-03T13:42:34","date_gmt":"2020-05-03T11:42:34","guid":{"rendered":"https:\/\/prohoster.info\/blog\/administrirovanie\/kak-ya-proektiroval-bloki-i-tranzakczii-v-svoem-blokchejne-na-go"},"modified":"2020-05-03T13:42:34","modified_gmt":"2020-05-03T11:42:34","slug":"kak-ya-proektiroval-bloki-i-tranzakczii-v-svoem-blokchejne-na-go","status":"publish","type":"post","link":"https:\/\/prohoster.info\/hy\/blog\/administrirovanie\/kak-ya-proektiroval-bloki-i-tranzakczii-v-svoem-blokchejne-na-go","title":{"rendered":"\u041a\u0430\u043a \u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0431\u043b\u043e\u043a\u0438 \u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 \u0441\u0432\u043e\u0435\u043c \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435 \u043d\u0430 Go","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u044f\u0441\u044f \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 3 \u0432\u0430\u0436\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430: <\/p>\n<ul>\n<li> \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0431\u043b\u043e\u043a\u0430<\/li>\n<li> \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438<\/li>\n<li> \u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442 \u0431\u043b\u043e\u043a\u0438 \u0432 \u0411\u0414 \u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442 \u0438\u0445 \u0442\u0430\u043c \u043f\u043e \u0438\u0445 \u0445\u0435\u0448\u0443 \u0438\u043b\u0438 \u0432\u044b\u0441\u043e\u0442\u0435 (\u0438\u043b\u0438 \u0435\u0449\u0435 \u043a\u0430\u043a \u043d\u0438\u0431\u0443\u0434\u044c).<\/li>\n<\/ul>\n<p>\n<img decoding=\"async\" alt=\"\u041a\u0430\u043a \u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0431\u043b\u043e\u043a\u0438 \u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 \u0441\u0432\u043e\u0435\u043c \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435 \u043d\u0430 Go\" src=\"\/wp-content\/uploads\/2020\/05\/75099a735419b5c2bfbffa82865d1d4a.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><br \/>\n\u042d\u0442\u043e \u0432\u0442\u043e\u0440\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d \u0434\u043b\u044f \u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u043f\u0435\u0440\u0432\u0430\u044f <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/499732\/\">\u0442\u0443\u0442<\/a><\/noindex>.<\/p>\n<p>\u0412\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u0437\u0430\u0434\u0430\u0432\u0430\u043b\u0438 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u043a \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044d\u0442\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c: \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 LevelDB, \u043d\u043e \u043d\u0438 \u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0434\u0440\u0443\u0433\u0443\u044e, \u0441\u043a\u0430\u0436\u0435\u043c \u0442\u0443 \u0436\u0435 MySQL. \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439: <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/Rusldv\/bcstartup\/blob\/master\/transaction\/builder.go\">github.com\/Rusldv\/bcstartup\/blob\/master\/transaction\/builder.go<\/a><\/noindex><\/p>\n<p>\u0412\u043e\u0442 \u0435\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"go\">type TX struct {\n\tDataType byte\t\t\n\tTxHash string \n\tTxType byte\t\n\tTimestamp int64\t\t\n\tINs []TxIn\n\tOUTs []TxOut\n}\n\ntype TxIn struct {\n\tThatTxHash string\n\tTxOutN int\n\tByteCode string\n}\n\ntype TxOut struct {\n\tValue int\n\tByteCode string\n}<\/code><\/pre>\n<p>\n\u0412 TX \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445 (\u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 2), \u0445\u0435\u0448 \u044d\u0442\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, \u0442\u0438\u043f \u0441\u0430\u043c\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043c\u0435\u0442\u043a\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u0445\u043e\u0434\u044b \u0438 \u0432\u044b\u0445\u043e\u0434\u044b. \u0412\u0445\u043e\u0434\u044b TxIn \u0445\u0440\u0430\u043d\u044f\u0442 \u0445\u0435\u0448 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, \u043d\u0430 \u0432\u044b\u0445\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f, \u043d\u043e\u043c\u0435\u0440 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0445\u043e\u0434\u0430 \u0438 \u0431\u0430\u0439\u0442\u043a\u043e\u0434, \u0430 \u0432\u044b\u0445\u043e\u0434\u044b TxOut \u0445\u0440\u0430\u043d\u044f\u0442, \u043a\u0430\u043a\u043e\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438 \u0442\u043e\u0436\u0435 \u0431\u0430\u0439\u0442\u043a\u043e\u0434.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u0430\u0434 \u0441\u0432\u043e\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f, \u0442.\u0435. \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u044b.<\/p>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0441\u043b\u0443\u0436\u0438\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f transaction.NewTransaction(txtype byte) *TX.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 AddTxIn(thattxhash []byte, txoutn int, code []byte) (*TxIn, error) \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0445\u043e\u0434 \u043a \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 AddTxOut(value int, data []byte) (*TxOut, error) \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u044b\u0445\u043e\u0434 \u043a \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 ToBytes() []byte \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e \u0432 \u0431\u0430\u0439\u0442\u043e\u0432\u044b\u0439 \u0441\u0440\u0435\u0437.<\/p>\n<p>\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f preByteHash(bytes []byte) string \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 Build() \u0438 Check() \u0434\u043b\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0445\u0435\u0448\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0441 \u0445\u0435\u0448\u0430\u043c\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u043c\u0438 \u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 JavaScript.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 Build() \u0437\u0430\u0434\u0430\u0435\u0442 \u0445\u0435\u0448 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: tx.TxHash = preByteHash(tx.ToBytes()).<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 ToJSON() string \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e \u0432 JSON \u0441\u0442\u0440\u043e\u043a\u0443.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 FromJSON(data []byte) error \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e \u0438\u0437 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 JSON, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0432 \u0432\u0438\u0434\u0435 \u0431\u0430\u0439\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u043b\u0430\u0439\u0441\u0430.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 Check() bool \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0445\u0435\u0448 \u0438\u0437 \u043f\u043e\u043b\u044f \u0445\u0435\u0448\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0441 \u0445\u0435\u0448\u0435\u043c, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 (\u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u043f\u043e\u043b\u044f \u0445\u0435\u0448\u0430).<\/p>\n<p>\u0422\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0431\u043b\u043e\u043a: <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/Rusldv\/bcstartup\/blob\/master\/block\/builder.go\">github.com\/Rusldv\/bcstartup\/blob\/master\/block\/builder.go<\/a><\/noindex><\/p>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u0430 \u0431\u043e\u043b\u0435\u0435 \u043e\u0431\u044a\u0435\u043c\u043d\u0430\u044f:<\/p>\n<pre><code class=\"go\">type Block struct {\n\tDataType byte\t\t\t\t\n\tBlockHeight int\t\t\t\t\t\n        Timestamp int64\t\t\t\t \n        HeaderSize int\t\t\t\t\t\n        PrevBlockHash string\t\t\t\t \n        SelfBlockHash string\t\t\t\n\tTxsHash string\t\t\t\n\tMerkleRoot string\n\tCreatorPublicKey string\t\t\t\n\tCreatorSig string\n\tVersion int\n\tTxsN int\n\tTxs []transaction.TX\n}<\/code><\/pre>\n<p>\nDataType \u0445\u0440\u0430\u043d\u0438\u0442 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e \u043d\u0435\u043c\u0443 \u043d\u043e\u0434\u0430 \u0438 \u043e\u0442\u043b\u0435\u0447\u0430\u0435\u0442 \u0431\u043b\u043e\u043a \u043e\u0442 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u043b\u044f \u0431\u043b\u043e\u043a\u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0432\u043d\u043e 1.<\/p>\n<p>BlockHeight \u0445\u0440\u0430\u043d\u0438\u0442 \u0432\u044b\u0441\u043e\u0442\u0443 \u0431\u043b\u043e\u043a\u0430.<br \/>\nTimestamp \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043c\u0435\u0442\u043a\u0443.<br \/>\nHeaderSize \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u043b\u043e\u043a\u0430 \u0432 \u0431\u0430\u0439\u0442\u0430\u0445.<br \/>\nPrevBlockHash \u0445\u0435\u0448 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430, \u0430 SelfBlockHash \u2014 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e.<br \/>\nTxsHash \u2014 \u044d\u0442\u043e \u043e\u0431\u0449\u0438\u0439 \u0445\u0435\u0448 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439.<br \/>\nMerkleRoot \u2014 \u043a\u043e\u0440\u0435\u043d\u044c \u0434\u0435\u0440\u0435\u0432\u0430 \u041c\u0435\u0440\u043a\u043b\u0430.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432 \u043f\u043e\u043b\u044f\u0445 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044f \u0431\u043b\u043e\u043a\u0430, \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044f, \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u043b\u043e\u043a\u0430, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0432 \u0431\u043b\u043e\u043a\u0435 \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0430\u043c\u0438 \u044d\u0442\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u044b:<br \/>\n\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f block.NewBlock(): NewBlock(prevBlockHash string, height int) *Block, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0445\u0435\u0448 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0438 \u0432\u044b\u0441\u043e\u0442\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0432 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435. \u0422\u0430\u043a\u0436\u0435 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0442\u0438\u043f \u0431\u043b\u043e\u043a\u0430 \u0438\u0437 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043f\u0430\u043a\u0435\u0442\u0430 types: <\/p>\n<pre><code class=\"go\">b.DataType = types.BLOCK_TYPE.<\/code><\/pre>\n<p>\u041c\u0435\u0442\u043e\u0434 AddTx(tx *transaction.TX) \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e \u0432 \u0431\u043b\u043e\u043a.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 Build() \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043f\u043e\u043b\u044f \u0431\u043b\u043e\u043a\u0430 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0445\u0435\u0448.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 ToBytesHeader() []byte \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0431\u043b\u043e\u043a\u0430 (\u0431\u0435\u0437 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439) \u0432 \u0431\u0430\u0439\u0442\u043e\u0432\u044b\u0439 \u0441\u043b\u0430\u0439\u0441.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 ToJSON() string \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0431\u043b\u043e\u043a \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 JSON \u0432 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 FromJSON(data []byte) error \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 JSON \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0431\u043b\u043e\u043a\u0430.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 Check() bool \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0445\u0435\u0448 \u0431\u043b\u043e\u043a\u0430 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u0432 \u043f\u043e\u043b\u0435 \u0445\u0435\u0448\u0430 \u0431\u043b\u043e\u043a\u0430.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 GetTxsHash() string \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0431\u0449\u0438\u0439 \u0445\u0435\u0448 \u0432\u0441\u0435\u0445 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0432 \u0431\u043b\u043e\u043a\u0435.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 GetMerkleRoot() \u0437\u0430\u0434\u0430\u0435\u0442 \u043a\u043e\u0440\u0435\u043d\u044c \u0434\u0435\u0440\u0435\u0432\u0430 \u041c\u0435\u0440\u043a\u043b\u0430 \u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0432 \u0431\u043b\u043e\u043a\u0435.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 Sign(privk string) \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0431\u043b\u043e\u043a \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c \u043a\u043b\u044e\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044f \u0431\u043b\u043e\u043a\u0430.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 SetHeight(height int) \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u0442\u0443 \u0431\u043b\u043e\u043a\u0430 \u0432 \u043f\u043e\u043b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0431\u043b\u043e\u043a\u0430.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 GetHeight() int \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u0442\u0443 \u0431\u043b\u043e\u043a\u0430 \u0442\u0430\u043a \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u043f\u043e\u043b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0431\u043b\u043e\u043a\u0430.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 ToGOBBytes() []byte \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u0431\u043b\u043e\u043a \u0432 GOB \u0444\u043e\u0440\u043c\u0430\u0442 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0435\u0433\u043e \u0432 \u0432\u0438\u0434\u0435 \u0431\u0430\u0439\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u043b\u0430\u0439\u0441\u0430.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 FromGOBBytes(data []byte) error \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0430 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0431\u043b\u043e\u043a\u0430 \u0438\u0437 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0431\u0430\u0439\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u043b\u0430\u0439\u0441\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 GOB.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 GetHash() string \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0445\u0435\u0448 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 GetPrevHash() string \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0445\u0435\u0448 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 SetPublicKey(pubk string) \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432 \u0431\u043b\u043e\u043a \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044f \u0431\u043b\u043e\u043a\u0430.<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 Block \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043b\u0435\u0433\u043a\u043e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043f\u043e \u0441\u0435\u0442\u0438 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 LevelDB.<\/p>\n<p>\u0417\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0430\u043a\u0435\u0442\u0430 blockchain: <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/Rusldv\/bcstartup\/tree\/master\/blockchain\">github.com\/Rusldv\/bcstartup\/tree\/master\/blockchain<\/a><\/noindex><\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u043b\u043e\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 IBlock:<\/p>\n<pre><code class=\"go\">type IGOBBytes interface {\n\tToGOBBytes() []byte\n\tFromGOBBytes(data []byte) error\n}\n\ntype IBlock interface {\n\tIGOBBytes\n\tGetHash() string\n\tGetPrevHash() string\n\tGetHeight() int\n\tCheck() bool\n\n}<\/code><\/pre>\n<p>\n\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0430\u043a\u0435\u0442\u0430 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 init(): <\/p>\n<pre><code class=\"go\">db, err = leveldb.OpenFile(BLOCKCHAIN_DB_DEBUG, nil).<\/code><\/pre>\n<p>\nCloseDB() \u044d\u0442\u043e \u043e\u0431\u0435\u0440\u0442\u043a\u0430 \u0434\u043b\u044f db.Cloce() \u2014 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u043f\u0430\u043a\u0435\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0411\u0414.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f SetTargetBlockHash(hash string) error \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432 \u0411\u0414 \u0445\u0435\u0448 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0441 \u043a\u043b\u044e\u0447\u0435\u043c \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043e\u0439 BLOCK_HASH.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f GetTargetBlockHash() (string, error) \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0445\u0435\u0448 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0439\u0441\u044f \u0432 \u0411\u0414.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f SetTargetBlockHeight(height int) error \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432 \u0411\u0414 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0441\u043e\u0442\u044b \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430 \u0434\u043b\u044f \u043d\u043e\u0434\u044b \u0441 \u043a\u043b\u044e\u0447\u0435\u043c \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043e\u0439 BLOCK_HEIGHT.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f GetTargetBlockHeight() (int, error) \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u0442\u0443 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043d\u043e\u0434\u044b, \u0445\u0440\u0430\u043d\u0438\u043c\u0443\u044e \u0432 \u0411\u0414.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f CheckBlock(block IBlock) bool \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0431\u043b\u043e\u043a\u0430 \u043d\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0432 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f AddBlock(block IBlock) error \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u043b\u043e\u043a \u0432 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0431\u043b\u043e\u043a\u043e\u0432 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 explore.go \u043f\u0430\u043a\u0435\u0442\u0430 blockchain:<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f GetBlockByHash(hash string) (*block.Block, error) \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u0443\u0441\u0442\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0431\u043b\u043e\u043a\u0430, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0442\u0443\u0434\u0430 \u0431\u043b\u043e\u043a \u0438\u0437 \u0411\u0414 \u0445\u0435\u0448 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430 \u043d\u0435\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u043b\u043e\u043a\u0430 \u0433\u0435\u043d\u0435\u0437\u0438\u0441\u0430 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 Genesis() error \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 genesis.go \u043f\u0430\u043a\u0435\u0442\u0430 blockchain.<\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0435\u0442 \u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e \u043a \u043d\u043e\u0434\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 WebSocket.<br \/>\n<br \/>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/499930\/\">habr.com<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u044f\u0441\u044f \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 3 \u0432\u0430\u0436\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430: \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0431\u043b\u043e\u043a\u0430 \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442 \u0431\u043b\u043e\u043a\u0438 \u0432 \u0411\u0414 \u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442 \u0438\u0445 \u0442\u0430\u043c \u043f\u043e \u0438\u0445 \u0445\u0435\u0448\u0443 \u0438\u043b\u0438 \u0432\u044b\u0441\u043e\u0442\u0435 (\u0438\u043b\u0438 \u0435\u0449\u0435 \u043a\u0430\u043a \u043d\u0438\u0431\u0443\u0434\u044c). \u042d\u0442\u043e [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":80123,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-80122","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u044f\u0441\u044f \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 3 \u0432\u0430\u0436\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430: \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0431\u043b\u043e\u043a\u0430 \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/hy\/blog\/administrirovanie\/kak-ya-proektiroval-bloki-i-tranzakczii-v-svoem-blokchejne-na-go\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041a\u0430\u043a \u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0431\u043b\u043e\u043a\u0438 \u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 \u0441\u0432\u043e\u0435\u043c \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435 \u043d\u0430 Go | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u044f\u0441\u044f \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 3 \u0432\u0430\u0436\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430: \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0431\u043b\u043e\u043a\u0430 \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/hy\/blog\/administrirovanie\/kak-ya-proektiroval-bloki-i-tranzakczii-v-svoem-blokchejne-na-go\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-05-03T11:42:34+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-05-03T11:42:34+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47\u041a\u0430\u043a \u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0431\u043b\u043e\u043a\u0438 \u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 \u0441\u0432\u043e\u0435\u043c \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435 \u043d\u0430 Go | ProHoster","description":"\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u044f\u0441\u044f \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 3 \u0432\u0430\u0436\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430: \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0431\u043b\u043e\u043a\u0430 \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435.","canonical_url":"https:\/\/prohoster.info\/hy\/blog\/administrirovanie\/kak-ya-proektiroval-bloki-i-tranzakczii-v-svoem-blokchejne-na-go","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041a\u0430\u043a \u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0431\u043b\u043e\u043a\u0438 \u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 \u0441\u0432\u043e\u0435\u043c \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435 \u043d\u0430 Go | ProHoster","og:description":"\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u044f\u0441\u044f \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 3 \u0432\u0430\u0436\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430: \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0431\u043b\u043e\u043a\u0430 \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435.","og:url":"https:\/\/prohoster.info\/hy\/blog\/administrirovanie\/kak-ya-proektiroval-bloki-i-tranzakczii-v-svoem-blokchejne-na-go","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-05-03T11:42:34+00:00","article:modified_time":"2020-05-03T11:42:34+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"80122","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 16:23:29","updated":"2022-09-30 17:12:23","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/hy\/wp-json\/wp\/v2\/posts\/80122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/hy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/hy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/hy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/hy\/wp-json\/wp\/v2\/comments?post=80122"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/hy\/wp-json\/wp\/v2\/posts\/80122\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/hy\/wp-json\/wp\/v2\/media\/80123"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/hy\/wp-json\/wp\/v2\/media?parent=80122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/hy\/wp-json\/wp\/v2\/categories?post=80122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/hy\/wp-json\/wp\/v2\/tags?post=80122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}