Skip to content

个人项目:ethereum的dpos改造,参考的meitu

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

bitxx/go-ethereum

Repository files navigation

Go Ethereum

本项目参考自:美图 目前只是参考实现了dpos算法,具体对接还未实现

项目改造中...

说明

  1. core->types->block.go中,结构体Header中加入:
	Validator   common.Address           `json:"validator"        gencodec:"required"`
	DposContext *params.DposContextProto `json:"dposContext"      gencodec:"required"`
  1. trie模块中,加入新的文件prefix_trie.go 主要用户生成带有dpos相关前缀的trie

  2. trie模块中,加入新的文件prefix_trie_iterator.go 主要用于dpos相关trie的遍历

  3. trie->trie.go中,Tire结构体加入如下内容: 用于标识前缀

prefix       []byte
  1. 共识引擎接口中,Finalize需要加一个参数:
Finalize(chain ChainReader, header *types.Header, state *state.StateDB, txs []*types.Transaction,
		uncles []*types.Header, receipts []*types.Receipt, dposContext *dpos.DposContext) (*types.Block, error)

About

个人项目:ethereum的dpos改造,参考的meitu

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published