马蹄链佛萨奇系统开发2.0佛萨奇系统开发源码部署
From a technical perspective,blockchain has entered the stage of platform-based,component-based and integrated development from the initial technological exploration.It is mainly reflected in the following aspects:First,the platform promotes the formation of urban chain network.City chains such as Chang'an Chain,Shuxin Chain and Haihe Chain have emerged in succession.After the city chains are interconnected,they will form a city chain network to support a larger scale of application scenarios 区块链将与大数据、云计算、人工智能等新一代信息技术深度融合,实现数据和资产价值的最/大/化。在平台化、组件化和集成化发展的过程中,将形成围绕区块链的数字科技体系和信息技术服务体系,更大规模的创新应用场景落地实现获得支撑,数字产业化的新格局加速形成。 native.hpp的区块头结构体。 时间戳,uint32_t类型 生产者,name类型 confirmed,已确认数,uint16_t,初始化为0。 前一个区块的hash,是capi_checksum256类型的 事务Merkle树根,Merkle数的内容请点击以及点击。概况来讲,是为了校验区块内打包的事务的真伪以及完整性的。 action的merkle树根,,校验区块内所有action的真伪以及完整性。 计划版本,schedule_version,uint32_t类型,初始化为0。 后续计划出块者。producer_schedule类型。 producer_schedule 定义在librarieseosiolibproducer_schedule.hpp。该结构体定义了有效生产者集合的出块顺序、账户名以及签名密钥。 struct producer_schedule{ //时间计划的版本号,按顺序递增。 uint32_t version; //此计划的生产者列表,包括其签名密钥 std::vector<producer_key>producers; };案例及设计:StPv888 陌生的部分是producer_key,该结构体定义在librarieseosiolibprivileged.hpp,是用来映射生产者及其签名密钥,用于生产者计划。 struct producer_key{ name producer_name; //此生产者使用的区块签名密钥 public_key block_signing_key; //重载运算符小于号,producer_key的两个对象进行小于号比较时,返回的是其name类型的生产者账户的比较。 friend constexpr bool operator<(const producer_key&a,const producer_key&b){ return a.producer_name<b.producer_name; } EOSLIB_SERIALIZE(producer_key,(producer_name)(block_signing_key))
发表回复