自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 bigchaindb源码分析(八)——stale

本节我们来分析stale进程,stale进程也是一个pipeline,其作用在于处理联盟中有被分配节点由于某些原因没有处理bakclog中的事务的问题,主要做法是对该事务的被分配节点进行重新分配# bigchaindb/pipelines/stale.pydef create_pipeline(timeout=5, backlog_reassign_delay=5): stm = Stal

2017-07-16 17:09:48 559

原创 bigchaindb源码分析(七)——投票

现在我们来根据源码分析(六)的思路来分析投票进程(votes),vote进程也是一个pipeline# bigchaindb/pipelines/vote.pydef start(): """Create, start, and return the block pipeline.""" pipeline = create_pipeline() pipeline.setup(

2017-07-16 17:09:19 958

原创 bigchaindb源码分析(六)——写事务(下)

我们之前在源码分析(二)——pipeline中说到,在命令bigchaindb start执行后,bigchaindb将会利用pipeline来运行很多进程,如block\vote等等源码分析(五)中分析了在客户端利用API往bigchaindb写事务时,实际上只是将事务写入到了表backlog中,那么如何处理backlog中的事务则很明显要依赖于在start时创建的进程了首先来回顾创建block对

2017-07-16 17:08:46 986 1

原创 bigchaindb源码分析(五)——写事务(上)

之前在部署bigchaindb时,给出了使用python利用bigchaindb-driver往bigchaindb中写事务的代码,本节根据这段代码,来跟踪分析bigchaindb写事务的整个流程创建事务往bigchaindb写事务代码如下# coding=utf-8# author: Wu Luoimport bigchaindb_driverfrom bigchaindb_driver im

2017-07-16 17:08:12 1514

原创 bigchaindb源码分析(四)——创建创世区块

根据bigchaindb源码分析(三)所述,在初始化后端存储后,命令bigchaindb start所触发执行的_run_init函数将创建创世区块# commands/bigchaindb.pydef _run_init(): # Try to access the keypair, throws an exception if it does not exist b = big

2017-07-16 17:07:32 2312 4

原创 bigchaindb源码分析(三)——后端存储

bigchaindb源码分析(一)分析了bigchaindb如何解析命令行参数与配置文件,并据此启动了日志publisher与subscriber。对于bigchaindb start命令,将调用_run_init来初始化后端存储,随之利用pipeline来启动block\vote等进程(bigchaindb源码分析(二))。本节介绍bigchaindb的后端存储。_run_init由run_sta

2017-07-08 14:37:14 1280

原创 bigchaindb源码分析(二)——pipeline

bigchaindb源码分析(一)分析了bigchaindb如何解析命令行参数与配置文件,并据此启动了日志publisher与subscriber。本节来分析bigchaindb的pipeline机制。之前说到,对于命令行命令bigchaindb start,将会调用commands.bigchaindb.run_start()。该函数完成了生成公私钥、初始化数据库以及启动所必要的进程。proces

2017-07-02 21:12:24 968

原创 bigchaindb源码分析(一)——命令行参数与配置文件解析

bigchaindb版本:BigchainDB (1.0.0rc1)bigchaindb-driver (0.3.1)命令行参数解析使用whereis定位bigchaindb可执行文件为/usr/local/bin/bigchaindb,该文件调用了bigchaindb.commands.bigchaindb.main()函数。re.sub(r'(-script\.pyw?|\.exe)?$',

2017-07-02 21:11:08 2138

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除